Yes I have tested this on an HTC One S running Android 4.0: the 
notification bar stays open.

-- 
BoD 


On Friday, October 12, 2012 6:53:32 PM UTC+2, MagouyaWare wrote:
>
> Have you tested this on a real 4.0 device?  It might just be an emulator 
> bug...
>
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/magouyaware
>
>
> On Fri, Oct 12, 2012 at 8:14 AM, BoD <[email protected] <javascript:>>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 
>> [email protected]<javascript:>
>> To unsubscribe from this group, send email to
>> [email protected] <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to