PACKAGE_USAGE_STATS exception

TLR786

New member
Hi

when I try to call getAllPkgUsageStats(); function of IUsageStats package I get this exception.

ERROR/AndroidRuntime(7413): java.lang.RuntimeException: Unable to create service org.gps.CPUusage: java.lang.SecurityException: Neither user 10081 nor current process has android.permission.PACKAGE_USAGE_STATS.

I have already included PACKAGE_USAGE_STATS permission in my manifest file
Can anyone please tell me why this exception is occurring. Thanks in advance.
 
Back
Top