Questions tagged [android-location]

android-location refers to the location API provided by the Android framework.

References

1355 questions
0
votes
1 answer

Android - Mock Locations in IntelliJ Emulator Issues

I am fairly new to Android development, and I'm running into a strange issue with an app I'm trying to develop to get up-to-speed. Sometimes this app seems to work fine, but most of the times it does not. I'm trying to simply set the GPS lat/long…
svguerin3
  • 2,433
  • 3
  • 29
  • 53
0
votes
2 answers

User Location updates in every 30 minutes

How to find user updated location after every 30 minutes but there is no requirement to draw the map... The requirement is just to find the location and send it to any server after every 30 minutes.??? Thanks in advance...
Maddy Sharma
  • 4,870
  • 2
  • 34
  • 40
0
votes
2 answers

device location is always null

I have gone through many posts on SO regarding this issue: Tried everything in Here, Here and Here Nothing works. Everytime location is null. On device and on emulator :(. My GPS is on,internet is on and my manifest has following…
Abhilasha
  • 929
  • 1
  • 17
  • 37
0
votes
1 answer

Android OnlocationChanged storage

I would like to know what is the best way of saving the latitude and longitude from the onLocationChanged() method. Is it by using SharedPreferences, or an I*ntent/BroadcastReceiver*? Thanks.
user1437481
  • 470
  • 1
  • 9
  • 30
0
votes
1 answer

Emulator restarts when feeding latitude and longitude

I am trying to get latitude and longitude of user. I created a basic app. When I run it and feed latitude and longitude it restarts the OS in emulator. How can I fix this? Here is my code public class MGeolocationActivity extends Activity { TextView…
Om3ga
  • 30,465
  • 43
  • 141
  • 221
0
votes
2 answers

LocationListener does not get killed

I have a foreground service which implements LocationListener. When the Service is killed, it keeps on getting a fix. However this is what I call in the onDestroy() @Override public void onDestroy() { Log.e(getPackageName(), "Destroying…
tolgap
  • 9,629
  • 10
  • 51
  • 65
0
votes
2 answers

Wait for a value to be set to true

I want my code to wait for mGPS.GotLocaton to be true (set when the onLocationChanged event is fired) public class GPSManager { Context MyContext; boolean GotLocation = false; Location CurrentLocation; LocationManager…
James
  • 1
  • 3
0
votes
1 answer

Map marker placed some far distance to the corresponding co-ordinates

Im working on google maps app, the problem is when i placed a marker for the latitude and longitude (i manually entered the gps co-ordinates), the marker shows some what correct place but not the exact one, it was placed some far distance to that…
fargath
  • 7,844
  • 6
  • 24
  • 36
0
votes
1 answer

requestLocationUpdates() and removeUpdates() , unable to handle in separate thread using TimerTask

I am using Timer and TimerTask in my Service and I am scheduling GPS to check periodically using this method @ Service - onCreate() scheduleAllGPST.scheduleAtFixedRate(new AllGPSTimer(), 0, …
0
votes
1 answer

My satellite icon keeps coming on and off . Even when i have no connection to internet? How to disable this icon when internet is disconnected?

I have one problem in my application, The GPS satellite icon on the title bar keeps coming on and off . Even when I have no connection to internet?How to disable this icon when internet is disconnected?
user1407203
0
votes
1 answer

Android location manager getbestlocation return null

I need a little help with some information/help about LocationManager in Android. I'm using this code to get user's specific information depending on his location,but in some situations I get provider=null (I'm not pretty sure when,because that…
Android-Droid
  • 14,365
  • 41
  • 114
  • 185
-1
votes
0 answers

How can i get the address data

Here is the Problem NearbyFragment.class: @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode ==…
-1
votes
1 answer

How to create a location request?

Hi guys I am new to the game and am currently trying to develop a weather app for my portfolio, however I have encountered a few problems. Apparently the locationrequest method is deprecated and I would like to know how to alternatively request…
Alex
  • 1
-1
votes
1 answer

How from my android app get the EXACT latitude/longitude fast as possible?

Often when I request the latitude/longitude I receive an approximate value (around 300m of my actual position) and sometime it's also take a very long time to retrieve the latitude/longitude. but when I open google map my position is always very…
zeus
  • 12,173
  • 9
  • 63
  • 184
-1
votes
1 answer

App may need approval for background location

I have received an email from google that one of my apps needs to change the location permission from background to foreground.... I took a look at the app and it seems that is already on foreground... my permissions on my manifest…
Marco Martin
  • 185
  • 1
  • 4
  • 18