Firebase Phone Authentication not showing app name - android

I have added firebase phone authentication to my android app.
It worked well, but the the app name is not included in the sms verification message as it appears in the sms template in the firebase console:
(%LOGIN_CODE% is your verification code for %APP_NAME%.).
The message I receive looks like:
(%LOGIN_CODE% is your verification code)
I have this problem for both debug and release versions of my app.
So, how to add the app name to this message.

I believe they get the app name corresponding to your Android package name from the Google Play Store. So until your app is on the Play Store, they won't be able to show the app name in the SMS message.

It was by Firebase. Maybe they were testing this new feature.
Thanks to all.

Related

Firebase Phone Authentication SMS autofill stopped working after changing package Name and Key store

I have an android app with Firebase Phone number authentication. Its working fine but recently I had to change my package and key store after that I had added my SHA1 & SHA256 in firebase console and everything is working fine but SMS code is not getting autofilled in EditText means onverificationcompleted is not getting called.
However If I changed my Application ID and create new firebase android app in firebase with new ID and put all my code there then same code and setup is working fine.
Like com.example.app is not working but com.example.newapp with same code is working fine
I am writing this answer as i tried to find out the solution but did not get any.
Finally I noticed that it was due to Long App Name in Play store.
So any one facing the same issue should consider to reduce App Name to 11 Characters.

Firebase PhoneAuthentication OTP not showing APP NAME correctly

I have the app deployed on the play store. The SHA1 and SHA256 are added in the firebase project settings. I'm using phone authentication to receive the OTP for the app. The message comes in the following format:
123456 is your verification code for APP_NAME.
LghSMNBa+V
Why is the random sting appearing? The code gets verified and it works fine but I don't want the random string to be sent along with the message.
Finally, I received a response from the Firebase Team. It was as follows:
Thanks for reaching out! This is Estefani and I’ll take care of this
case.
On some devices, Google Play services can automatically detect the
incoming verification SMS and perform verification without user
action. This uses the SMS Retriever API, which includes an 11
character hash at the end of the SMS message. Unfortunately, it is not
possible to change this behavior and the only thing I could do is
submit a feature request on your behalf so this behavior can be
removed, but even if I do there is no way to tell if it is going to be
implemented or not and even if it gets accepted it may take time to be
completed.
The issue appears to be rather Google Play Services-related than it would be Firebase-related. Besides, it is unclear how you output the String, as no code to reproduce had been provided.
The template string can be defined in Authentication > Templates > SMS Verification, where the default template string is: %LOGIN_CODE% is your verification code for %APP_NAME%.. No clue why it displays (likely some) ID, but one can simply split the string with message.split(".")[0].Index [1] may be an execution ID, which's log can be found in the GCP Log Explorer
When it displays APP_NAME as a placeholder, you may first have to upload your application to Google Play Console, I'd guess at least into an internal testing track (requires a review). The scenario appears similar to in-app products not being visible unless having the app published.
For reference: https://play.google.com/console/about/internal-testing

I can't login in my android app when download it from PlayStore

I have an android app that has a login and OTP features.
I have generated the release version of the app and we were able to use it when we download it from external link.
However, when we download the same app from PlayStore, we are unable to pass the OTP Screen although we receive the otp.
Whenever we add the otp number, it just remain in the same page and we can't proceed.
My point is, why we have different behavior when we download the app from the PlayStore?
What can we do to debug or troubleshoot the app in this case?
There won't be any difference between the app that you submitted to the play console and the release app you generated if it is the same android package.
If you really want to check, you could use the testing track to test your app.
More information here https://developer.android.com/distribute/best-practices/launch/test-tracks

Firebase SMS Verification change sender name

I'm using Firebase Phone Auth to identify the user, the sms is received but I need to change the SMS sender name (Not the template) in mobile, is there anyway to change the sender name or the messaging service?
The sms is received like:
Phonecode
106109 is your verification code for MyAppName
what I need is:
MyAppName
106109 is your verification code MyAppName
As for now, We simply can't change the template nor sender name/number. We can only see in which template user will get SMS.
Additional Info:
Until your app gets live, your format will be *%LOGIN_CODE% is your verification code.
After upload app on google-play-store, format will be %LOGIN_CODE% is your verification code for %APP_NAME%.
the app name displayed in the SMS can't be changed manually (neither can you modify the template).
The app name is retrieved from the play store/app store once the app is live in the store.
This wasn't 100% clear to me after reading Rumit's answer.
here is the response from the firebase support about this matter:
The SMS messages draw the app's name from the App Store / Play Store.
Once an app is published, the correct name should start appearing.
There may be a small delay (a week or two at most). So, this is an
expected behavior if you published the app a few days ago.
But if the app is published and you are still not able to see the
app's name, it's possible that someone else has registered the user's
App's Application ID (Usually the same as the Package Name - for
instance, com.example.myapp) on the Play Store with a different name
(which is the name shown as the %APP_NAME% value on the SMS template).
Firebase pulls %APP_NAME% from the Play Store based on this
Application ID.
Since Application IDs in Google Play must be unique, you can't use an
ID that is already taken by someone else.
To fix this, you can change your Application ID and register the new
one in the package name field in the Firebase Console.
This is the response I got from Firebase support team as of March 19, 2021.
hi am also using firebase messages for send otp on mobile numbers. I also want to show my app name in text message but there is a firebase document that you can't change body of message in firebase. You can select the language from the Firebase console, however this is a per project setting and you can't modify the templates.
Go to Firebase>Authentication>Templates>Password Reset> Put %APP_NAME%

App Invites for Android: Message failed to send with missing container client ID

I am trying to integrate new Google Play Services api "App Invites for Android". I followed all the steps as per guide and generated the gogole-services.json file. But when I send an invite to a selected friend via SMS or Email, I get the same error everytime.
Message failed to send
on ADB log getting this:
E/AppInviteAgent﹕ generic::13: generic::INTERNAL: java.lang.IllegalArgumentException: Request must associate a valid container client application ID.
Now it seems my app is missing some sort of client app ID but not getting any clue how to configure it.
This happens because you used the SHA1 fingerprint from your release key. But the build you test is signed with the android debug key.

Categories

Resources