问题
The documentation for the setUserProperty on FirebaseAnalytics states that the property "persists throughout the app lifecycle and across sessions."
What exactly does "app lifecycle" mean here? Does it mean until a user uninstalls the app or would force killing the app reset the property values?
回答1:
It means that once user property is set the value will be retained until the app is uninstalled. Closing the app or killing the app process by swiping it off the recent apps list will not clear the value.
Also once user property is set its global. That means data logged from any of the app processes will have the value associated with it. For example if you have background process running for your app and you set the value from the UI process it will be associated with all events logged from the background process as well.
You can change the user property value with another setUserProperty call. To clear the value call setUserProperty with null value.
来源:https://stackoverflow.com/questions/41817325/firebase-analytics-setuserproperty-persists-through-app-lifecycle