[PAID] ๐Ÿ“ Location Service Extension

Muchas Gracias, probare la sugerencia e informare

Hi Taifun! its work! I configured the views using if TaifunlocationService.IsRunning, thank you for your help!

1 Like

Hi Taifun, I recently bought the extension and it's really hard for me to get familiar with it. I wanted to consult, how can I save the coordinates in the cloud? Redmin for example? or just leave it in a text? I would greatly appreciate your help. Have an excellent week!

In the documentation and as well in the download folder you can find examples to store the data in a Google sheet and in a MySQL database.

Also the data is stored in TinyDB.

Please read the documentation and try the examples, then adjust it to your needs. And if you got stuck, then post a screenshot of your relevant blocks.

Taifun

I used the same LocationSimple file, and added a clock to it. When activated, it will save LocationSimple data to the cloud. But it only appears as (0,0)

How can I get it to be saved in real time along with the current address? I would really appreciate your help, I'm new to this, I don't understand English (I use a translator) and I don't have programming studies. Greetings!

the clock does not run in the background, you will have to setup the background web functionality as explained in the documentation, see especially the Google Spreadsheet example there

you can't use CloudDB blocks together with the background web functionality, these will not run in the background... you will have to find a solution, which works with the web component and then "translate" it to use with the locationservice extension similar as it has been done for MySQL, Google Sheets or Firebase...

Unfortunately I'm not familiar with CloudDB, but I have seen this thread Question to REDIS database (CloudDB) experts - #8 by TIMAI2 and @TIMAI2 might be able to help how to connect to CloudDB using the web component? After that I can show you how to use this in the locationservice extension...

Taifun

Greetings!
I used "LocationSensor1" and "LineString2" to calculate the distance
And in the same block of the "LocationSensor1.LocationChanged" event, another "LineString1" draws the traversed path.
Everything is working!
Maybe someone will find it useful!
P.S. I forgot to say that to trigger the "LocationChanged" event, I used the setting โ€œevery 10 metersโ€. So as not to write coordinates often.

1 Like

is there a latest version?

The latest version currently is version 4b and as usual you can find it in the download folder, see also the documentation at App Inventor Extensions: Location Service | Pura Vida Apps

Taifun

I've downloaded it.
Thank You

It is still some scary area to use LocationSensor for my coding level. I keep this comment when I'm ready to re-try to fix the problem I posted. sorry for no response to your comment.

Version 5 now has been released
New in Version 5: Itoo integration
Thank you @Kumaraswamy for this amazing framework!

Now we can execute almost any logic in the background (no user interface components) after an location changed event occurred in the background. Please be aware, that there is no user interface available in the background.

This is the new OnLocationChanged event handler, which looks like a procedure.

The event handler will be called from Itoo from the background after a location changed event occurred.
You will have to create the procedure using the name OnLocationChanged.
Also that procedure must have 7 arguments, else it will not work. Note: This background event handler also will be called if the app is in the foreground.

Now we can execute almost any logic in the background (no user interface components) after a location changed event occurred.
Please be aware, that there is no user interface available in the background.

Some example blocks to send location data to a MySQL database in the background

See the complete documentation on my webpage here App Inventor Extensions: Location Service | Pura Vida Apps

Taifun

2 Likes

Any way to disable these logs that are changing the NotificationText?

currently not, but it looks like an option to deactivate this would be a good idea... I will add it soon...

Taifun

1 Like

I now added a new property NotificationTextLocked, just set it to true to get the constant notification text.

notificationTextLocked

you can download version 5a of the extension from the Download folder

Taifun

1 Like

location with UrsPahoMqttClient thas That can be done, how



I'm not familiar with that extension
General advice is to get it running first in the foreground
And concerning background, add Notifier LogInfo methods for debugging and use logcat to find out what's going on

What is the ConnectionState in the background? Can it be different, if that extension is not running in the background? You probably need itoo to get that extension running in the background first

Taifun

Iโ€™m working on an app that records GPS coordinates to TinyDB every 10 seconds. The issue Iโ€™m encountering happens during extended use โ€” specifically when the app runs for around 8 hours a day, with a break from 11:30 AM to 12:00 noon. At some point, an error appears and the location service stops saving data to TinyDB.

Has anyone encountered a similar issue or knows how to prevent this? Any help would be appreciated. Thank you and God bless!

Try the example project as test to find out, if there is some kind of error in your blocks

Generally it's a challenge to find out what might have happened

Do you have sufficient disc space on your device?
Which devixe/Android version are you using for your tests?
Did you try another device?

How do you stop the app at 11:30am? Manually? How do you reatart it again?

Taifun

1 Like

Possible cause:

Power saving options on the phone put the app to sleep

TinyDB logs need to be sharded to different namespaces, one per day because of volume

1 Like