LocalService in the background run (using Taifun Location Service Extension)

LocalService in the background

EDIT: project removed

Hello
I searched and read a lot about Localservice not being able to run in the background, at least in AI2.
Thanks to the TaifunLocationService and UrsAI2KeepAlive extensions, I was able to bring together something that logs data even when the screen is closed.
Unfortunately I am a very beginner in AI2 programming so I don't know if this is a good way to go.
I don’t know how much resources you use and how it works after a long time.
I didn't feel like walking for hours. :slight_smile:

If you feel like it, would you check it out?
Any ideas would be welcome.

Your project contains a paid extension...
Sharing an aia file therefore is prohibited
Please respect the community rules

Taifun

oh sorry, I didn't pay attention to that!

If it works then :slight_smile:

Use the Android System to examine your app usage. (Settings>Apps> app name ). Depending on your operating system, that tool provides usage statistics.

Just turn your app on and let it run. It will record location . Will it work forever? Probably not. You can check different intervals.

no one else would either.

Did you try the the example Taifun provided App Inventor Extensions: Location Service | Pura Vida Apps

or

HOW TO: use LocationService extension Version 1 and Version 3 with a GoogleSpreadsheet to record real time locations while the app is in the background ??

I tried it, but I don't want location data at the end of the tour, but continuously, so that I can create momentary statistics.

I do not think you or anyone can do that with the existing extension. Please read Taifun's documentation about how it works.

If you need continuous real time locations posted where you can see them, then use a StayAwake routine and keep your app from sleeping perhaps. Post the locations to your screen or to a database. You may not need his extension at all in that case. One way to do that is explained in the second link I posted earlier.

I didn't want to keep the screen awake, because there is no way to charge it during a bike ride.
Anyway, that's why I thought that


I didn't want to keep the screen awake, because there is no way to charge it during a bike ride.
Anyway, that's why I thought that

Sorry
in English

Perhaps get a charging battery pack android battery pack - Google Search

Thanks ! Good idea ! This immediately avoids the problem, there is no need to solve it. :wink: :smiley:

Here is part of code you might use with the LocationSensor A Basic LocationSensor Speedometer to calculate speed.

Thanks! I will watch it :wink: