문제

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?

도움이 되었습니까?

해결책

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

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top