Search code examples
androidprofileandroid-4.2-jelly-bean

android - how to create multiple user profile in jelly bean by code?


In Jelly beans now you can add multiple user profile, i want this feature in my app but want to create/add multiple profile programmatically.

Is it possible?

Help me to get out of this.


Solution

  • Yes, this is possible, provided the device is rooted, and running only 4.1. Even then, it is an unofficial method that relies on executing terminal commands in a root shell.

    I wrote the User Management app when this feature was originally discovered, and then later open sourced it in the interests of helping others. You can find the code on GitHub here.

    Other than executing commands in a root shell, there is no method of achieving this AFAIK. The Android SDK does not provide any APIs for creating additional users.