gps

GPS Location without service

不问归期 提交于 2019-12-10 16:54:13
问题 I am a new developer and have a simple question that I have searched all over for, but have not found a clear answer yet... Simply put, I am developing an application that needs to be able to use GPS. The trick is however that I would like to use GPS to get a phone's location even if they have no carrier service. With that said I have 2 questions. Is is possible to get the GPS location of a phone with no carrier service with a wifi connection? Is is possible to get the GPS location of a phone

How to know GPS Location without 'onLocationChange' method

白昼怎懂夜的黑 提交于 2019-12-10 16:14:15
问题 I want to send an SMS on click of one button and in the SMS i want to send location information. i tried: location = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER); but for the first time it shows null because no known location found. Hence i have to wait to fire 'onLocationChange' of the LocationListener, but i dont want that. Please tell me some other way so that i can get location at one shot. thanks. 回答1: Acquiring GPS coordinates the first time (if GPS Service is

Does fetching gps location in high accuracy mode deducts money from our balance?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-10 15:55:05
问题 Hi I am working on a project which requires fetching of user's current coordinates and I am fetching it in high accuracy mode. Ever since I started testing out this application in my device I have noticed that my money is getting deducted from my balance I am not sure why is it happening. I currently dont have a data pack and my mobile data is turned of in my device but I am connected to wifi. Even if some application is using internet for some purpose it should make use of the my wifi

GPS Provider unknown error in Set Mock Location?

不羁岁月 提交于 2019-12-10 15:18:02
问题 I'm trying to set my mock location however, I am getting the following error(Provider 'gps' unknown) and not to sure what is wrong? I've got all the permission declared in my manifest.xml along with all the parameters. Mock Location Method //Initiates the method to set the phones location private void setMockLocation() { mLocationManager.removeTestProvider(LocationManager.GPS_PROVIDER); mLocationManager.addTestProvider ( LocationManager.GPS_PROVIDER, "requiresNetwork" == "",

Make Android “uses-permission” optional

 ̄綄美尐妖づ 提交于 2019-12-10 15:14:51
问题 I have these: <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-feature android:name="android.hardware.location.gps" android:required="false" /> And I can check for GPS myself doing this: locationManager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); fSupportsGPS = (locationManager.getAllProviders(). contains(LocationManager.GPS_PROVIDER)); But I still have some

What can we use instead of nstimer?

為{幸葍}努か 提交于 2019-12-10 15:02:16
问题 I can get the GPS location in the background using [locationManager startUpdatingLocation] , but I don't know how to schedule it. I have used NSTimer for scheduling but many of them are saying that NSTimer will get expire if the application enters background. I want to know how to schedule calling the method , if we are not using NSTimers. 回答1: Apple provides 5 kinds of app task to run in background: Apps that play audible content to the user while in the background, such as a music player

How to restrict app usability to a certain geographical area ANDROID

半腔热情 提交于 2019-12-10 14:48:25
问题 I want to define a geographical boundary outside of which, the app will refuse to work. I already know how to do this with a square bound by two lat/long pairs: if ((dLAT.doubleValue() > 35.309171) || (dLAT.doubleValue() < 35.226442) || (dLON.doubleValue() < -92.790165) || (dLON.doubleValue() > -92.707081)) { LocalBroadcastManager localBroadcastManager = LocalBroadcastManager.getInstance(this); localBroadcastManager.sendBroadcast(new Intent("killapp")); } I also know about geofencing... or

Distance using WGS84-ellipsoid

拈花ヽ惹草 提交于 2019-12-10 13:40:09
问题 Consider points P1 (60°N, 20°E, 0) and P2 (60°N, 22°E, 0) on the surface of the Earth What is the shortest distance between the points P1 and P2, when the shape of the Earth is modeled using WGS-84 ellipsoid? 回答1: Unfortunately, Vincenty's algorithm fails to converge for some inputs. GeographicLib provides an alternative which always converges (and is also more accurate). Implementations in C++, C, Fortran, Javascript, Python, Java, and Matlab are provided. E.g., using the Matlab package:

GPS coordinates accuracy

自作多情 提交于 2019-12-10 13:26:21
问题 I have some data with GPS coordinates with upto 9 decimal points. Example of this is 39.1234567891 -75.1987654321 I need to process this data to get a context of where the person is. But I want to treat the coordinates encompassed within 100m as a single location for simplicity. Can anyone point to any reference that would indicate how many decimal points I should round off to get to this level of accuracy. 回答1: 9 digits is too detailed for any but a long term geodetic app. 6 digits is in

Detect wifi enabled (regardless of whether it's connected)

一世执手 提交于 2019-12-10 12:58:23
问题 For a GPS tracking app, recording location signals with WIFI turned on results in really imprecise data or data with gaps. I've used the Reachability queries to detect if wifi is available prior to starting tracking. The problem is that if when that query is made the wifi is enabled but not connected to a network, it shows that the internet is not reachable via wifi, but that's not an indication of if the setting is disabled in the settings app. This means that if the user starts running and