Question

A month ago I asked this question. Even with a Bounty nobody came up with a better answer then using the Imei of the device to identify the user and then sync the phone with the server.

Now I stumbled across the Android AccountManager classes. Would it be possible to use this classes to store a username and a password that could be accessed after a delete/reeinstall cycle of my application?

If yes how would I do this? And would that require the user to enter its keystore credentials every time the application runs and the keystore isn't opened already?

Was it helpful?

Solution

I don't think so. In my experiments accounts are deleted if the package containing the authenticator that creates them is deleted.

OTHER TIPS

I am fairly new to Android, but I think your goal can be accomplished by using two Managers together.

First, you use the AccountManager to perform the necessary association of credentials and network resources.

Second, you use the BackupManager to save your application specific AccountManager records to the cloud. If your app is ever deleted, by virtue of Google Market tracking your app should be restored to the device, and through your app's implementation of BackupManager all the prior AccountManager records as well.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top