Adding translations in Firebase push notifications - android

I am trying to localise the Push notifications that i receive on my Android/iOS device using Firebase notifications. I see an option in console to filter language, but i couldn't find any documentation pointing as to how i can use it? I need to know two things.
How can i add a new language to the list?
How can i handle this on device or is it handled automatically based on device language?
I have tried the following options.
Changing the device language and subscribing to a topic.
Adding a language suffix to the topic subscribed as - "userloggedin-fr"
But the above two options doesn't seem to work. I do not need to handle this manually using an additional key in payload. Can someone guide me how can i use the default option in console? I am including below a screenshot of my console right now. I am not sure how the "Spanish" got added into the list.

I can't tell you how to manage that on app side, but I can tell you how to get more languages to the list on firebase console. Firebase recognizes your app and the device language automatically and adds it to the list. So if your app is used by a user in a foreign country with a different language it is added automatically to your console.

You just misunderstood this field.
As oficial docs says
You can target user segments based on app, app version, language or user properties in ways that are not available using the to field in the server API.
So it's not the message language. It is group target based on app language

Related

Is it possible to change automatically selected user property in Firebase

Firebase SDK automatically collects some of the important and common user properties. Which can be found here.
In our app and website, we auto-detect the user's country. We also allow the user to change it to their preferred country if needed. We are using this country value for providing more localized content.
The current problem which we are facing now is, the auto-detected country is mostly the same as Firebase automatically select country (user property). But if the user manually changes the country to a different one in the app, the country in Firebase and app won't match. Which is leading to lot of inconsistencies. For example, assume the user changed the country from IN to the US in the app. And from the Firebase dashboard, we send push notification targeting Indian users, the push notification will also be received by the above user, which is not correct.
To solve this problem we came up with 2 solutions,
Create a new custom user property called app_selected_country. This is a great solution, but we can't use this property immediately because of old & existing users won't be having this value without they update and use the app.
If we can change the automatically logged user property programmatically from the app and website, we could update the country user property to the app's country.
Our preferred option is the 2nd one. Because we'll be able to use the country user property the same as before. Even if the users won't update the app, we'll be able to use this property with existing data errors, which is fine for us.
The challenge with this approach is that we can't find any documentation regarding updating automatically logged user property.
So can you please help me answer these questions,
Is it possible to update automatically logged user property in Firebase? If so what is the user property key for the country?
Is there any side effect of doing this? We are a bit worried because we are changing the value detected by Firebase.
Unfortunately there is no way to change the auto-detected country. You will need to use your first proposed solution.

Showing last calls inside android app in Google Privacy Policy compliant way

