Questions tagged [locationmanager]

The LocationManager class in Android provides access to the system location services. These services allow applications to obtain periodic updates of the device's geographical location, or to fire an application-specified Intent when the device enters the proximity of a given geographical location.

The LocationManager class in Android SDK provides access to the system location services. These services allow applications to obtain periodic updates of the device's geographical location, or to fire an application-specified Intent when the device enters the proximity of a given geographical location.

1041 questions
-1
votes
1 answer

Limits on requesting GPS location using Google Maps API V2

I am developing an android application that uses the Google Maps API V2. Part of my application requires to request the phones GPS location using the LocationManager. I am under the impression that there is a limit for the number of requests that…
-1
votes
1 answer

location manager removeUpdates NPE

I have a non activity class MyLocation searching for location which is called form MainActivity. When MainActivity is onPause() I want to remove updates but I get an NPE because the listener = null even it's running. I know I can catch the NPE with…
sascha
  • 225
  • 2
  • 4
  • 12
-1
votes
2 answers

Android: Nullpointer on location longitude?

It's been three days that i'm getting this error (before it was working, so... don't know): nullpointer exception on location.getLongitude(); my simple code (the last code of onCreate()): LocationManager lm = (LocationManager)…
D Ferra
  • 1,033
  • 3
  • 10
  • 20
-1
votes
3 answers

Trying to set marker on my current location on google maps gives Nullpointer exception

I have integrated Google Maps in my Android project. I am getting the view of the map on my device. I want to set the marker to my current location. I have done the following coding but it gives me a Null Pointer Exception on line 43 which is the…
anu_r
  • 1,502
  • 7
  • 27
  • 59
-1
votes
1 answer

Is it possible to get a user's location on nokiax without having to include the HERE maps sdk?

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…
owsega
  • 96
  • 7
-1
votes
3 answers

android.os.NetworkOnMainThreadException. How to solve it?

I am trying to get my current location and get the driving directions to some destination. I am able to get my location and when I execute the code for the driving directions I get android.os.NetworkOnMainThreadException in the following line …
android_eng
  • 1,301
  • 2
  • 16
  • 33
-1
votes
2 answers

some issue in detecting location application crashes

I am Trying to develop small application in which i am trying to Detect Location. I am using the following code but i don't know why my application crashes. It show the application stops Unfortunately. Here is the code. Please tell me if there is…
Nirav Kamani
  • 2,985
  • 7
  • 33
  • 67
-1
votes
1 answer

Why has my NETWORK_PROVIDER suddenly stopped calling onLocationChanged?

My NETWORK_PROVIDER in my GPS application has stopped working all of a sudden. It has nothing to do with my internet connection because every other application on my phone works with the internet. I tried it with GPS_PROVIDER and it works perfectly…
-2
votes
1 answer

How to get latitude and longitude android in offline mode

I am so interested, can i get gps coordinat in offline mode (without internet connection). Is it possible? how can do that? thanks in advance
Denny Kurniawan
  • 1,124
  • 1
  • 10
  • 22
-2
votes
2 answers

Location Listerner - Call requires permission which may be rejected by user

Used this code on previous app and all seems ok - but today im getting a call requires permission which may be rejected by user I have added
-2
votes
1 answer

Android Permission error in requestLocationUpdates

I am facing an error in location permission with android and this in the on the onCreate onCreate(Bundle savedInstanceState){ locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); provider =…
ahmed osama
  • 267
  • 3
  • 15
-2
votes
1 answer

Swift Pull to Refresh doesn't Show

i've add Pull To Refresh on UITableView on my Swift project successful, on another ViewController i'm not able to show it. On the others view the code is the same without LocationManager functions. I don't know where is my error! Below my…
Mit
  • 1
  • 2
-2
votes
1 answer

locationmanager does not have a member named verbosedictionary

My working code is suddenly giving this error when I upgraded to XCode 6.2 "ERROR: locationmanager does not have a member named verbosedictionary" This is the line in which it is throwing error: verboseMessage =…
-3
votes
1 answer

My App Crashes after sometime onLocationChanged(),

this is my LocationListener... i want my location listener to get the city only once, and store it into sharedpreference, then after that i want to use that location for other purpose.All works good, but it crashes after sometime. loclistener = new…
Waqas Khan
  • 79
  • 2
  • 8
-3
votes
1 answer

hi I am getting error "cannot resolve method locationmanager.requestLocationUpdates();

Sir, thanks for your help, here is the complete code of my program. hi I am getting error "cannot resolve method locationmanager.requestLocationUpdates(); public class MainActivity extends Activity implements LocationListener { public Button…
1 2 3
69
70