Wednesday, April 29, 2015

4.2 jelly bean - How do I enable Airplane mode using Tasker on Android 4.2.2?



How do I enable airplane mode automatically at 01:00 AM using Tasker on Android 4.2.2?


The Airplane mode setting inside Tasker under Action -> Net -> Airplane mode cannot be activated:



Airplane mode is not available in Android 4.2+, try the Secure Settings plugin and a rooted device.



My device is rooted. How do I properly use the Secure Settings plugin to enable Airplane mode automatically at the said time?



Answer



Notes:





  • The answer is tested on a rooted Android 4.2.1 running Tasker v4.6u3m and Secure Settings v1.3.6.




  • Secure Settings may needs to be installed as a System app (it has the provision under SYSTEM+ in its GUI).






Since you're already aware of making profiles, tasks, and actions, I would come to point:



  1. Make a profile having time as the context, and create a new task in it.


  2. Under that Task, the action would be Plugin → Secure Settings → Configuration (pencil icon) → System+ Actions → Airplane Mode → On → Save (floppy icon), and save your action under the task.


Now whenever the time would come Tasker would execute Airplane mode, and everyone would be happy!


You can automatically disable the Airplane Mode as well, by choosing Off or Toggle over On in the aforesaid step.




For Readers: If you don't happen to have Secure Settings or it's not working somehow, then you can use the following action as an alternative. (Credits to Andrew T. and DavisNT for their answer)


Action: Code → Run Shell, and enter these details:



  • Command: settings put global airplane_mode_on 1; am broadcast -a android.intent.action.AIRPLANE_MODE --ez state true

  • Check Use Root



That would execute the Airplane mode based on your profile.


To automatically disable the said mode, create an another action in a different profile and copy the aforesaid action with exception of 0 over 1 and false over true.


You're good to go now!


No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...