I can set a boolean flag in SharedPreferences to mark if the app is launched for the first time by the user. But the problem is: SharedPreferences can be cleared from Settings by the user, and some utility apps also ask user to clear app data when disk is almost full. My app will send is_new_user
to server side to calculate some stats, so whether the flag is accurate is very important.
Is there any way I can write per-app data that cannot be cleared by user? If this is not possible, how can I make sure the is_new_user
as accurate as possible?