The app is continuously using the location service

dreamily9724

New member
The only macro I can think of that needs permission to the location is the "Disable Wi-Fi If not connected" macro. Is there any way to reduce the usage of the location service?
 

Attachments

  • Screenshot_2023-07-22-02-36-28-969_.jpg
    Screenshot_2023-07-22-02-36-28-969_.jpg
    223.1 KB · Views: 21
  • Screenshot_2023-07-22-02-52-47-982_.jpg
    Screenshot_2023-07-22-02-52-47-982_.jpg
    473 KB · Views: 21

dhj49er

Well-known member
The only macro I can think of that needs permission to the location is the "Disable Wi-Fi If not connected" macro. Is there any way to reduce the usage of the location service?
What location usage is your phone reporting?

You can turn off location always on for MD.
However, if you are using a version of Android 11+ and want MD to control switching of WiFi or to show you the SSID of connected networks, then it must be enabled.

In my experience MD is not accessing location all the time.
 

dhj49er

Well-known member
I agree with @dhj49er and, on my side, I always disable location and only programmatically enable it when I need to enable/disable WiFi (and then disable location again at the end of the macro).
I do the same, but only over night.

During the day I have several apps that use location, so unfortunately not feasible to turn off location.
 

haddock

New member
14 days ago a couple of apps suddenly started to get laggy in terms of updating location when using Google „high accuracy“ switch. It took 10-20 seconds for every position update. After a lot of trial and error I realized today that revoking MacroDroid‘s permission for accessing location stopped this behaviour immediately! Strange…
 

dhj49er

Well-known member
14 days ago a couple of apps suddenly started to get laggy in terms of updating location when using Google „high accuracy“ switch. It took 10-20 seconds for every position update. After a lot of trial and error I realized today that revoking MacroDroid‘s permission for accessing location stopped this behaviour immediately! Strange…
Interesting.
Which apps got laggy?
How long for a position update after disabling the MD permission?
Revoking the permission turns it off completely?
Did you revoke the MD Helper permission?
 

haddock

New member
c:geo and Adventure Lab (both for geocaching). These apps lagged, but only with "high accuracy" switched on. Without high accuracy they updated as before every 1-2 seconds and also after revoking MD location permission regardless of high accuracy on or off.
MD still works fine without location permission – I don't have any macros with location access. MD helper app isn't installed on my phone. (ZTE Axon 10 Pro, Android 9 stock)
 

dhj49er

Well-known member
Thank you @haddock for answering all my questions!
The important point to note is your phone is running Android 9....this is a version before Google started to introduce restrictions including having location on all the time for apps to control WiFi and access the SSIDs .

My phone is running Android 13 with even more Google restrictions.

Stay with Android 9 for as long as you can.
 

Dm114

Well-known member
Thank you @haddock for answering all my questions!
The important point to note is your phone is running Android 9....this is a version before Google started to introduce restrictions including having location on all the time for apps to control WiFi and access the SSIDs .

My phone is running Android 13 with even more Google restrictions.

Stay with Android 9 for as long as you can.
I definitely agree with you: I've been fighting for years to prevent any automatic upgrade of my Android v9! I'm praying to keep my 5-6 y.o. mobile as long as possible and not having to buy a new one... 🙏😀
 

lfod14

New member
The only macro I can think of that needs permission to the location is the "Disable Wi-Fi If not connected" macro. Is there any way to reduce the usage of the location service?
Have you gone into your location settings and verified how often it's accessing your location?
 

dreamily9724

New member
It says that but I doubt it's actually using your location/GPS.
That's what I thought too until I saw my battery usage (check the attachment). I've disabled the macro and GPS for the time being.
What location usage is your phone reporting?
GPS usage.
You can turn off location always on for MD.
However, if you are using a version of Android 11+ and want MD to control switching of Wi-Fi or to show you the SSID of connected networks, then it must be enabled.
I have a phone with Android 13, unfortunately.
In my experience, MD is not accessing location all the time.
It wasn't accessing the location all the time for me, either, up until a few days ago. I had modified the macro a few days ago to add something else to it, but I removed them. I don't remember exactly why I removed it, but I think it was because it didn't work. I've attached a screenshot of the macro and the macro file.
 

