0

When a user tries to launch an application I want to suppress that application and then call another application. Example I want the user to authenticate himself before launching a particular system application (settings application etc). The authentication application should pop up every time the user launches the settings application

I know you will have to use broadcast receivers and intents but have no clue how to do it.

Janusz
  • 187,060
  • 113
  • 301
  • 369
Viren Pushpanayagam
  • 2,397
  • 6
  • 35
  • 39

2 Answers2

1

Sounds like you should create a "lib" project that have public interfaces that you can use. Then share them between the apps instead of trying to execute another app?

But what I know this is not possible to actually execute up another app, since this then gives dependency to something that you don't know if it is installed. It must already been started if the intents should work.

Also like the answer before, it could be used for abuse.

Look at this link for more information: http://mylifewithandroid.blogspot.com/2007/12/playing-with-intents.html

Andreas Mattisson
  • 1,051
  • 2
  • 19
  • 39
0

I sort of hope this isn't possible... Launching a different application from the one the user actually clicked? Leaves the door open for abuse.

benvd
  • 5,776
  • 5
  • 39
  • 59
  • it is possible. I have seen some applications do it. You need permission to do it (AndroidManifest.xml). – Viren Pushpanayagam Sep 29 '10 at 10:48
  • Your comment prompted me to do some googling, and found this SO question: http://stackoverflow.com/questions/3290936/android-detect-when-other-apps-are-launched – benvd Sep 29 '10 at 10:51