Android Question UsageStatsManager

MarcoRome

Expert
Licensed User
Longtime User
Hi all. If i write this line in Javaobject:

B4X:
Dim jo As JavaObject
Log(jo.InitializeStatic("android.app.usage.UsageStatsManager").RunMethodJO("isAppInactive",Array As String("b4a.example")))

i have this error:


THIS IS DOCUMENTATION

Where :




Where i wrong ?
Thank you
 

MarcoRome

Expert
Licensed User
Longtime User
Thank you Erel , now work. But with Android 5.1.1 i have this message:

java.lang.RuntimeException: Method: isAppInactive not found in: android.app.usage.UsageStatsManager

with Android 6.0.1 work without problem.

Any idea ?
Thank you
Marco
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…