ArminKH
Well-Known Member
Hello every body
I am going to develop an app which is a security app like locker apps
By using this app we can lock each place of our phone such as gallery,file manager,etc...
Now i want to Get package name for every app which is started by user and must be unlocked after user entered correct pass or pattern ,...
Here is my code
By using this code we can get package name for each running app but not worked on android +5 without any error and just return luncher package name
Tnx all
I am going to develop an app which is a security app like locker apps
By using this app we can lock each place of our phone such as gallery,file manager,etc...
Now i want to Get package name for every app which is started by user and must be unlocked after user entered correct pass or pattern ,...
Here is my code
B4X:
Dim R As Reflector
R.Target=R.GetContext
ActMan = R.RunMethod2("getSystemService","activity","java.lang.String")
Dim TaskInfo As JavaObject = ActMan.RunMethod("getRunningTasks",Array As Object(1))
Dim CompInfo As JavaObject = TaskInfo.RunMethodJO("get",Array As Object(0)).GetField("topActivity")
Dim PackageName As String = CompInfo.RunMethod("getPackageName",Null)
Log(PackageName)
Tnx all