[PAID] πŸ“ Location Service Extension

I removed some of my app"s screens and it worked! What is left now is to define exactly which screen is blocking the locationService and why!!

1 Like

are you using any other extensions?
you can use logcat and try to find out what happens

Taifun

1 Like

It turned out that an extension I used for producing some sounds was blocking your service - I don't know why. I removed it and now works like a charm!!

1 Like

which extension exactly? can you please provide a link?
Taifun

1 Like
1 Like

I wonder if there is is a way for calulating the distance you walked. For now, I send the coordinates list in a server, a php script calculates the distance and send it back. It would be nice if there was a "build in" way to do that!

1 Like

Awesome work !! :+1:

1 Like

the following extensions are able to calculate it
Distance Tools Extension by Red Panda
DistanceCalc Extension: Calculate distance between two places using the Haversine formula by vknow360
taken from the extensions directory App Inventor Extensions | Pura Vida Apps

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

1 Like

Can anyone help me. how to not show message when app is running in background using this extension?

1 Like

I think this extension uses Foreground Service means it perform operations that are noticeable to the user so it must show a status bar notification, so that users are actively aware that your some service in your app is running.
Read More

3 Likes

thank you @oseamiya, this is correct...
according to the Google rules the user must be aware, that there is some service running and accessing the location data... it is not possible anymore to get that information without the user knowing it...

and the extension accesses the location in the background, which means (see also Q1 here App Inventor Extensions: Location Service | Pura Vida Apps)

Tips for getting your app approved for background location access
A : See this Google Blog, see also the Google Policy chapter Location Permissions .

Taifun

3 Likes

Thank you @oseamiya

1 Like

Can I use this extension to measure distance from the moment I press a button to the moment I press another button?

no
the purpose of this extension is

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 .

Also a background web functionality is available which can be used to send the location data in the background to a web service of your choice using a POST request. This could be used for example to store the location data in a MySQL database or to send an email after a location change was detected while the app is not running.

to measure distance you have to do some calculation...
see also some threads about how to do this after doing a search in the community
https://community.appinventor.mit.edu/search?q=distance

Taifun

1 Like

Hello community
I have an app that writes my location to an sql database, but only as long as the app is running in the foreground. I have now set up the local demo app with the working access data and no table is created. When is the table usually created.

greetings Stefan

Sorry Stefan but I don't understand what you are trying to do :upside_down_face: Do you mean a table in the database or a table in the App?

Could you draw a diagram that shows the intended process? Or list the intended actions?

it looks like you are taling about the locationservice extension App Inventor Extensions: Location Service | Pura Vida Apps

the extension does not create a table in your database, you have to create that before using the extension...
see also the documentation, especially chapter "Example blocks to send the location data to a MySQL database while the location service is running in the background"

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

It works on Kodular?

Hi
I have a problem with the Extension Location service. I want to send an email when the coordinates change. the mail without attachment should be sent from my PHP server (php7), even if the app is running in the background or the cell phone is in stand-by mode.
the coordinates are currently stored in an sql database using the location extension.
I would be grateful for new starting points.

Greetings from Germany
Stefan

At the time of publishing the extension, Kodular did not offer some annotations in the manifest, but meanwhile it should work...
I will do some tests next week for you and let you know then...

Taifun

1 Like