I am using Firebase Remote Config feature to fetch some parameters required by the application. The parameter values depends on the userProperty which I have defined in the user properties tab in the Analytics section in Firebase.
Now, I want to get the parameter value for which the particular user property is true. I have defined condition using that user property. For example, lets say that the user property screen_size is what I have a defined condition for, such as if screen_size matches AxB then set a parameter named mqtt_chat_enabled to true and the default value is false.
When I fetch the remote config, I am getting the default value of mqtt_chat_enabled even if the screen_size is AxB.
The question is, how do we send the condition parameters when fetching the remoteConfig?
I tried using setUserProperties method before fetching remoteConfig, but it's not working.
I am not getting anything for this on the web. Please help.
I was also facing the same problem. It turns out be issue with the firebase version. Upgrade your google play services and latest version of firebase, it should work then.
I am using firebase version 10.2.0
Related
I have an app that sync data with my API.
I want this app have a dynamic "google-service.json", I want to pass the google-service.json after the app.APK is ready and the app is installed on the device through my API.
Is possible ?
I did a generic "google-service.json" that change the values when I send data from my API to the installed app on the device but the Firebase connection is not working.
Any ideas ?
What you're asking isn't possible. The values from google-services.json are read at build time and added to your APK. There's no way to go back and changes those values later.
If you want to initialize Firebase based on values that can only be known when the app is launched, then you should NOT apply the google-sevices plugin in build.gradle, and instead call FirebaseApp.initializeApp() manually and pass the correct values that you see in google-services.json.
Read:
https://firebase.googleblog.com/2017/03/take-control-of-your-firebase-init-on.html
https://developers.google.com/android/guides/google-services-plugin
I'm working on my project and making an android app using Cognito for user management.
I tried to use it as user database so I made some custom fields like age and picture_url. But I cannot find a way to change the value of a custom field. I found the code to delete the value of field but couldn't find the one to register to an existing user.
Is it impossible to change the value of a custom field from android or lambda in python so that I need to switch to RDS to store user information?
The Python SDK method which should work for this is CognitoIdentityProvider.Client.update_user_attributes (Python SDK AWS Docs)
For the attribute name be sure to prefix it with custom: (custom:age and custom:picture_url for the attributes you mentioned). The custom prefix is mentioned here: AWS Docs: Configuring User Pool Attributes
If you are using Client based access be sure the Client has access to modify the custom attributes. I don't believe clients which exist prior to the custom attribute being created automatically have access to modify the newly created attribute.
I had integrated Firebase analytics in Android few months back.
Initially I was setting the user_id wrongly, by using the following code :
mFirebaseAnalytics.setUserProperty("userId", "<value_of_type_1_for_user_id>");
As a result my user_id column in bigquery was null. Hence on my next release, I corrected it and used the following method :
mFirebaseAnalytics.setUserId("<value_of_type_2_for_user_id>");
This created a problem as all those users who had installed/used the app between those two release dates have an extra user property key named "userId". And this has some wrong values of user_id.
Now, another strange thing that has happened is that there are many new users who are onboarding the platform now with the latest version of APK. A small percent of these users still have the malicious key of "userId" under user_properties.
I need help in understanding the following :
- Understanding the reason behind why new users (a random small group of them) are still being affected by this wrong mapping ?
- How to clean up the user property field of old users by removing this property key for all users.
You can set the user property "userId" to null/empty and the user property will be removed from the future events. User property will stick with events until you explicitly remove it.
For example I expect this kind of situation: data in my application lost relevance and so it usless until update. And until update it have to show users some predefined message.
Is here any simple and free solution to this task?
Guess I can use some server to somehow send simple messages... but it sounds way too complicated.
If this is important I use Xamarin.
Update: main difficulty here is fact - my application can't in any way define if it's outdated or not. This may happen in random moment.
Although the requirement is not very clear I assume Update here means app update.
each time user launches app make call to an api on ur server to check if user needs to update app
If that returns true take user to a static view that says app needs update and redirects user to google play to install updates
If you want to avoid using a server, you should try Firebase (https://firebase.google.com/). More specifically, you should use Firebase Remote Config (https://firebase.google.com/features/remote-config/).
Define in a key-value pair of something like minimum_app_version_required in Firebase Remote Config. Every time user opens the your app, compare the values of app version and minimum_app_version_required that you are getting from Firebase console and show a dialog box accordingly. You can also change the value of minimum_app_version_required anytime you want.
Just set some internal flag. That when that situation occurs, you can set the flag to true and just edit whatever layout element you are using such as listView or any other element with your predefined messages saved in strings.xml. You can also build any custom pop up screen, depends how you want to show them. Let me know if you didn't understand or exactly how you want?
Need to implement versioning for this problem. To achieve this, you have to maintain a version number in server, this is the version number you app will have to save and use it to validate with server. If both are not same, then app will get the latest data from the server.
I'm trying to retrieve the people in a user's circle that have installed the current application.
I have used the sample application "PlusSampleActivity" provided in the SDK and successfully managed to get the list of all people in the user's circles.
However, I'm not sure how to get if the person have installed the application or not. The documentation available seems to be very limited...
What I have found is
https://developer.android.com/reference/com/google/android/gms/plus/model/people/Person.html
I'm using below function but this is always returning false. (I have created a user that have installed the app and I can see this when visiting the user's profile on the web using Google+)
Is there some other API that should be used? Or some way to debug this better?
public abstract boolean isHasApp ()
If "true", indicates that the person has installed the app that is
making the request and has chosen to expose this install state to the
caller. A value of "false" indicates that the install state cannot be
determined (it is either not installed or the person has chosen to
keep this information private).
UPDATED
Seems like the hasapp field is not even included in the response?
When trying the API on below link, I never succeed to have the hasapp included in the response... Any suggestions what I might be doing wrong??
https://developers.google.com/apis-explorer/#p/plus/v1/plus.people.get
(I posted the same question on Google groups, here)
Unfortunately, the hasApp field doesn't get filled in the response - it's actually a legacy field from an older API. The best way of matching is to keep track of installed users in your database with their Google IDs, and compare that to the IDs in the people.list response.
The documentation should be updated to reflect this soon, sorry for the confusion!