Google Play Developer Distribution Agreement Due Tomorrow

Every once in a while, Google updates theGoogle PlayDeveloper Distribution … more

LG to Release Octa-Core “Nuclun” SoC in the LG G3 Screen

LG is set to follow the likes of Samsung and other manufacture its own … more

Lockdown Pro 2 Brings Material Design and Media Support

Back in March of this year, we took a look at a rather innovated security application … more

Mural Watchface Brings 500px to Android Wear

On a traditional watch, you can’t really do too much to change its appearance once … more
Post Reply

[APP][Battery Saving] NFC Auto ON/OFF - GPS Auto ON/OFF [21 Jul 14]

OP bmdjdd1105

22nd July 2014, 12:57 PM   |  #1  
OP Account currently disabled
Thanks Meter: 16
 
17 posts
Join Date:Joined: Jul 2014
Donate to Me
More
Tasker and Secure Settings


TaskerSecure Settings



I use these 2 apps to simplify the process of using Google Wallet and Maps as well as to save battery. Additionally, leaving NFC on is more of a security risk anyway. What this guide will show you is how to set up Tasker to enable NFC automatically for you when you launch Google Wallet and to enable the GPS when you use Google Maps. Whats cool is as soon as you exit the each program, it will turn NFC off or GPS off. It's great because it eliminates various annoying steps.


BEFORE YOU BEGIN, INSTALL BusyBox BY STERICSON!!




INSTRUCTIONS:

1. Download and Install Tasker and Secure Settings
2. Open Secure Settings
3. Once open, click System+ at the Top - See below

System +

4. You should now be at the following Screen where it says Disabled with an X at the bottom - See below


5. Click Disabled to Enable this module (This requires root and if you have SuperUser or SuperSU, you will be prompted to grant Root Access)

Super User Request

6. Grant Root Permissions if this applies
7. If all Goes well, the module will be enabled - See below


8. Reboot the phone
9. Upon complete reboot process, open tasker
10. Click on Tasks - See below


11. Click the + at the bottom of the screen
12. Name the task NFC On as seen below


13. You will now be at the task Edit Screen, hit the + at the bottom again
14. You will see a Select Action Category Box -> select Plugin - see below


15. You will see Select Plugin Action Category Box -> select Secure Settings - see below


16. The Action edit Screen will open -> Click the pencil in the upper right corner - see below


17. All Actions will open up -> click System+ Actions - see below


18. Scroll down the list and click NFC
19. Make sure on is selected and hit the save button to the left the X - see below


20. You will come back to the task Edit Page - see below


21. Hit the softui back button 2x at the bottom of the screen until you see the Task in the list that you just created - (YOU WILL ONLY SEE NFC ON BECAUSE THATS ALL YOU CREATED SO FAR) - see below


22. Reapeat the same steps to Create NFC Off, GPS On and GPS On. Ensure you select the proper state such as on and off as it applies - see below

ON:





OFF:


32. Now you will Create the Profiles, in other words, picking the Apps that you want to use
33. Go to the profiles Tab of tasker - see below


34. A Box will pop up -> select Application - see below


35. Select Google Wallet for the NFC On/Off Tasks - see below


36. Hit the softui Back button at the bottom and a task window will appear - see below


37. Select NFC On from the list and you should see the below output


38. Long Press on NFC On and a Menu will pop up - see below


39. Click Add Exit task and select NFC Off
40. You will now have the output as seen below


41. Make Sure the profile is on and you are complete!!
42. If you would like to add Maps complete the same steps as above, if you are good with what you have then you are done!!




It looks like a lot of steps but trust me its not that bad. Its easy once you get used to it!!! Enjoy and if this helped you hit the thanks button!
Last edited by bmdjdd1105; 22nd July 2014 at 04:25 PM.
The Following 6 Users Say Thank You to bmdjdd1105 For This Useful Post: [ View ]
22nd July 2014, 02:21 PM   |  #2  
nest75068's Avatar
Senior Member
Flag Dallas
Thanks Meter: 120
 
908 posts
Join Date:Joined: Feb 2012
More
You forgot the part that it requires Busy Box as well for Secure Settings - Just FYI

Also if you want a more accurate location based for Maps, why not enable Location - High Accuracy and then Battery saving as the off action?
Last edited by nest75068; 22nd July 2014 at 02:48 PM.
The Following User Says Thank You to nest75068 For This Useful Post: [ View ]
22nd July 2014, 08:24 PM   |  #3  
OP Account currently disabled
Thanks Meter: 16
 
17 posts
Join Date:Joined: Jul 2014
Donate to Me
More
Quote:
Originally Posted by nest75068

You forgot the part that it requires Busy Box as well for Secure Settings - Just FYI

Also if you want a more accurate location based for Maps, why not enable Location - High Accuracy and then Battery saving as the off action?

Thanks for pointing that out, I added it to the OP
25th July 2014, 04:38 PM   |  #4  
Junior Member
Thanks Meter: 1
 
25 posts
Join Date:Joined: Feb 2013
Problem with just turning the GPS off as soon as you switch away from maps to something else, when you switch back you'll get an 'enable gps' message from maps.

