[PAID] 📍 Location Service Extension

first of all great, that you got it running now

Thank you guys for all the help. I've got my app to post to my Google sheet whilst maintaining my apps purpose. The error was with the Google script.

unfortunately this is not possible using the locationservice extension, but what about a server solution? You could write a Google Apps Script to delete the rows from the spreadsheet you do not want using some logic...

Taifun

What about some code like this? This is not THE solution but an idea you might work with.

It calculates distance (miles) between your present coordinates and a destination(lat2,long2). It is sort of a geofence. When you approach a destination it posts distance to that location as you get closer. I tested this and it works to post the accuracy and the distance.

If you modify add a script to your spread sheet, you might be able to only post when the distance is less than 1 mile. Another idea is to RequestMethod immediately preceding the RequestText (I haven't tried this).

Good luck.

1 Like

Remember, the LocationChanged event of the extension only fires if the app is NOT in the background...
also the setup (for example setup of the RequestText) needs to be done before starting the service...

but you could use the formula from Steve and calculate the distance in the spreadsheet after passing the current lat and long... the destination lat and long could be provided for example as variable in the Google Apps Script

Taifun

Thank you both. It's given me an idea.

Wow! Great extension!!! I will buy it soon

I'm using mysql, but I want only one data to be entered into mysql database and use the UPDATE code block to change that data automatically with location change.
how do?

Your blocks look fine...
As test you can use the web component to find out, if your update statement works fine
Also you might want to use Do it to debug your query to find out, if the number is correct...
And while using the extension it helps to use the ErrorOccurred event to display any errors in a label just in case

Taifun

Thank you @Taifun
I will try it

The previous project was buildable, but after I added the extension location service an error occurred.
Please help me

The location service test project builds fine, which means, it is something else in your project...

Send me your previously working project file by email or PM and I will check

Taifun
PS: as you know, posting a project in the community which includes paid extensions is not allowed....

The project contains 10 screens and 25 extensions
This was the result

@Taifun, I checked the extensions one by one, I found the extension phase.
after I upgraded the extension phase to version 2.2.2, the project can be built.

Thanks for taking the time to check out my project.
Best regards

Thank you @Ayun_Challymalang
Taifun

Please help me.

  1. Which MySQL and Spreadsheet are recommended?
  2. The data stored in MySLQ/Spreadsheed is latitude and longitude data, if you use DistanceInterval = 1 and TimeInterval = 1000, a lot of data will be stored.
    Can only the Trip1 Tag be stored? to save storage capacity.

I hope there is a solution.

MySQL on your own web server, see for example App Inventor Tutorials and Examples: MySQL | Pura Vida Apps or Google Spreadsheet using the web component following this tutorial METRIC RAT AI2 - Google Sheets - Simple POST and GET Data

You might want to read again the documentation here App Inventor Extensions: Location Service | Pura Vida Apps

Before starting the service use an if statement to decide, if you want to use the background web feature or not, see also the example project

Taifun

Thanks @Taifun , I'll try it.

I use the UPDATE query, the data is not changed but added.
Please help.

image

The update query does not convert magically into an insert query somehow. .

Follow my previous suggestions

Taifun

Thanks @Taifun, I'll try again

4 posts were split to a new topic: How to display all the data in the first row taken from a MySQL database

I have 2 questions

  1. I attached taifun location extension blocks into project built in location sensor then this happened. coordinate and other numbers attached in list. what numbers are those and how can i remove those numbers except coordinates.

  2. Can options like ProviderLocked to true, ProviderName to "gps" in LocationSensor also possible in TaifunLocationService? location accuracy weirdly lower so I have to try any optional test to improve accuracy. Or any other suggest options to higher accuracy rate?

I couldn't attached my project file as it include paid extension in it.
thanks in advance.

See the documentation at App Inventor Extensions: Location Service | Pura Vida Apps

Optional location data to be stored in TinyDB

As the collected data can be extensive, the following properties can be used to decide, if a specific location information should be stored in TinyDB or not.

So if you like only the coordinates stored in TinyDB, then only set the property Coordinates to true and the other properties mentioned there to false

Unfortunately not... please see the documentation about the available features. Did you enable GPS and allow location access all the time? Did you also grant location background permission? Which Android version are you using for your tests?

Thank you for respecting my t&c.. In case there are still questions you also can provide a screenshot of your relevant blocks...

Taifun

1 Like