I am working on an app that shows a notification that uses a custom layout
(notification.contentView = remoteViews), that contains a button.
First of all, I am aware that there are new APIs to do this in 4.1 but my
app has to work on 4.0.
I want the button to start an activity so I do this:
Intent clickIntent = new Intent(this, MyActivity.class);
PendingIntent.getActivity(this, 0, clickIntent,
This works as intended, but my problem is:
- On a 4.1 Galaxy Nexus, when clicking on the button, the notification bar
collapses, thus the newly displayed activity is visible to the user (the
behavior I want!)
- On a 4.0 emulator, when clicking on the button, the notification bar
stays open, thus the newly displayed activity is not visible to the user
Does anybody know if there is a way to control this, so the bar will also
close on 4.0?
Thanks a lot,