简体   繁体   中英

Pro-grammatically create User/Guest accounts in android

I am trying to create User / Guest account in android pragmatically.

I have a JSON file defining number of user for an application.

When app initiates it creates/adds new user OR guest account to android device.

Once created, I want to get list of guest added and switch between account from app only ie when some one clicks on the user, account is switched like it switches when we do from system bar icons.

Can this be achieved through changes in AOSP as I have flexibility to deploy custom ROM.

I am not able to get any document over Developer site, which states how this can be achieved.

Use android.os.UserManager to create users

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