On Mon, Apr 11, 2016 at 8:56 AM, Vlad Pintea <[email protected]> wrote:

> Basically, for starters, I need a function or something similar for my app
> to recognize if I open applications on my device (the most important one
> being Facebook). For example, once I open Facebook, the app should send me
> a message which tells me, "Facebook, Opened".
>
> I know I first need to use a service, so I can put the app in background
> and open Facebook, but I have no idea where to start from.
>
> Can anyone suggest me some tutorials or even an idea on where to begin?
>
I don't think this is possible (at least not anymore), but you could look
at:

http://developer.android.com/intl/in/reference/android/app/ActivityManager.html
http://developer.android.com/intl/in/reference/android/content/pm/PackageManager.html

If such a thing were possible, it'd be in one of those.

-------------------------------------------------------------------------------------------------
TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/CANCScgj6mzhMBpi8EHtNg75L9yZUp20oFWwtrQfS%2BmQUdR8FLg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to