Attachments

  • 1690212659775.png
    1690212659775.png
    221.2 KB · Views: 11
  • 1690213914519.png
    1690213914519.png
    106.9 KB · Views: 11
  • Disable_Wi-Fi_If_not_connected.macro
    3.8 KB · Views: 1

dreamily9724

New member
I agree with @dhj49er and, on my side, I always disable location and only programmatically enable it when I need to enable/disable WiFi (and then disable location again at the end of the macro).
This makes sense, I'll incorporate this into the macro. Thanks! I'd add an extra check though, to see if my location is already enabled, in which case it shouldn't disable it after enabling/disabling the Wi-Fi.

I see the check causing problems like before where MD will keep asking for the location permission. Furthermore, I wonder if there's a way to grant and deny location permission to MD specifically until I need to disable my WI-Fi.
I do the same, but only over night.

During the day I have several apps that use location, so unfortunately not feasible to turn off location.
I think the check I mentioned might help you.
Thank you @haddock for answering all my questions!
The important point to note is your phone is running Android 9....this is a version before Google started to introduce restrictions including having location on all the time for apps to control WiFi and access the SSIDs .

My phone is running Android 13 with even more Google restrictions.

Stay with Android 9 for as long as you can.
I wish I could. Unfortunately, I bought my phone recently and it came with A13.

All the new versions are just incremental updates, except the Material U stuff, which is pretty neat if paired with Repainter (to enable an OLED black theme), cause the old why of achieving this with substratum was pretty finicky and themes would almost always break after updating apps.

Have you gone into your location settings and verified how often it's accessing your location?
Yep, I did. Check my previous post.
 

dhj49er

Well-known member
@dreamily9724 said

I think the check I mentioned will help you.

I don't think so.

During the day I prefer to keep location ON.
When I'm out and about I have several apps that use location.
On a car journey I'll use Android Auto.
I often use Google Maps when I'm cycling.
I use MD Geofences.
And other apps that use location.
I could turn off location when I'm at home, but I'm not having high battery drain as a result of having location ON all the time.

One thing to check is that all Google location settings, like history, are turned off, as these will definitely drain the battery...and probably much worse allow Google to track you.
 

dreamily9724

New member
@dreamily9724 said

I think the check I mentioned will help you.

I don't think so.

During the day I prefer to keep location ON.
When I'm out and about I have several apps that use location.
On a car journey I'll use Android Auto.
I often use Google Maps when I'm cycling.
I use MD Geofences.
And other apps that use location.
I could turn off location when I'm at home, but I'm not having high battery drain as a result of having location ON all the time.

One thing to check is that all Google location settings, like history, are turned off, as these will definitely drain the battery...and probably much worse allow Google to track you.
Which check?

Turning on the GPS to disable the WiFi and Turning off the GPS after it's done?
 

dhj49er

Well-known member
Which check?

Turning on the GPS to disable the WiFi and Turning off the GPS after it's done?
No....see screenshot.

All need to be off to save battery and prevent Google tracking you.
 

Attachments

  • Screenshot_20230730_174628_Settings.jpg
    Screenshot_20230730_174628_Settings.jpg
    80.7 KB · Views: 8

dreamily9724

New member
No....see screenshot.

All need to be off to save battery and prevent Google tracking you.
Okay, I don't follow, how does this help if the issue is that macro droid keeps asking for GPS access. The only difference I can see is that this will use less battery, but the whole problem is that it IS using the GPS even when it doesn't need to.
 

dreamily9724

New member
Don't you just need to enable then disable GPS when needed ?

The problem here is, if I need to keep the GPS on for a prolonged period of time, I don't want MacroDroid to drain my battery.


I found a workaround tho

I'm using this macro now (check attachments). It doesn't need the GPS
 

Attachments

  • WiFi_off_when_disconnected_(without_Location).png
    WiFi_off_when_disconnected_(without_Location).png
    90.9 KB · Views: 12
  • WiFi_off_when_disconnected_(without_Location).zip
    1.8 KB · Views: 4
Top