App Keep alive always

It is not necessary and helpful for you to add your two cents to almost every topic.

1 Like

What do you mean by that two cent, are you insulting me?
In India it is Do Kaudi you insult me or advice me.

Do(Tho) = Two
Kaudi = Cents

My english is very weak.

Auf Deutsch meint es, man solle nicht zu jedem Thema seinen Senf dazugeben, sei denn, es liefere weiterführende Erkenntnisse.

In German, it is said that you should not give your opinion on every topic unless it provides further insight. Period.

So try to remember that. :pray:

2 Likes

:+1: Okay, Thanks for your suggestion, I will be try to remember that to at least every topic!

@Anke I have been following this topic for a long time and I have faced exactly all these problems. I've tried all the proposals, I installed several of the extensions mentioned here and some more I found on the internet... but NOTHING worked on my Samsung. After 4 minutes and little the screen darkened slightly... and when it was 5 minutes it enters into "Doze Mode", with no chances of continuation.

But after many tests I found a solution. I just didn't expect this topic to be resurrected after so long.

The solution was to uninstall all tested extensions, just keep 'taifunbatteryoptimization1' » RequestIgnore, and simply regularly use 'NotifierShowAlert » 'Notice', with a blank text string. For this not to be displayed on the screen, on the properties of Notifier the 'Appearance' must be with BackgroundColor and TextColor set to 'None'.

In the first instance where the Timer is triggered, a variable holds the 'Start' and already program the 'Alive Notification' 4 minutes later. This can be parametrized for another lapses...

Once this 'Momentum' comes, the simple Notifier call with blank string has the ability to keep the screen Alive! At this point, just schedule the next Notification for 4 minutes later... and then the device does not enter in Doze Mode and the screen can be active until the battery is over.

I am happy that this topic has been reactivated so I can share this solution. :pray:

@>-->---

1 Like

What is your app about? Why should Doze mode be prevented? Which functions / components should be able to run in the background / idle mode?

1 Like

Hi, I made an update for the KeepAlive extension. But I can't test it. My best phone has Android 13.

Please download the new version from https://ullisroboterseite.de/_forDownload/de.ullisroboterseite.ursai2keepalive.aix and report back whether it works

2 Likes

I am working on an exclusive personal use project without commercial intentions. It is an application that is intended to issue alerts [Speech-to-Text] to signal regular intervals for the practice of 4 meditation techniques, whose time should be strictly the same for each of the 4 techniques. Each sound warning signals the moment in which it's need to change to the next technique… The final alert is the indicator of the end of meditation.

The whole process is done without looking at the screen, with eyes closed… and each technique is practiced between 15 and 25 minutes, according to the day and moment.

There are two modalities for choosing the process »

A » Indicating a fixed fixed time for all techniques»

B » Starting the chronometer in the first technique… practicing it for a free time… and, finally, a touch on the screen will compute the lapse elapsed and replicate this precise interval in the remaining 3 techniques… resulting in the same interface, where the 'fixed time 'It was replaced by a spontaneously computed time.

The point is: As the practice of this meditation will take from 1 hour to 1 hour and a half, so that the Speech-to-Text sound alerts happen, the application needs to be active all the time… because if the device enter the Sleep Mode, Doze Mode (or any of the other 'inactivity in the foreground' status that you made me study ^^) the alerts will not happen and the goal will not be achieved.

In fact, I would not even need the screen be active. If there was any way to completely make it inactive, it would save battery. As I do not have still the @Taifun exten$ion that allows to control the brightness of the screen, I am doing this manually and leaving the shine in a minimal situation.

As for the extension TaifunBatteryopTimization1.requestignore and the consequences of Google Play Store block this, as I do not want to publish the app, I am quiet. Play Protect Analysis does not block this when I compile the project for Android App (.apk)

Still, I wish I could use an extension that would not cause this block, because there is a possibility of distributing this among others who practice this meditation... but I couldn't find any.

I hope I have explained the context properly.

Sorry for the delay to answer, @Anke:pray:

@>-->----

Hmm, I don't quite understand. How do the alerts work, via text or voice?

Basically, your app should work without any problems (regardless of the type of alert). I use Ulli's MediaNotification extension for my meditation apps (speech, music, nature sounds) which has implemented a foreground service, among other things. My meditation/relaxation apps have been on the Play Store (and also the App Store) for over 10 years and have been running on 10,000s of devices worldwide since then.

My apps should be used regularly in background/idle mode. Depending on the practice, type of exercise and user settings, the apps can run for between half an hour and several hours (possibly even the whole night). Timers that show the remaining time and the current running time must of course remain active -- so Doze mode must be prevented from Android 6 onwards.

Hi ,
I tried KeepAlive+WakeLock on Android 14 (API 34) with no luck : the app "UrsKeepAliveServiceTest.apk" hungs and the OS asks to wait or close the app.(Samsung A25).
I tried to use the last (yesterday) KeepAlive extension version also.
I'm searching a way to make a "keep alive" app yet.

thank you
Claudio

Where does this APK come from?

Maybe »

https://ullisroboterseite.de/android-AI2-KeepAlive-en.html

@>-->---

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)