I'm using Firebase on my Android app & iOS.
When the user start the app, I create an anonymous user. On iOS when you delete the app Firebase will get the last user because its store the session inside the device's keychain.
On Android when I delete and reinstall my app, the user is always null using :
FirebaseAuth.getInstance().currentUser
I have search the web and found that it might be possible using android:allowBackup="true" in the app's manifest. But this has no effect on my app.
This my application manifest :
<application
android:networkSecurityConfig="@xml/network_security_config"
android:allowBackup="true"
android:allowClearUserData="false"
android:hardwareAccelerated="true"
android:fullBackupContent="true"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:label="@string/app_name"
android:supportsRtl="true"
android:largeHeap="true"
android:theme="@style/AppTheme">
...
Any ideas on how I can keep the user between app deletion ? Wether it is an anonymous or a sign up user ? I have implemented dynamic links and invitation, if the user has 2 devices and one on Android he can invites himself all day long just by deleting the application and get rewards for free.