you can use "ActivityManger" to get number of running activity.
Like this:

       ActivityManger am = (ActivityManger )getSystemService
(ACTIVITY_SERVICE);
       List runningTask = am.getRunningTasks(maxNum);

On Aug 4, 2:54 pm, Paul Drummond <paul.drumm...@iode.co.uk> wrote:
> Hi,
>
> I have been looking for this for a while but I can't find any way of doing
> it.  A contrived example would be a service that simply displays the name of
> the current running activity as an Ongoing Notification.  For instance, when
> the user is reading a particular email, the name of the activity (hopefully
> the email title!) would appear in the notifications window and when the user
> switches to read a text message, the notification would change to show the
> name of the new activity.
>
> Is there a way to do this in Android?
>
> Thank you,
> Paul Drummond
> --
> Iode Software Ltd, registered in England No. 6299803.
>
> Registered Office Address: 12 Sancroft Drive, Houghton-le-Spring, Tyne &
> Wear, DH5 8NE.
>
> This message is intended only for the use of the person(s) ("the intended
> recipient(s)") to whom it is addressed. It may contain information which is
> privileged and confidential within the meaning of applicable law. If you are
> not the intended recipient, please contact the sender as soon as possible.
> The views expressed in this communication may not necessarily be the views
> held by The Company.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to