start activity but in background
My application will launch a new activity (say calculator) using intents开发者_Python百科.
My requirement is: Is there any way to start the new activity in background (not in foreground)?
Can you suggest any solution?
thank you
Short version : Use threads.
Not-so-long version : read about threads.
What do you want to do exactly? Depending on that, you have several options:
- You can use an AsyncTask
- You can use a local Service
- You can use a remote Service
- You can use a Thread
Use BroadcastReceiver to receive the Intent and start Service or Thread do what you want to do.
精彩评论