Hello Friends , I have one task in which i want t...
# android
m
Hello Friends , I have one task in which i want to start the scheduler for particular time. Scenario : When the sale is on for 2 hours let's say for 10 : 00 AM to 12 : 00 PM, i want to notify the user for sale is started and also update one popup for continues given time. Once the sale if off on 12:00 PM, the popup should be dismiss. Any one have idea how to handle this approach?
😶 1
m
Hello. for scheduling notification you can use AlarmManager.
m
Yes, But in my case the whenever the sale is on the notification will comes in from backend and i can post the notification.
z
No idea how to do this reliably with data messages but alternatively you could let the user know the deal is expired in-app when they click the notification
m
Ok
i
Do you control the backend? You can send a silent notification to the app to dismiss the sale notification.
m
@Igor Brishkoski Thank you for your reply, I know about the silent notification but i don't want to dismiss the notification. In our design, there is one screen is showing the label which indicates that the sale is live. Now if i user had already opened the screen which call the API for sale,after that i want to get the real time update for sale if off which ultimately hide the label of the sale.
Like i want to implement something like background worker that continuously check the sale is expired or not if yes then it will update me.