0

Possible Duplicate:
How can I keep my Android service running when the screen is turned off?

In my application. i call web services to check updates on webserver that is sended by android application. My application is not running when mobile is locked and i want to run my application in background. I'll be thankful for your advices

Community
  • 1
  • 1
Mickel
  • 45
  • 7

2 Answers2

0

You can run the Service that runs in the background or for updates you can use push mechanism rather then the pull mechanism. You can use Google cloud Messaging for push notification.

Praful Bhatnagar
  • 7,425
  • 2
  • 36
  • 44
0

The reason is that when your application doesn't have focus (I assume that you are using an Activity) it is paused or stopped.

You can use a Service if you want to run something in the background.

Adam Arold
  • 29,285
  • 22
  • 112
  • 207