I moved your question into its own thread.
My locationservice extension is designed to run in the background, i.e. usually you do not use the LocationChanged event.
Usually you use the background functionality to send location data to a server.
You might want to explain, what you are trying to do and read the documentation. There are several examples which describe how to setup and use the background functionality.
You have to do the setup (i.e. set the RequestText) before starting the service and NOT in the LocationChanged event.
LocationChanged event
Indicates that a new location has been detected. Speed is reported in meters/second. Note: This event only will fire if the app is up and running.
Thank you for shift my post. I try to explain my target:
I need make an app that, in background, send a get command and transmit GPS data to endpoint php. (i.e. send to https://mydomain/endpoint.php?lat=LATITUTE&long=LONGITUDE%time=2024-01-27T17:04:23¬e=pippo pluto paperino
I need verifiy if accuracy is below my setting, else not send data. I build yet an app that do it with Kodular LocationSensor, and it run perfectly. Now I would use the same but in background. I hope explained it more clear.
In Kodular locationSensor I use LocationChanged to call Web1.get and send data.
I don’t understand where insert link to php and how read variables (LATITUDE, ecc…)
Please can you do an example with get ?
the background web functionality is able to convert keywords into their correponding values. The following keywords are available: DATETIME, URIENCODEDATETIME, LATITUDE, LONGITUDE, ALTITUDE, ACCURACY, SPEED, CURRENTADDRESS, URIENCODECURRENTADDRESS and PROVIDER.
This is not possible in the extension
Just send all data and add some logic on your server to ignore those records you do not want… you additionally might want to send the accuracy to the server to be able to identify those records
What is wrong ?
All authorization are ok, I see Label3 (latitude and longitude) that is updated, the service is started, but gotText do nothing, and backgroundWeb is running but don’t fire. Where is the mistake ?
thank you for help me
Thank you, can I send you by mail ?
My url is more complicated but for this test I have a simple php file https://mydomain/getTest.php?test=1234
The php file return “?test=1234” in this case. I tested it by browser and it run correctly.
I update with web component and it run perfectly.
I ask: LocationSensor.tag is necessary ?
I sent you an mail
Thank you, I received the mail
what you forgot is to ask for post notification permission, so the service could not be started…
you can do it like this
I have a new question for this fantastic extension:
How can I use SPEED variable ? The speed is in m/s, so if I would convert and send it in Km/h I need multiply to 3.6, but I cannot because “SPEED” is not a number.
In future I’d like use speed to change the update position time in smart mode.
i.e. if I am running to 50 Km/h it send every 5 seconds, but if I am walking is sufficient send every 60 second.
Thank’s in advance