I looked in http://developer.android.com/reference/android/location/LocationManager.html#requestLocationUpdates%28long,%20float,%20android.location.Criteria,%20android.app.PendingIntent%29
and there is function requestSingleUpdate but in code in Eclipse I am getting error when I want to use requestSingleUpdate, like that function doesn’t exists. Did anybody have the same problem ?
I looked in http://developer.android.com/reference/android/location/LocationManager.html#requestLocationUpdates%28long,%20float,%20android.location.Criteria,%20android.app.PendingIntent%29 and there is function requestSingleUpdate but in code in Eclipse
Share
That function was implemented in API level 9 (Android 2.3). Most likely your project targets a lower API level. You can raise the target level to 9 or greater. Or you can use reflection to test if this method is available on the phone your app gets executed and use it only in this case (+ have fallback code for older versions).