PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV Mobile 2024 → Reboot android
Reboot android
Débuté par Bugalete Nicu, 19 mai 2015 09:45 - Aucune réponse
Posté le 19 mai 2015 - 09:45
Hello ,is there a way that i i can remot my device? i tryed the following code but no luck :
My device is not rooted,

try {
Process proc = Runtime.getRuntime().exec(new String[] { "su", "-c", "reboot" });
proc.waitFor();
} catch (Exception ex) {
Log.i(TAG, "Could not reboot", ex);
}

i tryed :


PowerManager pwrMgr = (PowerManager)getApplicationContext().getSystemService(Context.POWER_SERVICE);
pwrMgr.reboot(null);