I've got an app which shows user's contacts inside device and allows him to make a call.
I want to show my user the last calls he has made. I was using READ_CALL_LOG permission (and was reading call log) until Google restricted access to it, then I switched to ContactsProvider to retrieve contacts and sort them by LAST_TIME_CONTACTED but now Google says this column is deprecated and effectively it will have 0 value for new versions of Android OS (see https://developer.android.com/guide/topics/providers/contacts-provider#ObsoleteData)
My app is not a default dialer (only default dialers apps are allowed to access call log) so I was wondering how I can achieve what I want in Google Policy compliant way.
I tought about storing the last contacts selected inside my own database (I know it won't be a full call log, as I will only have access to calls made from my app but that's fine for me), but don't know whether it's compliant with G Policy. I wrote an email to Google, however the person who replied said he can't help me with my question and I have to create new version of my app and ask them for review.
Does anyone know if my idea about saving contacts in my own database is compliant with G policy (please provide links from official sites). From my link (which I've provided above) I can only see that Google says
If your apps are accessing or updating these fields or APIs, use
alternative methods. For example, you can fulfill certain use cases by
using private content providers or other data stored within your app
or backend systems.
However it doesn't convince me to whether my idea is compliant
Thanks for help!
I believe you may store and use any user actions that had happened within your app.
The purpose of the policy (as stated here: https://support.google.com/googleplay/android-developer/answer/9047303?hl=en) is to prevent apps from getting access to the call-log in order to make use of it for purposes other then what users' expect, that's why the emphasis on critical core functionality of the app.
In my experience, different Google reviewers tend to review the same app very differently, and while one may reject a certain use-case based on this policy, another might approve it.
I would suggest phrasing the screen you want to create in a way that will help the reviewer understand that this data was not acquired from the call-log but some app specific actions, so for example instead of title "Call Log" which might confuse some reviewers with the risk of rejecting this update, you should title it "Recent app actions" or something like that.

Firebase: Can user be analysed individually?

I am developing an application in Firebase. Earlier i was using parse. Parse creates an install object on installation which is then added to the server database.
I have not been able to find anything similar in case of Firebase. So does Firebase has any database with installation properties like the date installed, updated, timezone and version?
Firebase provides developers to analyze the user data, FCM Analytics has been built so wonderfully that you can get every small detail like :
1.the count of different versions of the app installed
2.the device model names.
3.the different OS versions which the app is running on
4.geographical count of the app installs in various countries and many many details
It also provides a facility for crash reporting,by simply adding a dependency in your build.gradle, developers can get a detailed crash report and the full stack trace with line numbers.
Developers can also set something called the user property with which they can analyze the different user usage patterns.
And many more features, all in one single console.
For better understanding you can go through the docs for FCM from the below link:
https://firebase.google.com/docs/analytics/

How to see all device list in Firebase Analytics?

In our App we're using FCM, so Firebase analytics is also working.
However, from the dashboard, we can only see top devices.
Is there a way to see more details about devices?
All the models
All OS
Region of all the devices?
etc.
For instance, we want to verify whether some users are being tracked in analytics (by their models), but can't find anyway to do that.
On Analytics -> Dashboard, clicking the three vertical dots then "Download CSV" will give you a CSV with all devices, OS versions, countries, languages, and more, as well as the user distribution for each.
It may also be under the share button (3 connected circles) -> Download File -> Download CSV
There is one way to see the list of devices and OS. In the screenshot you uploaded, click on the Add Filter -> User Property -> {Device Model, Device Brand, App Version, OS Version etc.} will be listed there.
If you have not specified any User Properties your self then also, firebase is Automatically collected user properties. Check the list of properties automatically collected by firebase.
https://support.google.com/firebase/answer/6317486?hl=en
Note: If firebase has collected any of the properties itself you will as I mentioned above.
Good luck!!
Is there any way to download this report
If you hover your mouse over the grey 'other' bar, you can see a more detailed breakdown of the rest of the devices without needing to download the data as a CSV file.
You can see the device information (model and OS) on Firebase Dashboard page, in the Device tab of the last card
You can see them on Google Analytics as well if you have it linked with your Firebase project. The path is Technology -> App -> Device Models.
You can see the device list in Firebase Analytics. In dashboard -> device model click in view device model. You can see list of all the devices with details.

Strategy for selectively enabling features in a mobile application

Assuming an application that has no login, how can one go about allowing some of its user access to activate 'hidden' features.
An example I recently came across is the need for some users to see a different version of the data feed the app is using (official feed vs editor feed which is being modified/approved)
In android, I assume that we could just point those user to downloading a specific file and test for that file presence in the app but I dont believe this approach can be used on iOS (sandbox).
The approaches I came up with:
Hide an activator in the UI: specific touches/gestures, invisible button and the like
Make the user visit a site which sets a cookie when on a specific page and test for that cookie's value in the app to enable features.
Did someone came up with a more elegant solution?
You can try any AB testing tool like Optimizely , Apptimize, Taplytics or MixPanel
They will help you to try new features by enabling them to only a group of users. Also you can set goals to each variant so you can compare how they perform.
Create a settings bundle. Then the user can just go into the Settings app to switch your 'hidden' behaviour on and off.
In iOS you can register an association between your app and a file extension. Then if you send an iOS user an email containing an attachment with this file extension, iOS will open your app and you'll have access to the file. You could save to the sandbox from there.
Just Like In-app purchases, when user completes a purchase some of the features in application gets unlocked.
I think best approach would be to have data maintained on your server end, the users vs features and in splash screen you get the response from server which of the application's feature are enabled for this user using a service call.
Obviously you must be needing some kind of business logic to implement the flow of enabled features in the application and that is totally up to you whether you use SharedPreferences of keep the information in txt or some other files.

Categories

Resources