Ashwin Kanjariya
Ashwin Kanjariya

Reputation: 61

start activity but in background

My application will launch a new activity (say calculator) using intents.

My requirement is: Is there any way to start the new activity in background (not in foreground)?

Can you suggest any solution?

thank you

Upvotes: 3

Views: 790

Answers (3)

Jett Hsieh
Jett Hsieh

Reputation: 3159


Use BroadcastReceiver to receive the Intent and start Service or Thread do what you want to do.

Upvotes: 0

Vincent Mimoun-Prat
Vincent Mimoun-Prat

Reputation: 28563

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

Upvotes: 0

Raveline
Raveline

Reputation: 2678

Short version : Use threads.

Not-so-long version : read about threads.

Upvotes: 1

Related Questions