Get Currently Active User In Android
I'm looking for a way to get the current active user in Android. I'm building a system app so I can use hidden methods, but specifically it has to be the current ACTIVE user, and n
Solution 1:
So I found a method that does exactly what I need it to do. There is a static method in ActivityManager that is hidden (so you need to work some magic to have access to it) but here it is:
ActivityManager.getCurrentUser();
That's all there is to it.
Post a Comment for "Get Currently Active User In Android"