gps

Android Listen For Change in GPS Status?

为君一笑 提交于 2019-12-30 07:46:12
问题 Hello I need to know how to listen for the following with the GPS in Android so I can update the UI in a PreferenceActivity . I have tried GpsStatus.Listener with nothing happening. GpsStatus.GPS_EVENT_STARTED GpsStatus.GPS_EVENT_STOPPED Any suggestions would be great. 回答1: mLocationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE); // Define a listener that responds to location updates mGPSStatusListener = new GpsStatus.Listener() { public void onGpsStatusChanged

Mock GPS location issue

ⅰ亾dé卋堺 提交于 2019-12-30 07:16:10
问题 I'm developing an APP that get user specified latitude,longitude, and altitude, then fake this GPS location on the phone, and show that I am at that location in google map. I have the required permission on manifest file and mocked location is enabled in developer settings. LocationManager lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE); //lm.clearTestProviderEnabled(mocLocationProvider); lm.addTestProvider(mocLocationProvider, false, false, false, false, false, false, false

Calculating distance and velocity between time ordered coordinates

∥☆過路亽.° 提交于 2019-12-30 03:36:11
问题 I have a csv containing locations ( latitude , longitude ) for a given user denoted by the id field, at a given time ( timestamp ). I need to calculate the distance and the velocity between a point and the successive point for each user. For example, for ID 1 I need to find the distance and velocity between point 1 and point 2, point 2 and point 3, point 3 and point 4, and so on. Given I am working with coordinates on the Earth, I understand the Haversine metric will be used for distance

Update Location Marker and draw path on Google Maps when walking/driving in Android

不问归期 提交于 2019-12-30 03:36:04
问题 I want to create a functionality like Google Maps. I want to update my location marker whenever a person start walking/driving. I am thinking of using onLocationChange method of LocationListner but I am not sure. I also like to draw the path with updating location on the Google Maps. All suggestions are most welcome. ItemizedOverlay:- public class LocationOverlay extends ItemizedOverlay<OverlayItem>{ private List<OverlayItem> myOverlays; Path path; static int cnt = -1; public LocationOverlay

Get position data from mobile browser

北城余情 提交于 2019-12-30 00:06:12
问题 I am developing a web app that will be hit frequently by mobile browsers. I am wondering if there is a way to get enough information from the browser request to lookup position data (triangulation or GPS) Not from the request directly, of course. A colleague suggested there some carriers supply a unique identifier in the request header that can be sent to a web service exposed by said provider that will return position data if the customer has enabled that. Can anyone point me in the right

HERE Maps API - get speed limit of all roads in a tile?

时间秒杀一切 提交于 2019-12-29 09:15:11
问题 I'm writing an app that closely tracks a user's driving speed. I'm currently using the HERE API getlinkinfo to get the speed limit of a road at a particular point using lat/long. https://route.st.nlp.nokia.com/routing/7.2/getlinkinfo.json?app_id=APPID&app_code=APPCODE&waypoint=37.421045,-122.092380 When the user is in an intersection or is on/under an overpass the lat/long doesn't specify which road the user is currently on so I don't always get the correct speed limit returned. I believe

Android “gps requires ACCESS_FINE_LOCATION” error

拈花ヽ惹草 提交于 2019-12-29 09:06:21
问题 I am using SDK-23, and every time I run the application, my SecurityException gets thrown and the error from the debugger reads as so: java.lang.SecurityException: "gps" location provider requires ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION permission. This seems like a simple mistake, however, my manifest file is completely correct. Here it is, and here is my MapActivity code as well: package com.buahbatu.salesmonitoring; public class MainActivity extends AppCompatActivity implements View

Android emulator's GPS location gives wrong time

北城余情 提交于 2019-12-29 08:38:32
问题 I am testing an Android GPS tracking application in the Emulator and I am running into a problem when trying to figure out if the last known location is stale or not. Getting the system time gives me the correct time, but when I call location.getTime() for the last known location the time returned is off by a few hours. I did some more testing and found out that every time I send a GPS location from the Emulator control tab in Eclipse (similar to geo fix), the location's time is advanced by

Could not find class 'com.google.android.gms.location.internal.ParcelableGeofence referenced from method glt.a

我的未来我决定 提交于 2019-12-29 06:26:10
问题 I have an app where homepage is map. Do not know why i am getting this error and along with this error Could not find class 'gpr', referenced from method gps.a I have updated eclipse so i tried to change to API key with new SHA1 fingerprint. But that does not work. My app is to show current location when you open the app. It just landed into whole map but in LOG cat i get these error. Here is my Logcat `07-08 12:54:39.897: I/Google Maps Android API(25749): Google Play services client version:

Python GPS Module: Reading latest GPS Data

喜你入骨 提交于 2019-12-29 03:33:11
问题 I have been trying to work with the standard GPS (gps.py) module in python 2.6. This is supposed to act as a client and read GPS Data from gpsd running in Ubuntu. According to the documentation from GPSD webpage on client design (GPSD Client Howto), I should be able to use the following code (slightly modified from the example) for getting latest GPS Readings (lat long is what I am mainly interested in) from gps import * session = gps() # assuming gpsd running with default options on port