Hi,
We have integrated Urban Airship SDK and enabled push notification. We are using message center feature for messages. Push notification and messages are being received as expected. We have enabled named user also to be in sync between different devices of same user. But if we uninstall the app and reinstall the same app and login as same user, the message center messages are not retained in Android. Instead, we are seeing empty message center after reinstall for same user. But, the iOS app is retaining the messages for the same user even if the app is uninstalled and installed again. Is this a limitation in android or Is there a way to retain the messages for the same named user in the same device in android?
Below is the code snippets we are using for named user. Immediately after user logs in to the app successfully, we register the named user.
UAirship.shared().getNamedUser().setId( <our unique user identifier> );
UAirship.shared().getNamedUser().forceUpdate();
When user logout of the app, we are removing the named user using the below code:
UAirship.shared().getNamedUser().setId(null);
UAirship.shared().getNamedUser().forceUpdate();
However, in the above scenario we are not even doing logout of the user. Instead, we uninstalled the app after user logged in successfully. Please let us know if there is anything wrong with what we are doing and if there is a way to achieve this?
Comments
4 comments