I'm writing a quick app that sends my phone into sleep when I turn the screen off, according to Spare Parts my phone has been awake more than 2x as long as the screen has actually been on >.<
It isn't working because PackageManager isn't letting me use the permission, it outputs
Is there a way to get this to run on a non-rooted phone?
It isn't working because PackageManager isn't letting me use the permission, it outputs
Code:
PackageManager: Not granting permission android.permission.DEVICE_POWER to package com.v1nsai.dataoff (protectionLevel=2 flags=0x44)
Is there a way to get this to run on a non-rooted phone?