If somebody from the Android team could chime in, I would greatly appreciate it! :)
Thanks for your help! -- BoD On Friday, October 12, 2012 4:14:17 PM UTC+2, BoD wrote: > > Hi! > > 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); > clickIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); > contentView.setOnClickPendingIntent(R.id.button, > PendingIntent.getActivity(this, 0, clickIntent, > PendingIntent.FLAG_CANCEL_CURRENT)); > > 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, > > -- > BoD > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en