简体   繁体   中英

Persitant/static login credentials in android app?

Android devices list different login credentials in the settings under "accounts". How do I get my app to save the user login credentials there or utilize that function in my app?

To do this, you would use AccountManager along with your implementations of AbstractAccountAuthenticator and AccountAuthenticatorActivity .

Disclaimer: I do not recommend attempting this if you are a beginning Android programmer.

This is the best article on the internet for using AccountManager with custom accounts and authentication: Write your own Android Authenticator

The Android documentation has some good training articles about how to do this. I'd recommend you check them out.

Basically, you need to implement a custom AbstractAccountAuthenticator that provides your authentication logic, specify the authenticator service in your manifest, and then you will be able to provide accounts and authentication through the system UI.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM