Android Question Notification at scheduled time

luke2012

Well-Known Member
Licensed User
Longtime User
Hi @Erel.
I'm using the StartServiceAt in order to schedule a notification in an specifica range (for example : 1 time in a month).
The problem happen when the user restart the smartphone because the service is set to start at boot and the notification appears before the scheduled time.

My target is to activate the notification only on the defined schedule time not at the system boot.
Any solution about it?
 

DonManfred

Expert
Licensed User
Longtime User
write the time you want to start the service in a keyvaluestore too when setting the StartServiceAt
On servicestart you can check if the wanted time you stored is reached or not... If not, do nothing. If yes do the things you need to do.
Then setup the next start (also write the new wanted time to you keyvalue)

Something like this it should be i suppose. But i dont know whether this is the right things to do.. Maybe @Erel can say more about it!?
 
Upvote 0

Similar Threads

Top