App Keep alive always

No.

https://ullisroboterseite.de/android-AI2-KeepAlive/UrsAI2KeepAlive.zip

inside the folder "example"

There is no APK, but an AIA from Sept. 2023.

Ulli has not yet updated the ZIP file and the documentation to the current extension version. He posted an extension here in the AI2 forum for the first time.

I compiled that .aia after updating extension with the one posted on this topic two days ago

Confirmed. I will inform Ulli by email...
Try to use his MediaNotification instead.

I need something like this ๐Ÿพ Foreground GPS Location Service experiments and Tutorial by SteveJG

So I think using MediaNotification extension is not the right way.

I hope Ulli can update his extensions KeepAlive and WakeLock

The key is to use a Foreground service to prevent Doze mode. And the MediaNotification extension does that too (even on Android 14 under targetSdk 34).

I loaded "UrsMediaNotification.aia", then I modified it adding Texting block and GPS block.
Tested on Android 14 - Samsung A23.

APP sent SMSs after screen was off also.
But SMS receiver stopped and GPS stopped when screen went off.
So, with screen off, I always received the last LAT+LON taken when screen was on.
GPStest.aia (1.0 MB)

Use ITOO Background extension, and your needs are fulfilled after close or after in the foreground.

Ok, I'll try

You might want to explain, what your app is about. Then we can suggest, what to do.

Are you trying to get location data while your app is running in the background? App Inventor Extensions: Location Service | Pura Vida Apps

Are you trying to do something after an sms has been received? App Inventor Extensions: SMS Receiver | Pura Vida Apps

Taifun

Try playing a silent audio track (e.g. 5 sec) in a loop while your app is running.

1 Like

I need to get location data in background and to send these data through Texting component.
Probably your extensions Locations Service and SMS receiver could do the job

Ok, I'll try this trick also

Use the locationservice extension to receive location data in the background

To send an sms is only possible in the foreground

EDIT: you could also use an API to send sms in the background, for example Twilio... SMS API | Twilio

The locationservice extension offers an interface to itoo, so you could use itoo to connect to an API in the background

Taifun

To get location data in the background you need background location permission

The locationservice extension is able to do it

What exactly means "manage texting events"?
Texting events do not work in the background together with itoo, this is why I prepared my sms-receiver extension.... however earlier you mentioned, you like to send sms in the background?

Taifun

1 Like

Hi Taifun,
I would like to create a GPS tracker that sends GPS position through SMS (or loading data to a web server) and can be activated sending an SMS to the tracker.
Probably your extensions (LocationService and sms-receiver) are actually the only effective solution

As already suggested

or store the data on your web server

Use the sms-receiver extension to activate it

Taifun

In your test aia you use a WakeLock extension that declares REQUEST_IGNORE_BATTERY_OPTIMIZATIONS in the Manifest. An app that has this permission declared in the Manifest will not be allowed in the Play Store (without Google's approval).

No problem, I think only few of my apps could be on Play Store.....