views:

64

answers:

2

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.

A: 

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
it is possible. I have seen some applications do it. You need permission to do it (AndroidManifest.xml).
Viren Pushpanayagam
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
A: 

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