gps

Android GPS does not work until restart on new phones

别来无恙 提交于 2019-12-03 08:05:03
I have posted about this issue before, and found a few other people who have had the same issue with no solutions found. I am developing an Android app that submits a JSON query to a server with the obtained GPS coordinates and geocoded Zip Code. For brand new users that have never downloaded the app, GPS does not work whatsoever. It is not until rebooting the phone that GPS will work. After installing the app and then rebooting, the GPS will work every time without problem, even if they restart again. There is precious little information on this issue, and the only issue I have found refers

Why Location permission are required for Ble scan in android Marshmallow onwards

徘徊边缘 提交于 2019-12-03 08:02:22
With the latest release of Android called Marshmallow,Starting a Bluetooth Low Energy scan requires permission from Location group. As a result of that one of the following permissions are required: ACCESS_COARSE_LOCATION , ACCESS_FINE_LOCATION Any reason why we need to switch on GPS for BLE scan? Larry Schiefer BLE beacons can be used to get location information using nothing more than the BLE broadcast UUID data and an internet connection (e.g. iBeacon, AltBeacon etc.) Since this is possible and the data can be acquired via scan, a permission for location is required. In reality, ACCESS

Retrieving # of satellites used in gps fix from Android

雨燕双飞 提交于 2019-12-03 07:54:59
问题 I am trying to retrieve the # of satellites used in the GPS fix. I have implemented two different methods, as shown below: package ti.utils; import android.app.Activity; import android.content.Context; import android.location.GpsSatellite; import android.location.GpsStatus; import android.location.Location; import android.location.LocationListener; import android.location.LocationManager; import android.os.Bundle; public class Gps { private static final int TWO_MINUTES = 1000 * 60 * 2;

Angle between 2 GPS Coordinates

瘦欲@ 提交于 2019-12-03 07:50:55
问题 I'm working in another iPhone App that uses AR, and I'm creating my own framework, but I'm having trouble trying to get the angle of a second coordinate relative to the current device position, anyone know a good resource that could help me with this? Thanks in advance! 回答1: If the two points are close enough together, and well away from the poles, you can use some simple trig: float dy = lat2 - lat1; float dx = cosf(M_PI/180*lat1)*(long2 - long1); float angle = atan2f(dy, dx); EDIT: I forgot

Replace default GPS signal provider on Android devices

大兔子大兔子 提交于 2019-12-03 07:38:10
问题 I would like to replace the default GPS location provider on android phones with my own coordinate source. Is there any layer/API/library/provider that would allow to be replaced with my signal provider instead of the built-in hardware GPS, or read from an external plugin? It should allow all apps that rely on the GPS service to receive my signal instead of GPS. Ideally, the replacement should still be able to access the GPS signal (for comparison/correction or to toggle between the two

Storing and Querying GPS Coordinates Effectively

我怕爱的太早我们不能终老 提交于 2019-12-03 07:36:30
问题 I want to create a large database of GPS coordinates that can be queried by saying "Return all coordinates that are within 'n' metres of [this coordinate]". I need it to be as efficient as possible so looping through all the coordinates in the database and calculating whether a coordinate is within 'n' metres wouldn't be a desired solution. Is there an easier solution? Thanks 回答1: I typically do this sort of query using lat/lon. Using spherical geometry, you can put a bounding box around a

Lookup country for GPS coordinates without Internet access

我怕爱的太早我们不能终老 提交于 2019-12-03 07:13:53
I need to find out in what country given GPS coordinates are, on a device that has no Internet access (e.g. this , but without the easy on-line solution). Having no experience with GIS, I guess I'd need some kind of module that would statically store shapes of countries and match current location against them. I'd therefore like to ask what kind of tools would be best for this, and what is the best way to obtain the country data. I'm using Python on an embedded Linux box. There's a shape file here with all of the country borders. You can then use OGR or something like this to access the data.

How to correct smooth moving the marker in google maps v2?

旧街凉风 提交于 2019-12-03 06:25:05
问题 In my application needs to display a smooth "move" google maps marker from one point to another. I use the following method for the animation: public void animateMarker(final Marker marker, final LatLng toPosition, final boolean hideMarker) { final Handler handler = new Handler(); final long start = SystemClock.uptimeMillis(); Projection proj = mMap.getProjection(); Point startPoint = proj.toScreenLocation(marker.getPosition()); final LatLng startLatLng = proj.fromScreenLocation(startPoint);

How to use both GPS and Network Provider to get current location Latitude and Longitude values in Android

纵然是瞬间 提交于 2019-12-03 06:20:54
问题 In my Android application, I want to use both the GPS provider and the network provider for location updates for 5 seconds. First, I would like to use GPS provider (because it gives accurate results), and if the GPS provider returns latitude and longitude as 0.0 and 0.0, then I want to use network provider, but I don't want to use both the providers simultaneously. Any suggestions? 回答1: package loca.loca; import java.util.Timer; import java.util.TimerTask; import android.app.Activity; import

Can “overlay” size be zoomed together with the google map on android?

吃可爱长大的小学妹 提交于 2019-12-03 06:16:44
问题 I have been able to use "MapActivity" and "ItemizedOverlay" to draw overlays on google maps on android with Eclipse. But when the map is zooming in and out, the overlay does not change size. I want the overlay to be "fixed" on the map, and zoom in and out along with the map. How can this be done? I can't find the tutorial to define a boundary (e.g. with GPS coordinates as corners for the overlay image). Please provide links if you know some. and any other ways of doing it? Many thanks. 回答1: