Is it possible to launch two applications with one Intent? For example, broadcast intents fire those who are listening to them.
My idea is to run a watcher while user is browsing websites using android browser. So far, my searches tell me to use intent filter to开发者_JAVA百科 capture ACTION_VIEW with data "http" or "https". But this isn't what I needed. It will ask users whether they want to use my application to complete action.
Any suggestions would welcome too.
If you want to run something in background, use Service
. If you need to have Activity
and Service
running simultaneously, then start you "watcher" Service
in onCreate()
and stop it in onDestroy()
.
You then will need to handle only Activity intent and user will not need to choose anything.
精彩评论