0

I'm making app with using Xamarin.forms.

I want to store UUID in phone which is generated from server. And it must not be deleted even when app's uninstalled. This is very common way on iOS. (saving in Keychain)

So, I add Xamarin.Auth and wrote code like this. https://developer.xamarin.com/recipes/cross-platform/xamarin-forms/general/store-credentials/

It works great on iOS. Value is saved after app's uninstalled.

But on Android. It's gone when app's uninstalled! What the heck is this?

And I saw this link. Android: Save file permanently (even after clear data / uninstall)

Is it Xamarin.Android's bug or it is regular behavior?

Thanks.

Community
  • 1
  • 1
Bright Lee
  • 2,306
  • 2
  • 27
  • 55

1 Answers1

1

As pointed in that post, in Android there ins't a native approach to save things after application is uninstalled. When the application is removed every data within it should be removed.

Doing that without user consent is a bad ideia too.

Anyway, you could try to save some data in the user SD card, but if the user don't have SD you're done. Maybe there are some hacks, or with root you could save in internal storage, but I not recommend that.

jzeferino
  • 7,700
  • 1
  • 39
  • 59
  • Thanks again @jzeferino. OK. I will have to get Device's some id instead uuid generated from server. – Bright Lee Jul 14 '16 at 05:09
  • Hi, @jzeferino If you don't mind, could you look my new quetion? I'm trying really hard but result is not good. http://stackoverflow.com/questions/38963497/binding-ios-embedded-framework-for-xamarin-end-up-give-exception – Bright Lee Aug 15 '16 at 22:04