How to easily fill a string variable with current geofence name?

Hi, I'm trying to make a macro to write down on a text file all the places I've been and for how long.
For this i want to use a string variable (locNow) with the current geofence name.
Such as:
Write on file:
Were on "locNow" from "arrivalTime" to "exitTime" on "currentDate"
Is there an easy way to do it?
Or any other way you may think is more efficient.
Thanks a lot!
 
I'm currently trying do build a macro like this, but I feel that there must be an easier, less brute force than this lol
 

Attachments

  • Screenshot_20220625-001031_MacroDroid.jpg
    Screenshot_20220625-001031_MacroDroid.jpg
    432 KB · Views: 8

FrameXX

Well-known member
To be clear MacroDroid is not very good at accurately sensing location in any other way than geofences or cell towers, so the geofences you are using are propably the only really dependable and usable solution.

If you have an if statement constraint for a single action you can instead tap on the action and tap on add constraint. That should look cleaner than if statements all around.

And at the end you can just append the variables into a file.

The other idea is to save the latitudes and longitudes and then get the location names when internet is availible. This wouldn't require MacroDroid geofences, but I am not sure how much accurate the locations would be.
 
Last edited:
To be clear MacroDroid is not very good at accurately sensing location in any other way than geofences or cell towers, so the geofences you are using are propably the only really dependable and usable solution.

If you have an if statement constraint for a single action you can instead tap on the action and tap on add constraint. That should look cleaner than if statements all around.

And at the end you can just append the variables into a file.

The other idea is to save the latitudes and longitudes and then get the location names when interbet is availible. This wouldn't require MacroDroid geofences, but I am not sure hiw much accurate the locations would be.
I didnt get it :(
I just wanted an easy way to say: "if you are inside a geofence area, write its name on a file" but i didnt find any non-brute force way to transcribe the geofence name to a string variable.
Instead, I need to say "if you are inside geofence A, write A. Else if in geofence B, write B. Else if in geofence C, write C" and so on.
It's kinda weird i have to write such a long command just to do that.
If you have any ideas and be very glad!
 

Dm114

Well-known member
I didnt get it :(
I just wanted an easy way to say: "if you are inside a geofence area, write its name on a file" but i didnt find any non-brute force way to transcribe the geofence name to a string variable.
Instead, I need to say "if you are inside geofence A, write A. Else if in geofence B, write B. Else if in geofence C, write C" and so on.
It's kinda weird i have to write such a long command just to do that.
If you have any ideas and be very glad!
Unfortunately there is no Magic text to get the name of a Geofence. Maybe you could make a request here in the appropriate thread.
 
Top