To be honest I don't see a security issue in the part of "get information about", only in the "influence".

That's because it's posible to get the current activity's package with ActivityManager.getCurrentTasks from a bacgkround service without any problem right now. I just wanted to avoid polling periodically for the current task - having a simple callback like "activity got started, lost focus" would help me in this manner ... That ActivityMonitor is so complicated and has so many envents that I hoped it will have something :)

I need this in a custom device which will have some leds/extended keyboard for our custom aplications. Those leds should have different status depending from which activity is running on it (browser, email, etc.). So I don't want to hack anything - it's only about the backlight of some buttons :)

B.
As a general rule it is not possible to get information about, or influence other applications on an un-rooted Android. The exception is where the application is designed for external interaction and has prepared public intents or broadcasts to allow this.

Jim

On 17 March 2010 11:51, Mark Murphy <[email protected] <mailto:[email protected]>> wrote:

    Csenteri Barna wrote:
    > Hi
    >
    > I would need to know when one activity starts or get's focus.
    > I need this notification for any activity regardless of his
    type, name
    > or whatever - not searching for one specific activity.
    >
    > Checked the ActivityMonitor and the Intent and I haven't found a
    > generic intent for this purpose. Or I hadn't understood well the
    > descriptions from the Intent ACTION_xxxxx ...
    >
    > Is it possible at all?

    No, sorry.

    --
    Mark Murphy (a Commons Guy)
    http://commonsware.com | http://twitter.com/commonsguy

    _Android Programming Tutorials_ Version 2.0 Available!

    --
    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]
    <mailto:[email protected]>
    To unsubscribe from this group, send email to
    [email protected]
    <mailto:android-developers%[email protected]>
    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

--
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