Switch device's account on Android
-
I'm looking for functionality to switch the device's user account from an app. Like described here: https://stackoverflow.com/questions/42487602/android-how-to-programmatically-switch-users-by-user-name
This requires on one side
DevicePolicyManager.switchUser()
to do the switch and on the other it seems like the app has to be an admin app, like described here https://developer.android.com/guide/topics/admin/device-adminHow to do this with QT?
-
Hi and welcome to devnet,
For the first one, you will likely need something like QAndroidJniObject.
As for the second, you will have to follow the procedure described in the documentation you linked.
On a side note, it's Qt. QT stands for Apple QuickTime which is not what you are looking for.
-
In addition what @SGaist said, there are no direct Qt framework classes exist do the same. You need to write native code to achieve this. Using JNI methodology you should call the native code from Qt side.
-
You can do that using the "Topic Tools" button.