Here was my solution:


Tasks:
'GPS on'
1. Variable Set
%GPSStateWanted, 1
2. If %GPS ~ Off
3. GPS on (use secure settings for this)
4. Flash
GPS on
5. Else
6. Flash
GPS was already on.
7. End if


Task: GPS off
1. Variable Clear
%GPSStateWanted
2. If %GPS ~ On
3. Flash
GPS countdown started
4. For
%countdown, 69:0
5. If %GPS ~ On
6. If %GPSStateWanted = 0
7. Flash
GPS countdown %countdown IF %countdown < 4
8. Wait 0, 1, 0, 0 (1 sec)
9. End if
10. End if
11. End if
12. If %GpsStateWanted != 1
13. GPS Off (use secure settings)
14. Flash
GPS off
15. Else
16. Flash
GPS countdown: GPS still needed
17. End if
18 End if


After testing manually that GPS on does turn on the GPS, and that GPS off then does turn the GPS off after a minute or so, then create a profile

Profile:
'GPS On'
App selection: Maps, Naviation, Tripadvisor
Green arrow action: GPS on
Red Array action: GPS off


Reason I didn't have a single wait is that I wanted the abort countdown to happen immediately otherwise you run the risk of things getting confused (e.g. a wait 69 would just potentially have GPS off/on/off/on all queued up - I want tasks to stop asap so that the next can trigger).
Last edited by ohmegosh; 25th July 2014 at 04:41 PM.
25th July 2014, 07:49 PM   |  #5  
nest75068's Avatar
Senior Member
Flag Dallas
Thanks Meter: 120
 
908 posts
Join Date:Joined: Feb 2012
More
Quote:
Originally Posted by ohmegosh

Problem with just turning the GPS off as soon as you switch away from maps to something else, when you switch back you'll get an 'enable gps' message from maps.

Here was my solution:


Tasks:
'GPS on'
1. Variable Set
%GPSStateWanted, 1
2. If %GPS ~ Off
3. GPS on (use secure settings for this)
4. Flash
GPS on
5. Else
6. Flash
GPS was already on.
7. End if


Task: GPS off
1. Variable Clear
%GPSStateWanted
2. If %GPS ~ On
3. Flash
GPS countdown started
4. For
%countdown, 69:0
5. If %GPS ~ On
6. If %GPSStateWanted = 0
7. Flash
GPS countdown %countdown IF %countdown < 4
8. Wait 0, 1, 0, 0 (1 sec)
9. End if
10. End if
11. End if
12. If %GpsStateWanted != 1
13. GPS Off (use secure settings)
14. Flash
GPS off
15. Else
16. Flash
GPS countdown: GPS still needed
17. End if
18 End if


After testing manually that GPS on does turn on the GPS, and that GPS off then does turn the GPS off after a minute or so, then create a profile

Profile:
'GPS On'
App selection: Maps, Naviation, Tripadvisor
Green arrow action: GPS on
Red Array action: GPS off


Reason I didn't have a single wait is that I wanted the abort countdown to happen immediately otherwise you run the risk of things getting confused (e.g. a wait 69 would just potentially have GPS off/on/off/on all queued up - I want tasks to stop asap so that the next can trigger).

Why not just use secure settings to set it to turn on HighAccuracy lcoation mode and then turn it off? This way you avoid the whole GPS issue since it can rely on other factors to pinpoint location in the case that GPS hasn't locked on yet.

That's what I'm using and never have an issue with maps saying enable GPS when I switch from Maps to any app and then back
25th July 2014, 08:38 PM   |  #6  
Junior Member
Thanks Meter: 1
 
25 posts
Join Date:Joined: Feb 2013
Quote:
Originally Posted by nest75068

Why not just use secure settings to set it to turn on HighAccuracy lcoation mode and then turn it off? This way you avoid the whole GPS issue since it can rely on other factors to pinpoint location in the case that GPS hasn't locked on yet.

That's what I'm using and never have an issue with maps saying enable GPS when I switch from Maps to any app and then back

For navigation, if you aren't in either gps or high accuracy then the navigation will get cancelled with warnings.
25th July 2014, 09:16 PM   |  #7  
Member
Flag Mason, Ohio
Thanks Meter: 32
 
89 posts
Join Date:Joined: Nov 2013
More
I've had tasker for a while now, and only made simple tasks here and there. I control gps and the such with an app called trigger.

I do remember that there was a way to export your profiles out of tasker. If you could do that, and then post it here, it could make it a lot easier for users to benefit from your work.

I'm all for tapping away at my phone getting the settings working, but hey, not everyone will be down with that..
27th July 2014, 12:34 AM   |  #8  
Senior Member
Thanks Meter: 90
 
536 posts
Join Date:Joined: Oct 2010
The GPS part of this is kinda pointless. Android already puts GPS to sleep after a some period if no app is using it. If you want to save battery you are probably better off with Greenify - force it to shut down Maps, don't use Google now, etx

Post Reply Subscribe to Thread

Tags
battery saver, gps, nfc, secure settings, tasker
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in G3 Themes and Apps by ThreadRank