Questions tagged [on-location-changed]
27 questions
2
votes
0 answers
When "Show window content while dragging " is disabled, dragged window location value does not update in WPF
The reported issue occurs when the check box in below image(This PC -->Properties-->Advanced System Settings-->(under Performance in Advanced tab click Settings)) is disabled.
Try to get the mouse cursor position while dragging a window in WPF. The…

niranjan kumar
- 56
- 4
2
votes
2 answers
Android :How to get Current Location in Longitude and latitude?
I want to store current Location to database when i click on Button.
The location is stored but it is receiving 0.0 ,0.0 don't know where's the mistake is in my code Here i post my complete code for this please help me out from this.
getting…
user6639890
2
votes
0 answers
Why does OnLocationChanged called twice every second?
I have an Android Application that write one line in a file every time the method OnLocationChanged() is called. Data inside each line is separated by a semicolon. I store the epoch time (System.currentTimeMillis()), the latitude and the longitude…

Jean Col
- 522
- 5
- 16
1
vote
2 answers
How to get the GPS distance moved in my position tracking app? Android, java
So I have gotten the GPS to track and log my position continously from when I "press play". And I want to display the distance traveled, the average speed, the ascent and descent during the time spent.
I am logging my position with my…

AndreasAngel
- 9
- 4
1
vote
0 answers
Android onLocationChanged not obeying update minimum duration and update older than previous one
I am experiencing some strange behaviour from monitoring the times of updated locations from the GPS LocationListener.
Sometimes (though intermittently) I will see the updated location have a timestamp a fraction of a second off (despite the minimum…

SSQ
- 83
- 8
1
vote
1 answer
NoSuchMethodError: No virtual method removeValueAsync()
if anyone could help, I'm following the code line per line exactly like in this Uber tutorial and when I run the app I get this error:
NoSuchMethodError: No virtual method removeValueAsync() ...
I can't think of how to resolve the issue.
I've…
user12064012
1
vote
0 answers
OnLocationChanged Method is not called in LeEco phones
I am using GoogleApiClient to get the location and that is working fine for some devices like Redmi, Honor, Samsung, Moto etc. but when I am using LeEco devices my onLocationChanged method does not call. is there anything which I have to add in my…

Shaifali Rajput
- 1,279
- 12
- 30
1
vote
2 answers
OnLocationChanged() is not automatically called. The location is not stored in the database
I have a gpsTracker java class which contains the onLocationChanged() method. I want to link my MainActivity's OnCreate function with this onLocationChanged() method.
public void onLocationChanged(Location newlocation) {
Log.d("latitude",…

Faiza Ahmad
- 57
- 1
- 7
1
vote
2 answers
Android : How to draw driving path with location changing in new google map services
I used google android map to mark current location and another location . Also I wanted to mark drive path between these directions. But I could draw just only a single line between theses two locations.
Here are my steps,
This is my layout…

Terance Wijesuriya
- 1,928
- 9
- 31
- 61
1
vote
1 answer
Activities lifecycle after pushed android button "recents" create new activity but dont destroy old activity
When i push android button "recents" and select my app again to go back to de app, the lifecycle of MapsActivity execute onCreate again and create a new instance of MapsActivity.
That´s ok, but the old MapsActivity still running in background and…

Itapox
- 579
- 1
- 7
- 25
1
vote
0 answers
How to get update current location in mainactivity instead of last location by using GPS?
This is the gps class for mainactivity to call track user location
public class TrackGPS extends Service implements LocationListener{
private final Context mContext;
boolean checkGPS = false;
boolean checkNetwork = false;
…

user2893432
- 13
- 6
0
votes
1 answer
Not getting Latitude and Longitude from LocationListener class
I am having problem with LocationListener. Why is my code not getting the latitude and longitude coordinates in onLocationChange() method? It is passing the coordinates of latitude and longitude to be 0. Can any one point out the error in this code…

ARSALAN AHMAD 74
- 3
- 3
0
votes
1 answer
How to refresh values into onLocationChanged
I have a map and I want the values, that I printed at markers, change during location such as latitude and longitude.Below it's the onLocationChanged
Location location = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
…

Edward M
- 83
- 1
- 9
0
votes
1 answer
why onLocationchanged is never called
I have implemented a way to retrieve the current location from Google Maps and it worked well.
But it does not work suddenly.
so I checked the code back into the past, but it still does not work.
I find what functions did not work, and I noticed…

Jshin
- 131
- 2
- 9
0
votes
1 answer
Location does not update
I have this code which gets current location with onLocationChanged. My problem is that when I move. I want it's location to change. What I get is that the app finds my current location. but it does not update the location when I'm moving. It still…

Mr Umbra
- 33
- 7