Description
This extension is able to run in the background while your app is closed and stores location data (latitude, longitude and optionally current datetime, altitude, accuracy, speed, current address and provider) in TinyDB.
New in Version 5: Itoo integration: 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.
A notifier will be displayed while the location service is running in the background.
The extension can be used for devices starting from Android 5 (API 21).
For details, example project and documentation see here App Inventor Extensions: Location Service | Pura Vida Apps
Available Blocks
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
In the example app you can define a tag for TinyDB to store the data for a trip before starting the service. Later or even while the service is still running you can choose one of the tags and display the coordinates in a map. I have chosen the line string component here in the example app.
Price
15 USD, Payment options see my webpage
Taifun
Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.