Android Question Service Restart time problem on some devices

FrankBerra

Active Member
Licensed User
Longtime User
Hi all
On some devices (with Android 6+) i experiencing some delays in restartin my services when the phone is idle.
So i found and tried this piece of code: https://www.b4x.com/android/forum/t...estartatexact-not-accurate.65117/#post-412286

Now the service is restarting every 2 minutes even if i call it, let say, 30 minutes....where i am wrong?
How can i restart the service at a precise time even if the phone is idle?

Thank you
 

brunnlechner

Member
Licensed User
Longtime User
Can it be that "CancelScheduledService" does not work with SetExactAndAllowWhileIdle?

am.RunMethod("setExactAndAllowWhileIdle", Array(0, Time, pi))

Thanks
Franz
 
Upvote 0
Top