Firebase SMS Verification change sender name - android

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%

Related

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

Firebase Phone Authentication not showing app name

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.

Firebase Console Notification sending error after updating app, previously working

I am getting an error when I try to send messages via the Firebase Notification screen in the console. It says I have an invalid token format, but I have used previously used tokens collected with the same method successfully.
I was not getting this error a few days ago, and notifications were working properly. I just pushed an update to the Google Play Store recently, but this update did not touch any code relating to the notifications.
status.firebase.google.com says that notifications are currently up. All other Firebase usages in my app (database, storage, auth) are working properly.
When I updated my app, I did not change my google-services.json file at all. Do I need to do some sort of update to this file, or some sort of version change on the Firebase Console to keep the versions consistent between the APK and the console?
As mentioned by #Arthur Thomson (in the comments), your registration token may change as a result of an update in the application. It does matter that you did not change the google-services.json if the user reinstalled or updated the application the token maybe changed.
According to the docummentation about the device registration token, the registration toke may change when:
The app deletes Instance ID
The app is restored on a new device
The user uninstalls/reinstall the app
The user clears app data.
So you would need to retrieve the new registration token using the onTokenRefresh() method in your Android client application. I mean, you just need to implement a code to retrieve the new token if it changes.
Hope this helps

android parse is subscribed to more than one account at the same time

greetings i'm trying to add parse notification system to an application i'm working on in my company
first i created a dummy account with my email and added the keys to my android app for testing
then when i tried to integrate the companies account i removed my keys and added the companies Applicatioin ID and client key and i found that when i send notification from my account it still sends to my application after i've changed the keys to my companies account
is this normal ?
and if it's normal how can i un-subscribe from my account
It is normal because you haven't unsubscribed the user from the channel.
When you log out the user simply call:
ParsePush.unsubscribeInBackground("thenameofyourchannel");

How to pass a tracking ID to the apk on install

Simple as this,
My affiliates send users to my app in google play,
on install my app picks up who sent that install.
Is that even possible?
Example:
https://play.google.com/store/apps/details?id=com.netmarble.mherosgb&someid=AFFILIATEID
I know I can have GA but I dont need that, I need my application to "know" exactly who sent the user who installed it.
InstallReferrerReceiver is broadcast which will fire when an app is installed from the Google Play Store
In onReceive method takes the referrer extra from the intent and breaks it down into key/value pairs to get all data from url.
See following example for more help:
Tracking install sources for Android apps
As per my understanding for your requirement it's seems to be not possible, Rather than you can do following things,
1) provide extra reference code field with your current field on registration page.
2) After registration provide each user unique code(via email or sms) and stored the same against the user registration details.
3) When user want to refer your app then user will provide there reference code to other user.
4) At time of registration user put that code in reference code field so it will become easy for you to know which user refer new user at time of its registration.

Categories

Resources