• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Application nor run in the background

Ranch Hand
Posts: 633
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am developing one application in that when user dial '000' then some data (latutude,longitude) are sent to the server. But my application is not runing in the background. here is my code.

MyReceiver class contains code as

PressingCameraKey class contains

and MyService class contains

But when I press 000 then application is not run in the background. But it hit the URL. But when I add line moveTaskToBack(true); in my PressingCameraKey class then application is run in the background but many times it will not hit the specified URL.

Then please tell me what should I have to do that application is run in the background and it hit the URL

Thanks in advance

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic