Android Question Modal with Timer and Action

Luiz Fernando Orlandini

Active Member
Licensed User
Longtime User
Hi All!

I need to do a implementation in my app, but I don't have any idea of which component I can use for that.

My cenario is:

I will receive a notification sent by a GCM push notification system to some device. I have to capture the information (data) from this notification and show to user, and the user have do decide if they want to accept or not this data (it's a kind of order data).

So I think I have to have a modal panel/dialogs and two buttons: Accept and Reject.

But I have another important requirement. If the user doesn't have any action in 30 seconds after receive the message, the modal will close automatically with reject option.

Is that possible?

Can anybody help me with some any other ideias?

Thanks =D
 

DonManfred

Expert
Licensed User
Longtime User
when the push notification arrives you can use customdialog lib... but i dont know whether you can use a timer there or not....
I would just use a new activity with a timer....
 
Upvote 0

margret

Well-Known Member
Licensed User
Longtime User
You can do a PanelBack over PanelActive overlay. Trap the click event from PanelBack so they can not do anything but answer the PanelActive options. When you display the panels, start a timer to tick in 30 seconds. Close the panels in the tick or disable the timer in the selection buttons.
 
Upvote 0
Top