[android-developers] Re: how can I check if an Activity is visible or not?

2009-02-16 Thread pperotti
Well, that is actually not a bad idea. Thanks for the tip ! On Feb 16, 12:58 am, Marco Nelissen marc...@android.com wrote: Since you're going to do this from your service, why don't you have your Activity register with the service when it is started or resumed, unregister when it is paused or

[android-developers] Re: how can I check if an Activity is visible or not?

2009-02-15 Thread pperotti
Well ... maybe to clarify what Im trying to get done. I want just to launch a notification to the user only if he is not in one of the screens (Activities) of my application. If the user find himself using the application I just want to move him to the next screen. Basically ... if ( the user is

[android-developers] Re: how can I check if an Activity is visible or not?

2009-02-15 Thread Marco Nelissen
Since you're going to do this from your service, why don't you have your Activity register with the service when it is started or resumed, unregister when it is paused or stopped, and then just have the service keep track of whether the activity is active that way? On Sun, Feb 15, 2009 at 6:44

[android-developers] Re: how can I check if an Activity is visible or not?

2009-02-12 Thread Dan Raaka
Get the RunningTaskInfo through the ActivityManager and do a name match for the activity name you want to exclude and send the notification -Dan On Feb 12, 5:34 pm, pperotti pablo.pero...@gmail.com wrote: Hi, does anybody knows if it is possible to check if an Activity is at a moment of the

[android-developers] Re: how can I check if an Activity is visible or not?

2009-02-12 Thread Dianne Hackborn
Please don't do this, these APIs are only really for writing system information tools. For example, for this to work correctly need to retrieve -all- possible running activities (which can be 10, 20, 30, or more), have all of that information copied to your process, and look through it for the