haythem souissi
haythem souissi

Reputation: 3273

get name of application when user launch this app

I want to create a service (or a broadcast)in my application that detect when the user select any application in the device. So my service will detect that a new application was started.

Is that possible?

Upvotes: 2

Views: 310

Answers (1)

Silverstorm
Silverstorm

Reputation: 15835

You should use getRunningAppProcesses() to load the list of running apps and check the variation in this list.

see this link

another solution is to analyze logcat output

see first answer to this question

Upvotes: 3

Related Questions