final int active = countActiveDownloads();
Notification note =
new Notification(R.drawable.icon, "Downloading "+thread.title,
System.currentTimeMillis());
PendingIntent i =
PendingIntent.getActivity(this, 0, new
Intent(DownloadService.this,
DownloadManagerActivity.class), 0);
note.setLatestEventInfo(this, "Downloading "+thread.title, active + "
downloads running", i);
note.flags = Notification.FLAG_NO_CLEAR;
note.number = active;
notificationManager.notify(NOTIFICATION_DOWNLOADER_ID, note);
and my activity is defined in AndroidManifest as:
<activity android:name=".DownloadManagerActivity"
android:launchMode="singleInstance"
android:theme="@android:style/Theme.Black"></activity>
Thanks for any suggestions you might have.
jsdf
On Nov 21, 1:41 pm, jotobjects <[email protected]> wrote:
> Can you show us the code you used to create the PendingIntent?
>
> On Nov 21, 7:04 am,jsdf<[email protected]> wrote:
>
> > Does anyone have suggestions on this?
> > I appreciate the help!
>
> > On Nov 19, 5:38 pm,jsdf<[email protected]> wrote:
>
> > > Hi all,
> > > A quick question (for those who know the answer, anyway):
>
> > > In my app, user starts a service and shows a notification from
> > > activity A.
> > > The notification creates a PendingIntent that will invoke activity A
> > > should the user tap on it.
> > > The problem with this behavior is that, if the user starts the service
> > > (which shows the notification), drags down the notification bar, then
> > > taps the notification, I now have two activity A's in the display
> > > stack, one on top of the other and both exactly the same.
> > > How can I re-use the original activity A in this situation so the user
> > > isn't duplicating activities?
>
> > > Thanks,
> > >jsdf
--
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