[ZenFone 2 Android Development] tomg09:
Whoops. Sorry for the lag time. Sure. Disclaimer: I haven't had this running on the zenfone, just previous devices (Galaxy SIII being the last). I've also seen other things like this online in the past. They may or may not have been inspiration for this (can't remember if/what I looked at while creating this). So if it looks like it's been done before, it probably has. It requires root (Tasker and the profile), and an app called Secure Settings.

Profile activates on screen off, not plugged in, and battery between 85% and 0%, and runs a task that turns off wireless communication, except cellular if there's signal, waits 14 min, turns on wireless, waits 30 seconds, and repeats the loop. The exit task for this profile turns everything back on.

I also have a separate task which toggles Wifi AP at the press of a screen icon. If the AP is on, I disable this profile through a variable called %WIFIAP, so when you see that variable, that's what it is. Code to follow.

<TaskerData sr="" dvi="1" tv="4.7u3m">
<Profile sr="prof3" ve="2">
<cdate>1379023481441</cdate>
<edate>1438468251440</edate>
<id>3</id>
<mid0>4</mid0>
<mid1>11</mid1>
<nme>Battery Helper</nme>
<State sr="con0" ve="2">
<code>140</code>
<Int sr="arg0" val="0"/>
<Int sr="arg1" val="85"/>
</State>
<State sr="con1" ve="2">
<code>10</code>
<pin>true</pin>
<Int sr="arg0" val="0"/>
</State>
<State sr="con2" ve="2">
<code>123</code>
<Int sr="arg0" val="0"/>
</State>
</Profile>
<Task sr="task11">
<cdate>1379943492211</cdate>
<edate>1438468245070</edate>
<id>11</id>
<nme>Batt Helper Exit</nme>
<pri>10</pri>
<rty>1</rty>
<Action sr="act0" ve="7">
<code>37</code>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%WIFIAP</lhs>
<op>0</op>
<rhs>AP</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act1" ve="7">
<code>137</code>
<Int sr="arg0" val="0"/>
<Str sr="arg1" ve="3"/>
</Action>
<Action sr="act10" ve="7">
<code>38</code>
</Action>
<Action sr="act11" ve="7">
<code>549</code>
<Str sr="arg0" ve="3">%WIFION</Str>
<Int sr="arg1" val="0"/>
</Action>
<Action sr="act12" ve="7">
<code>549</code>
<Str sr="arg0" ve="3">%BATHLP</Str>
<Int sr="arg1" val="0"/>
</Action>
<Action sr="act13" ve="7">
<code>137</code>
<Int sr="arg0" val="0"/>
<Str sr="arg1" ve="3">Toggle Web Every 15 Min</Str>
</Action>
<Action sr="act14" ve="7">
<code>137</code>
<Int sr="arg0" val="0"/>
<Str sr="arg1" ve="3"/>
</Action>
<Action sr="act2" ve="7">
<code>38</code>
</Action>
<Action sr="act3" ve="7">
<code>37</code>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%AIR</lhs>
<op>2</op>
<rhs>on</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act4" ve="7">
<code>11820</code>
<Bundle sr="arg0">
<Vals sr="val">
<com.intangibleobject.securesettings.plugin.extra.BLURB>Airplane Mode Disabled</com.intangibleobject.securesettings.plugin.extra.BLURB>
<com.intangibleobject.securesettings.plugin.extra.BLURB-type>java.lang.String</com.intangibleobject.securesettings.plugin.extra.BLURB-type>
<com.intangibleobject.securesettings.plugin.extra.ENABLED>false</com.intangibleobject.securesettings.plugin.extra.ENABLED>
<com.intangibleobject.securesettings.plugin.extra.ENABLED-type>java.lang.Boolean</com.intangibleobject.securesettings.plugin.extra.ENABLED-type>
<com.intangibleobject.securesettings.plugin.extra.SETTING>airplane_mode</com.intangibleobject.securesettings.plugin.extra.SETTING>
<com.intangibleobject.securesettings.plugin.extra.SETTING-type>java.lang.String</com.intangibleobject.securesettings.plugin.extra.SETTING-type>
<com.twofortyfouram.locale.intent.extra.BLURB>Airplane Mode Disabled</com.twofortyfouram.locale.intent.extra.BLURB>
<com.twofortyfouram.locale.intent.extra.BLURB-type>java.lang.String</com.twofortyfouram.locale.intent.extra.BLURB-type>
<net.dinglisch.android.tasker.subbundled>true</net.dinglisch.android.tasker.subbundled>
<net.dinglisch.android.tasker.subbundled-type>java.lang.Boolean</net.dinglisch.android.tasker.subbundled-type>
</Vals>
</Bundle>
<Str sr="arg1" ve="3">com.intangibleobject.securesettings.plugin</Str>
<Str sr="arg2" ve="3">Secure Settings</Str>
<Int sr="arg3"/>
</Action>
<Action sr="act5" ve="7">
<code>30</code>
<Int sr="arg0" val="0"/>
<Int sr="arg1" val="5"/>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
</Action>
<Action sr="act6" ve="7">
<code>38</code>
</Action>
<Action sr="act7" ve="7">
<code>11820</code>
<Bundle sr="arg0">
<Vals sr="val">
<com.intangibleobject.securesettings.plugin.extra.BLURB>Mobile Data Enabled</com.intangibleobject.securesettings.plugin.extra.BLURB>
<com.intangibleobject.securesettings.plugin.extra.BLURB-type>java.lang.String</com.intangibleobject.securesettings.plugin.extra.BLURB-type>
<com.intangibleobject.securesettings.plugin.extra.ENABLED>true</com.intangibleobject.securesettings.plugin.extra.ENABLED>
<com.intangibleobject.securesettings.plugin.extra.ENABLED-type>java.lang.Boolean</com.intangibleobject.securesettings.plugin.extra.ENABLED-type>
<com.intangibleobject.securesettings.plugin.extra.SETTING>mobile_data</com.intangibleobject.securesettings.plugin.extra.SETTING>
<com.intangibleobject.securesettings.plugin.extra.SETTING-type>java.lang.String</com.intangibleobject.securesettings.plugin.extra.SETTING-type>
<com.twofortyfouram.locale.intent.extra.BLURB>Mobile Data Enabled</com.twofortyfouram.locale.intent.extra.BLURB>
<com.twofortyfouram.locale.intent.extra.BLURB-type>java.lang.String</com.twofortyfouram.locale.intent.extra.BLURB-type>
<net.dinglisch.android.tasker.subbundled>true</net.dinglisch.android.tasker.subbundled>
<net.dinglisch.android.tasker.subbundled-type>java.lang.Boolean</net.dinglisch.android.tasker.subbundled-type>
</Vals>
</Bundle>
<Str sr="arg1" ve="3">com.intangibleobject.securesettings.plugin</Str>
<Str sr="arg2" ve="3">Secure Settings</Str>
<Int sr="arg3"/>
</Action>
<Action sr="act8" ve="7">
<code>37</code>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%WIFION</lhs>
<op>2</op>
<rhs>on</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act9" ve="7">
<code>425</code>
<Int sr="arg0" val="1"/>
</Action>
</Task>
<Task sr="task4">
<cdate>1379023499400</cdate>
<edate>1438468251440</edate>
<id>4</id>
<nme>Toggle Web Every 15 Min</nme>
<pri>10</pri>
<rty>1</rty>
<Action sr="act0" ve="7">
<code>37</code>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%WIFIAP</lhs>
<op>0</op>
<rhs>AP</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act1" ve="7">
<code>137</code>
<Int sr="arg0" val="0"/>
<Str sr="arg1" ve="3"/>
</Action>
<Action sr="act10" ve="7">
<code>300</code>
<label>Start</label>
</Action>
<Action sr="act11" ve="7">
<code>425</code>
<Int sr="arg0" val="0"/>
</Action>
<Action sr="act12" ve="7">
<code>37</code>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%WIFIAP</lhs>
<op>1</op>
<rhs>AP</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act13" ve="7">
<code>11820</code>
<Bundle sr="arg0">
<Vals sr="val">
<com.intangibleobject.securesettings.plugin.extra.BLURB>Mobile Data Disabled</com.intangibleobject.securesettings.plugin.extra.BLURB>
<com.intangibleobject.securesettings.plugin.extra.BLURB-type>java.lang.String</com.intangibleobject.securesettings.plugin.extra.BLURB-type>
<com.intangibleobject.securesettings.plugin.extra.ENABLED>false</com.intangibleobject.securesettings.plugin.extra.ENABLED>
<com.intangibleobject.securesettings.plugin.extra.ENABLED-type>java.lang.Boolean</com.intangibleobject.securesettings.plugin.extra.ENABLED-type>
<com.intangibleobject.securesettings.plugin.extra.SETTING>mobile_data</com.intangibleobject.securesettings.plugin.extra.SETTING>
<com.intangibleobject.securesettings.plugin.extra.SETTING-type>java.lang.String</com.intangibleobject.securesettings.plugin.extra.SETTING-type>
<com.twofortyfouram.locale.intent.extra.BLURB>Mobile Data Disabled</com.twofortyfouram.locale.intent.extra.BLURB>
<com.twofortyfouram.locale.intent.extra.BLURB-type>java.lang.String</com.twofortyfouram.locale.intent.extra.BLURB-type>
<net.dinglisch.android.tasker.subbundled>true</net.dinglisch.android.tasker.subbundled>
<net.dinglisch.android.tasker.subbundled-type>java.lang.Boolean</net.dinglisch.android.tasker.subbundled-type>
</Vals>
</Bundle>
<Str sr="arg1" ve="3">com.intangibleobject.securesettings.plugin</Str>
<Str sr="arg2" ve="3">Secure Settings</Str>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act14" ve="7">
<code>38</code>
</Action>
<Action sr="act15" ve="7">
<code>37</code>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%CELLSRV</lhs>
<op>2</op>
<rhs>noservice</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act16" ve="7">
<code>11820</code>
<Bundle sr="arg0">
<Vals sr="val">
<com.intangibleobject.securesettings.plugin.extra.BLURB>Airplane Mode Enabled</com.intangibleobject.securesettings.plugin.extra.BLURB>
<com.intangibleobject.securesettings.plugin.extra.BLURB-type>java.lang.String</com.intangibleobject.securesettings.plugin.extra.BLURB-type>
<com.intangibleobject.securesettings.plugin.extra.ENABLED>true</com.intangibleobject.securesettings.plugin.extra.ENABLED>
<com.intangibleobject.securesettings.plugin.extra.ENABLED-type>java.lang.Boolean</com.intangibleobject.securesettings.plugin.extra.ENABLED-type>
<com.intangibleobject.securesettings.plugin.extra.SETTING>airplane_mode</com.intangibleobject.securesettings.plugin.extra.SETTING>
<com.intangibleobject.securesettings.plugin.extra.SETTING-type>java.lang.String</com.intangibleobject.securesettings.plugin.extra.SETTING-type>
<com.twofortyfouram.locale.intent.extra.BLURB>Airplane Mode Enabled</com.twofortyfouram.locale.intent.extra.BLURB>
<com.twofortyfouram.locale.intent.extra.BLURB-type>java.lang.String</com.twofortyfouram.locale.intent.extra.BLURB-type>
<net.dinglisch.android.tasker.subbundled>true</net.dinglisch.android.tasker.subbundled>
<net.dinglisch.android.tasker.subbundled-type>java.lang.Boolean</net.dinglisch.android.tasker.subbundled-type>
</Vals>
</Bundle>
<Str sr="arg1" ve="3">com.intangibleobject.securesettings.plugin</Str>
<Str sr="arg2" ve="3">Secure Settings</Str>
<Int sr="arg3"/>
</Action>
<Action sr="act17" ve="7">
<code>38</code>
</Action>
<Action sr="act18" ve="7">
<code>30</code>
<Int sr="arg0" val="0"/>
<Int sr="arg1" val="0"/>
<Int sr="arg2" val="14"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
</Action>
<Action sr="act19" ve="7">
<code>37</code>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%AIR</lhs>
<op>2</op>
<rhs>on</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act2" ve="7">
<code>38</code>
</Action>
<Action sr="act20" ve="7">
<code>11820</code>
<Bundle sr="arg0">
<Vals sr="val">
<com.intangibleobject.securesettings.plugin.extra.BLURB>Airplane Mode Disabled</com.intangibleobject.securesettings.plugin.extra.BLURB>
<com.intangibleobject.securesettings.plugin.extra.BLURB-type>java.lang.String</com.intangibleobject.securesettings.plugin.extra.BLURB-type>
<com.intangibleobject.securesettings.plugin.extra.ENABLED>false</com.intangibleobject.securesettings.plugin.extra.ENABLED>
<com.intangibleobject.securesettings.plugin.extra.ENABLED-type>java.lang.Boolean</com.intangibleobject.securesettings.plugin.extra.ENABLED-type>
<com.intangibleobject.securesettings.plugin.extra.SETTING>airplane_mode</com.intangibleobject.securesettings.plugin.extra.SETTING>
<com.intangibleobject.securesettings.plugin.extra.SETTING-type>java.lang.String</com.intangibleobject.securesettings.plugin.extra.SETTING-type>
<com.twofortyfouram.locale.intent.extra.BLURB>Airplane Mode Disabled</com.twofortyfouram.locale.intent.extra.BLURB>
<com.twofortyfouram.locale.intent.extra.BLURB-type>java.lang.String</com.twofortyfouram.locale.intent.extra.BLURB-type>
<net.dinglisch.android.tasker.subbundled>true</net.dinglisch.android.tasker.subbundled>
<net.dinglisch.android.tasker.subbundled-type>java.lang.Boolean</net.dinglisch.android.tasker.subbundled-type>
</Vals>
</Bundle>
<Str sr="arg1" ve="3">com.intangibleobject.securesettings.plugin</Str>
<Str sr="arg2" ve="3">Secure Settings</Str>
<Int sr="arg3"/>
</Action>
<Action sr="act21" ve="7">
<code>38</code>
</Action>
<Action sr="act22" ve="7">
<code>37</code>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%WIFIAP</lhs>
<op>1</op>
<rhs>AP</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act23" ve="7">
<code>11820</code>
<Bundle sr="arg0">
<Vals sr="val">
<com.intangibleobject.securesettings.plugin.extra.BLURB>Mobile Data Enabled</com.intangibleobject.securesettings.plugin.extra.BLURB>
<com.intangibleobject.securesettings.plugin.extra.BLURB-type>java.lang.String</com.intangibleobject.securesettings.plugin.extra.BLURB-type>
<com.intangibleobject.securesettings.plugin.extra.ENABLED>true</com.intangibleobject.securesettings.plugin.extra.ENABLED>
<com.intangibleobject.securesettings.plugin.extra.ENABLED-type>java.lang.Boolean</com.intangibleobject.securesettings.plugin.extra.ENABLED-type>
<com.intangibleobject.securesettings.plugin.extra.SETTING>mobile_data</com.intangibleobject.securesettings.plugin.extra.SETTING>
<com.intangibleobject.securesettings.plugin.extra.SETTING-type>java.lang.String</com.intangibleobject.securesettings.plugin.extra.SETTING-type>
<com.twofortyfouram.locale.intent.extra.BLURB>Mobile Data Enabled</com.twofortyfouram.locale.intent.extra.BLURB>
<com.twofortyfouram.locale.intent.extra.BLURB-type>java.lang.String</com.twofortyfouram.locale.intent.extra.BLURB-type>
<net.dinglisch.android.tasker.subbundled>true</net.dinglisch.android.tasker.subbundled>
<net.dinglisch.android.tasker.subbundled-type>java.lang.Boolean</net.dinglisch.android.tasker.subbundled-type>
</Vals>
</Bundle>
<Str sr="arg1" ve="3">com.intangibleobject.securesettings.plugin</Str>
<Str sr="arg2" ve="3">Secure Settings</Str>
<Int sr="arg3"/>
</Action>
<Action sr="act24" ve="7">
<code>38</code>
</Action>
<Action sr="act25" ve="7">
<code>30</code>
<Int sr="arg0" val="0"/>
<Int sr="arg1" val="30"/>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
</Action>
<Action sr="act26" ve="7">
<code>37</code>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%CELLSRV</lhs>
<op>2</op>
<rhs>noservice</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act27" ve="7">
<code>425</code>
<Int sr="arg0" val="1"/>
</Action>
<Action sr="act28" ve="7">
<code>38</code>
</Action>
<Action sr="act29" ve="7">
<code>30</code>
<Int sr="arg0" val="0"/>
<Int sr="arg1" val="30"/>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
</Action>
<Action sr="act3" ve="7">
<code>547</code>
<Str sr="arg0" ve="3">%BATHLP</Str>
<Str sr="arg1" ve="3">on</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act30" ve="7">
<code>37</code>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%BATHLP</lhs>
<op>3</op>
<rhs>on</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act31" ve="7">
<code>137</code>
<Int sr="arg0" val="0"/>
<Str sr="arg1" ve="3"/>
</Action>
<Action sr="act32" ve="7">
<code>38</code>
</Action>
<Action sr="act33" ve="7">
<code>135</code>
<label>Loop</label>
<Int sr="arg0" val="1"/>
<Int sr="arg1" val="1"/>
<Str sr="arg2" ve="3">Start</Str>
</Action>
<Action sr="act4" ve="7">
<code>37</code>
<ConditionList sr="if">
<Condition sr="c0" ve="3">
<lhs>%WIFI</lhs>
<op>2</op>
<rhs>on</rhs>
</Condition>
</ConditionList>
</Action>
<Action sr="act5" ve="7">
<code>547</code>
<Str sr="arg0" ve="3">%WIFION</Str>
<Str sr="arg1" ve="3">on</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act6" ve="7">
<code>38</code>
</Action>
<Action sr="act7" ve="7">
<code>294</code>
<Int sr="arg0" val="0"/>
</Action>
<Action sr="act8" ve="7">
<code>11820</code>
<on>false</on>
<Bundle sr="arg0">
<Vals sr="val">
<com.intangibleobject.securesettings.plugin.extra.BLURB>GPS Disabled</com.intangibleobject.securesettings.plugin.extra.BLURB>
<com.intangibleobject.securesettings.plugin.extra.BLURB-type>java.lang.String</com.intangibleobject.securesettings.plugin.extra.BLURB-type>
<com.intangibleobject.securesettings.plugin.extra.ENABLED>false</com.intangibleobject.securesettings.plugin.extra.ENABLED>
<com.intangibleobject.securesettings.plugin.extra.ENABLED-type>java.lang.Boolean</com.intangibleobject.securesettings.plugin.extra.ENABLED-type>
<com.intangibleobject.securesettings.plugin.extra.SETTING>gps</com.intangibleobject.securesettings.plugin.extra.SETTING>
<com.intangibleobject.securesettings.plugin.extra.SETTING-type>java.lang.String</com.intangibleobject.securesettings.plugin.extra.SETTING-type>
<com.twofortyfouram.locale.intent.extra.BLURB>GPS Disabled</com.twofortyfouram.locale.intent.extra.BLURB>
<com.twofortyfouram.locale.intent.extra.BLURB-type>java.lang.String</com.twofortyfouram.locale.intent.extra.BLURB-type>
<net.dinglisch.android.tasker.subbundled>true</net.dinglisch.android.tasker.subbundled>
<net.dinglisch.android.tasker.subbundled-type>java.lang.Boolean</net.dinglisch.android.tasker.subbundled-type>
</Vals>
</Bundle>
<Str sr="arg1" ve="3">com.intangibleobject.securesettings.plugin</Str>
<Str sr="arg2" ve="3">Secure Settings</Str>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act9" ve="7">
<code>11820</code>
<Bundle sr="arg0">
<Vals sr="val">
<com.intangibleobject.securesettings.plugin.extra.BLURB>NFC Disabled</com.intangibleobject.securesettings.plugin.extra.BLURB>
<com.intangibleobject.securesettings.plugin.extra.BLURB-type>java.lang.String</com.intangibleobject.securesettings.plugin.extra.BLURB-type>
<com.intangibleobject.securesettings.plugin.extra.ENABLED>false</com.intangibleobject.securesettings.plugin.extra.ENABLED>
<com.intangibleobject.securesettings.plugin.extra.ENABLED-type>java.lang.Boolean</com.intangibleobject.securesettings.plugin.extra.ENABLED-type>
<com.intangibleobject.securesettings.plugin.extra.SETTING>nfc</com.intangibleobject.securesettings.plugin.extra.SETTING>
<com.intangibleobject.securesettings.plugin.extra.SETTING-type>java.lang.String</com.intangibleobject.securesettings.plugin.extra.SETTING-type>
<com.twofortyfouram.locale.intent.extra.BLURB>NFC Disabled</com.twofortyfouram.locale.intent.extra.BLURB>
<com.twofortyfouram.locale.intent.extra.BLURB-type>java.lang.String</com.twofortyfouram.locale.intent.extra.BLURB-type>
<net.dinglisch.android.tasker.subbundled>true</net.dinglisch.android.tasker.subbundled>
<net.dinglisch.android.tasker.subbundled-type>java.lang.Boolean</net.dinglisch.android.tasker.subbundled-type>
</Vals>
</Bundle>
<Str sr="arg1" ve="3">com.intangibleobject.securesettings.plugin</Str>
<Str sr="arg2" ve="3">Secure Settings</Str>
<Int sr="arg3" val="0"/>
</Action>
</Task>
</TaskerData>