gps

Android location vs Google Play Services

拥有回忆 提交于 2020-01-05 05:09:06
问题 I've used both methods for my application and as expected I found Google Play Services to not only be more accurate but also a lot more stable and quicker. My question however is to why this is. I've read some differences between Android location and Google Play Services here and there, but I'd like to learn more about the underlying technologies used and why there is such a great difference in performance. I hope someone can share an article with relevant information or share his or her own

GetPositionAsync does not return on real device when indoors - Xamarin Android

依然范特西╮ 提交于 2020-01-04 15:29:06
问题 I am developing both and iOS and Android version that requires GPS using Xamarin. On iOS it's working fine, however now developing the Android version I have some issues with the GPS. It does not fetch the GPS but times out. However, on a emulator (using Genymotion) it fetches a coordinate right away. Note that I am using the Xamarin.Mobile (latest plugin 0.7.5). private async Task<HelpPosition> CreateGeolocator () { int accuracy = SettingsManager.Instance.GetSettings ().Accuracy; Geolocator

how to convert a timestamp_t to a real time?

给你一囗甜甜゛ 提交于 2020-01-04 09:37:33
问题 ive seen so many examples using a time_t, but timestamp_t is baffling me... Im doing an assignment where we need to print out GPS data, and the gps device returns a type timestamp_t for its time stamp and its an epoch time. Ive tried using gmtime() to convert and strftime() but nothing is working on that type. It keeps telling me it cannot convert timestamp_t* to time_t if i try using them. Anyone know of any function that can convert a timestamp_t to human readable time? thanks 回答1: This

android location update frequency

泄露秘密 提交于 2020-01-04 06:57:15
问题 I want to get 5 consecutive update locations in order to check if the user is moving and to make sure the GPS is calibrated. I did the following: I added android.permission.ACCESS_FINE_LOCATION" to the manifest and in onConnected: mLocationRequest = new LocationRequest(); mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY); mLocationRequest.setInterval(1000); // Update location every second mLocationRequest.setFastestInterval(1000); LocationServices.FusedLocationApi

Location from GPS_PROVIDER or NETWORK_PROVIDER in android is not consistent

こ雲淡風輕ζ 提交于 2020-01-04 06:00:29
问题 What I am trying to do Get users location at specified interval using a Service so that as long as application is running Location can be retrieved Problem I am facing Even if I am in same location for long time, each time the Latitude , Longitude changes with different Accuracy levels Due to this, even if user has not changed his location, if I am plotting the Location in GoogleMap it makes jump to very near by places being my zoom level 18.0f mGoogleMap.animateCamera(CameraUpdateFactory

Even PRIORITY_HIGH_ACCURACY gives very low accuracy location updates

不羁岁月 提交于 2020-01-04 05:39:10
问题 I'm using FusedLocationAPI to get high accuracy location updates (with 2 second update interval and 5 second fastest interval) . It works fine most of the times. But, sometimes it gives accuracy like 1200m. I understand that in the beginning it can happen. But, the problem I'm having is, I get fair (~20m accuracy) updates for a while and then suddenly switches to ~1200m accuracy. How can this happen in Fused API? 回答1: Sometimes it happens. Moreover, erroneous location fixes can arrive for 5

how to check radius of 10 meter from x,y position - from GPS

℡╲_俬逩灬. 提交于 2020-01-04 05:23:23
问题 i have this position from GPS: 40.715192,-74.005795 how to check if i in the range of 10 meter radius ? thank's in advance 回答1: Use Haversine formula http://en.wikipedia.org/wiki/Haversine_formula Pseudocode: R = 6371; // corrected earth radius, km dLat = degToRad(lat2-lat1); dLon = degToRad(lon2-lon1); a = sin(dLat/2) * sin(dLat/2) + cos(degToRad(lat1)) * cos(degToRad(lat2)) * sin(dLon/2) * sin(dLon/2); c = 2 * atan2(sqrt(a), sqrt(1-a)); distance = R * c; degToRad converts degress to radians

My phone is not moving, but GPS data still changing

 ̄綄美尐妖づ 提交于 2020-01-04 05:16:13
问题 I have a simple android code to send GPS location to a database periodically via a web service. For testing purpose I set the minTime to 2000ms. lm=(LocationManager)getSystemService(Context.LOCATION_SERVICE); ll=new SpeedoActionListener(); lm.requestLocationUpdates(LocationManager.GPS_PROVIDER,2000, 0,ll); But... when my phone is not moving, still it inserts different longitude and latitude values to the database. Even I disabled GPS it sends different longitude latitude to the database

Gps On App only works after Using Google Maps

时光毁灭记忆、已成空白 提交于 2020-01-04 04:15:12
问题 We have this android app that uses the maps api. Now when we run it, it usually doesn't work, when we call locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 100, 0, this, null); It doesn't really work, the LocationListener's onLocationChanged method is never called. However, if we run Google Maps and wait until the gps icon is on in the status bar, then our app does start calling onLocationChanged. So my question is, how is Google Maps "activating" gps, or if they're not

How to know if a jar file is already running?

时光总嘲笑我的痴心妄想 提交于 2020-01-03 15:36:40
问题 After a research in google i found good answers like: 1)using jps or jps -l to get the jars running under JVM OK with this answer but if the user has not java installed at all and i run my jar using for example a .bat file and a folder with java JRE. Also gps function is experimental and only JDK contais it and not JRE. 2)Check if jar running from shell I need a solution for this on windows platform.Although a platform indepedent solution is always prefferable. Something more about jps( cause