Toggle between big view and normal view for android notification programmatically by using notification action button
Asked Answered
A

1

6

I have a service that runs in the foreground (constant notification). I want to give the users a button to close it so I thought about notification action (in 4.1) But, before they close it I want to let them know the consequences of closing it and to let them confirm the close.

So basicly I want the normal view of my notification to have a close button and when the user click on it I want to expand my notification to the big view which has confirm/cancel buttons.

From what I've read I can not control which view is presented to the user. It will only show the big view If it's the first notification or the user pinch to zoom it/swipe down.

Can I control which view is presented?

Thanks!

Acrobatic answered 3/9, 2013 at 12:31 Comment(0)
T
0

No, you have no control on that part.

It is handled by the system and before Android 4.1 you wouldn't haven get the "big view".

You are using notifications for something that they aren't supposed to be used.

If the user chose to swipe away your notification he is not interested in the notification and you can't do anything about it.

An user may also decide to stop your app for issuing notifications.

You can't rely on the notification for things like this.

If you explain exactly what your flow is I may be more helpful.

Toniatonic answered 31/7, 2014 at 0:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.