This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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
Life is easy because we write the source code.....