1

I have get the location through GPS or Network the code referred from the link

What is the simplest and most robust way to get the user's current location on Android?

in my app used Service and Alarm Manager. Every two minutes once start the GPS listener and get the location. If the GPS data is not available the app get closed and the service is not running every two minutes.

If the GPS data is not available, I need to, the app is not get closed, after two minutes automatically start to GPS Listener to get geo data.

Please give any idea to fix that issue.

Community
  • 1
  • 1
Dhana
  • 554
  • 1
  • 9
  • 29
  • 1
    Show us your code and logcat with the error – Aleks G Oct 01 '12 at 11:29
  • if your not getting any location co-ordinates.. try to handle it. – Rahul Baradia Oct 01 '12 at 11:29
  • Aleks, Can't catch logcat error. because the app can't run in emulator. i have tested on mobile device, the app get closed. – Dhana Oct 01 '12 at 11:33
  • Tech.Rahul, I have handled if latitude and longitude is zero displayed Toast message as "Not able to show location" but closed the app after displayed the Toast message. – Dhana Oct 01 '12 at 11:35

0 Answers0