Hi Everyone,
I would like to use SetExactAndAllowWhileIdle without needing to also use notifications. Everything goes well with SetExactAndAllowWhileIdle such as rescheduling the startup of a service and it starts up very close to being on time.
The service is sticky:
It's also started in the foreground in Service_Create:
Elsewhere in a sub routine I have this notification:
If I remove the above line of code the service will start up again on the scheduled time since I have SetExactAndAllowWhileIdle in Service_Create, but will not start again ignoring the new scheduled time for SetExactAndAllowWhileIdle that I have in other parts of the app.
Is there a way to get SetExactAndAllowWhileIdle to work without the notification?
Thanks
I would like to use SetExactAndAllowWhileIdle without needing to also use notifications. Everything goes well with SetExactAndAllowWhileIdle such as rescheduling the startup of a service and it starts up very close to being on time.
The service is sticky:
B4X:
#StartCommandReturnValue: android.app.Service.START_STICKY
It's also started in the foreground in Service_Create:
B4X:
Service.StartForeground( 8, nNotify)
Elsewhere in a sub routine I have this notification:
B4X:
nNotify.SetInfo("My App", "This is a test notification.", "")
nNotify.Notify(3)
If I remove the above line of code the service will start up again on the scheduled time since I have SetExactAndAllowWhileIdle in Service_Create, but will not start again ignoring the new scheduled time for SetExactAndAllowWhileIdle that I have in other parts of the app.
Is there a way to get SetExactAndAllowWhileIdle to work without the notification?
Thanks