1

Hi friend
I am developing an app in android and i want to know when other application is launched .
for example i want when users run -viber- i running some code in my app . (for example silent the phone or anything)
DRAW ON OTHER APPLICATION can help me or i should to run a service or broadcastReciver for this ?


for examle i want to run this code

AudioManager audio = (AudioManager)getSystemService(Context.AUDIO_SERVICE);
            audio.setRingerMode(0);

when viber is launched .

anyone can help me ?
Thanks.

Armin
  • 71
  • 1
  • 8
  • This answer may help you. http://stackoverflow.com/questions/3278895/how-to-check-current-running-applications-in-android – Vigneshwaran.m Feb 27 '15 at 11:58
  • this is useful but how i can knew that any app is launched ? – Armin Feb 27 '15 at 12:07
  • You may run a service with intervals for listening changes in the packagemanager or try this http://stackoverflow.com/questions/3290936/android-detect-when-other-apps-are-launched – Vigneshwaran.m Feb 27 '15 at 13:03

0 Answers0