Location update not working

AKP

New member
So, I have this macro which should turn GPS in, curve location update, want 45 seconds and log certain information about with geo coordinates in a text file.

However, writing geo coordinates is not working, when force location update is done from macro. When, location is already updated it works good.

So, I think the matter is with force location update.

SS of macro:
IMG_20231220_121749.jpg
 

Qarboz

Well-known member
So, I have this macro which should turn GPS in, curve location update, want 45 seconds and log certain information about with geo coordinates in a text file.

However, writing geo coordinates is not working, when force location update is done from macro. When, location is already updated it works good.

So, I think the matter is with force location update.

SS of macro:
View attachment 7939
Try inserting a wait of a few seconds after Location Service On
 

AKP

New member
After Location Service On there is Force Location Update. Please read.
Yes. Location On>Force location update> Wait 45 seconds>Write to file.

Is this not supposed to be in this order?
 
Last edited:

Dm114

Well-known member
Yes. Location On>Force location update> Wait 45 seconds>Write to file.

Is this not supposed to be in this order?
No. The Wait action should be between Location action and Force location action

But, unfortunately, it doesn't work unless an app using GPS (such as Maps or Waze) is already running.

 

mapriex

Active member
here is a test sample that concerning your request:

i haven't rooted my device yet, so i used the "gps toggle" on "on" as trigger and with this action row you get your location. atleast for me its working like this. i am using similar functions myself.
if it doesn't work for you, can you provide your logfile?
 

Attachments

  • Screenshot_20231220-212102.png
    Screenshot_20231220-212102.png
    144.3 KB · Views: 15

AKP

New member
here is a test sample that concerning your request:

i haven't rooted my device yet, so i used the "gps toggle" on "on" as trigger and with this action row you get your location. atleast for me its working like this. i am using similar functions myself.
if it doesn't work for you, can you provide your logfile?
Didn't work. Here is an SS of log.IMG_20231223_103544.jpgIMG_20231223_103524.jpg
 

Endercraft

Moderator (& bug finder :D)
You should wait a few seconds after the force location update. Else I don't see anything that doesn't work.
 

dhj49er

Well-known member
The log show location update AFTER the write file.

Setting location update rate to 5s and only waiting 5s is not allowing time for MD to perform the actions.

I would suggest starting with significantly larger time intervals, to get the macro working. Then reduce the time intervals in steps to establish lower values where the macro still works.

Try the following

Location Services ON
Wait 30s......GPS receiver needs time to achieve lock.
Set location update rate 5s
Wait 30s
Force location update
Wait 30s
Write to file
 

dhj49er

Well-known member
Also, I don't think you need to change the location update rate to 5s.

The important part is to make sure location services have been enabled at least 20s before the force location update action.
 

mapriex

Active member
so the gps signals only works with internet with my mobile phone. garmin devices e.g. use different gps signals that works offline. anyway here is a macro for you needs, just add your write to file action at the end. it should be enough to write only the 2 variable in your textdocument, but you can use it as you want.

the macro is looking for a signal over 2 mins every 10 seconds, i put this limiter because in the worst case it can run endless. if you need more time you can set it to 3 or 4 mins.

thank me later.

to access this file download and import this file via your android device. either by emailing or logging to the website by mobile phone.
 

Attachments

  • TEST.macro
    5.7 KB · Views: 6

02ranger

New member
I've had the same problem and have an idea to launch Google Maps, wait 5-10 seconds, then mark the location. I haven't had an opportunity to test it yet, but if Maps will launch and update while the phone is locked then I'd think it should work.
 
Top