I been trying to make my device restart using my niotron ide Extension.
Here is the block
import android.os.PowerManager;
@SimpleFunction(description = "Restarts the device")
public void RestartDevice() {
PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
if (pm != null) {
pm.reboot("App initiated restart");
}
}
And it need this permission
android.permission.REBOOT
But it doesn’t grant, why? It exist but it doesn’t restart due the the permission that hasn’t grant. Is it because it needs the device needed root or the permission needed to be granted?
The answer remains unchanged from my previous post. The requested permissions are unavailable; they are reserved exclusively for system or firmware applications.