I need to detect a user's coarse location (just the city and country) within the app. I have the normal android code using android.location.LocationManager class. But when I ported to NokiaX, the app does not report any location. The HERE sdk only talks about using the HERE maps (which I don't need)
Asked
Active
Viewed 74 times
-1
-
Which changes did you do when you did the porting ? – Dr.Jukka Jun 19 '14 at 10:48
-
I didn't make any change related to location stuffs. I only used the gcm wrapper for push. I was expecting LocationManger will still work since I didnt use GooglePlayServices – owsega Jun 19 '14 at 11:13
1 Answers
0
I just tried this with following permissions:
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.INTERNET"/>
and with code:
LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, this);
And it took less than 10 seconds to get first location in my balcony, and then it gets updates every second. Thus I don't see the problem in there.

Dr.Jukka
- 2,346
- 2
- 15
- 20
-
Thanks a lot. Just confirmed I was using 2 providers (network and gps). GPS was off by default on my test device, and there was no SIM (for accessing network). My bad. – owsega Jun 19 '14 at 13:43