android - Reboot a device from phonegap -
is there way reboot device phonegap/cordova? how go doing this? think may not possible on ipad/iphone on androids.
first can't done unless device rooted/jailbreaken (depending talking android or ios).
now comes fun part if have rooted/jailbreaken device not able unless can java/objective c development.
basically phonegap plugin don't exist because functionality not needed unless doing phone on basic level. but if have enough knowledge can self. phonegap plugin can created easy, , can find more in tutorial. want create simple plugin execute java/objective c code when need it.
android/java example :
try { process proc = runtime.getruntime().exec(new string[] { "su", "-c", "reboot" }); proc.waitfor(); } catch (exception ex) { log.i(tag, "could not reboot", ex); }
ios/objective c example
unfortunately don't have experience functionality on ios need trust answer.
Comments
Post a Comment