gps

Android- Google Maps V2 : Trace route from current position to an other destination

梦想的初衷 提交于 2019-12-11 03:37:25
问题 I started with this example, to draw a route between 2 address, type by the user. It is working. http://blog.rolandl.fr/1357-android-des-itineraires-dans-vos-applications-grace-a-lapi-google-direction But now I would like to draw a route from my current position to an other destination, type by the user. My problem is that I don't know how to retrieve the current position, in this case. I've tried to do : LocationManager locationmanager=(LocationManager)this.getSystemService(LOCATION_SERVICE)

Android GPS accuracy not even close to built in maps app

南笙酒味 提交于 2019-12-11 03:30:03
问题 I've been experimenting with the Android SDK for a few weeks now, trying to achieve an accurate location from a background service. After trying a few configurations, I currently have this on a loop: Criteria criteria = new Criteria(); criteria.setAccuracy(Criteria.ACCURACY_FINE); criteria.setAltitudeRequired(false); criteria.setBearingRequired(true); criteria.setCostAllowed(true); criteria.setPowerRequirement(Criteria.POWER_HIGH); bestProvider = locationManager.getBestProvider(criteria, true

What causes erratic GPS estimates during certain time intervals?

蓝咒 提交于 2019-12-11 03:19:42
问题 I have been developing location tracking apps and testing them mostly on my HTC G1 running Android 1.6. I find that there are certain time intervals -- of approximately 1-2 hours -- when the recorded GPS locations become very erratic: I end up with what looks like a random distribution of points around my actual location, but instead of being clustered tightly within a 10-50 meter circle as they normally are (I use a minimum accuracy for recording these locations), they are spread out with a

How to get user country without internet and gps (may be Carrier?) in iOS

萝らか妹 提交于 2019-12-11 03:17:09
问题 I want to get user country without internet connection and GPS . I tried getting user's Country using Carrier information (CTTelephonyNetworkInfo *info = [CTTelephonyNetworkInfo new]; CTCarrier *carrier = info.subscriberCellularProvider;), but this provides Carriers original location, not Active country. For example if the user has AT&T sim card and he is in France, I get U.S. Any suggestions? 回答1: You can try getting the User's TimeZone city by checking the timeZone selected on the device

Clarification on min distance on LocationManager.requestLocationUpdates method, min Distance parameter

倖福魔咒の 提交于 2019-12-11 03:16:03
问题 I researched online and saw that Location Manager.requestLocationUpdates method and saw that it took an argument of minDistance. The definition that the site(http://blog.doityourselfandroid.com/2010/12/25/understanding-locationlistener-android/) gave me for that argument was "minimum distance interval for notifications" with an example of 10 meters. Can anyone clarify what that means? Everytime i move 10 meters with a phone, i get an gps update? 回答1: Yes, essentially this means that if the

GPS coordinates on mobile phones

拈花ヽ惹草 提交于 2019-12-11 02:27:48
问题 Can GPS on a phone, such as iPhone or Android determine your Z coordinates ? I know it certainly has to be able to determine X and Y, well longitude, latitude that is, but what about the Z coordinates ? Can it determine your height, and can I obtain height relative to ground ? 回答1: Height, as measured by a gps, is relative to the WGS84 ellipsoid. The WGS84 is representative of the field where the gravity is the same, the geoid. Not quite the same as the ground. 回答2: You can determine altitude

Experience of Location Services on Android using GPS and Network providers

删除回忆录丶 提交于 2019-12-11 02:06:45
问题 I have written a piece of code to get a feel of what my customer (cab driver) will experience when I enable location services on his device for my cab booking application. I enabled location services using both Network and GPS providers on the same listener. LocationManager lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE); lm.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, // God.KM20TIME, God.KM20DISTANCE, (LocationListener) updates); lm.requestLocationUpdates

How to check GPS service is enabled or not in IONIC FRAMEWORK

别等时光非礼了梦想. 提交于 2019-12-10 23:52:27
问题 I am developing an application which has a facility to track user location for that I used Cordova Geolocation plugin but, before that have to check GPS is enable or not. 回答1: In the Cordova Geolocation plugin there is the method: navigator.geolocation.getCurrentPosition(geolocationSuccess, [geolocationError], [geolocationOptions]); That is all you need. If geolocation is disabled, the geolocationError function is called. The docs say that on android you need to specify a timeout in the

Finding latitude and longitude using Android.Xamarin

拈花ヽ惹草 提交于 2019-12-10 23:16:50
问题 I am trying to develop a store locator app in Android.Xamarin. My first step is to find my location's latitude and longitude. But my emulator/device screen shows nothing. I have my uses-permissions set to <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> This is my code:- Location _currentLocation; LocationManager _locationManager; TextView _locationText; TextView _addressText; string

Android GPS. Location Listener does not want to acquire a fix :(

时间秒杀一切 提交于 2019-12-10 22:36:06
问题 Here is a code below that suppose to listen for GPS updates and send notifications to main activity However it does not seem to be working :) No errors, only onLocationChanged is not called! Funny thing is: when I run some other app to get GPS fix and after that start my app => onLocationChanged gets called, only accuracy is degrading, and eventually fix is lost. I also tried to add to this code GPS listener=> it works, satellites in view got reported every second, only fix is never accuired.