gps

LocationManager requestLocationUpdates minTime OR minDistance

家住魔仙堡 提交于 2019-12-11 17:20:59
问题 I'm using Android's LocationManager and its method requestLocationUpdates like this: locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 3000, 10, this); As I found out both the conditions of minTime and minDistance have to be met for location update, but I need to get update every 3 seconds or 10 meters. I tried to put 2 requests like this: locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 3000, 0, this); locationManager.requestLocationUpdates

onActivityResult result code is zero also when the user click OK

久未见 提交于 2019-12-11 16:59:06
问题 GOAL: when the user opens the app and the GPS is off a dialog has to show and ask him to turn GPS on. PROBLEM: the result code passed to onActivityResult hasn't a consistent value. I mean: when I run the app and I click ok quickly on the alert dialog, resultCode is 0 (like if I'd clicked cancel) when I'm in debugging mode, I step through the code slower and I click ok on the alert dialog, resultCode become -1 (as expected) QUESTION: can you help me to find what's the root of this problem

Force close on Android Location Permissions

独自空忆成欢 提交于 2019-12-11 16:54:38
问题 I'm trying to get the user's location using Network as well as GPS. This is how my flow goes - Get LocationManager Check if Network_Provider is enabled If enabled, check for permissions, acquire permissions and get the location using network. If not, check for GPS_Provider, if not enabled, enable GPS from settings activity else acquire permissions and get the location using GPS. The problem - When I'm trying to request the permissions, the app goes into force close mode. Perhaps, I'm asking

Detect stationary device using GPS

核能气质少年 提交于 2019-12-11 16:22:14
问题 I am creating an app that alerts user if he has been stationary for a few minutes(say 10). I find it easy to detect motion, using LocationListener which triggers a function if device moved a certain distance. However, I want something different. I want a function to be called if the device did not move for a certain duration of time. How I achieve this? 回答1: You could easily set a timer and when the LocationListener fires, reset the timer to zero. If the timer reaches 10 minutes, then you

Get countries within range of LAT/LONG coordinates

久未见 提交于 2019-12-11 14:55:12
问题 Trouble! I'm looking for a way to find the countries within a given range of LAT/LONG coordinates. E.g.: When viewing an area in Africa using Google Maps, I get out which countries that are in my current view. This is a bit ambitious, and I think the main problem will be dealing with accuracy of the needed polygons. The accuracy of these don't need to be all that great, the borders can probably be tens of miles off, or even more. This will be needed for the entire world. 回答1: You can solve

How can I get the GPS location for use in a website?

孤街浪徒 提交于 2019-12-11 14:49:57
问题 I am developing a website that needs to know the user's location. All of the users will be employees of the company; there's no tracking of customers or anything like that. The users will be employees out in the field. They could be on Android phones, iPhones, tablets, or laptops. I've found several ways to get their location, but can't find specific ways to get that location back to our website. Ideally, we'd like the user's location to be reported to database and the website would get that

ios - Geolocation and Tracking in a gpx file

僤鯓⒐⒋嵵緔 提交于 2019-12-11 14:10:02
问题 I want to implement an application for IOS. This application should track a route in a gpx file. Can you tell me some links or open source project? thank you very much 回答1: so this is a bit of an old question I guess, but I found this in my recent search to do GPX and works really well. The creator has an amazing example on Git as well to see it in action: http://gpxframework.com/ For GPX files, checkout OSRM as well: http://project-osrm.org/ 回答2: check this simple apps to create GPX file

Convert from British coordinates to standard WGS84 nmea

自闭症网瘾萝莉.ら 提交于 2019-12-11 13:14:14
问题 I was posting similar post already. And I did get an answer in theory but I really need somone to help me. So I am using this EXAMPLE for testing my GPS. What I want to do is how to get standard decimal values like 56,322415 for latitude and longitude. Because now I am getting 5304,254 value. I need it in this form because I will use this for Google maps. Can you check code and tell me what should I left out or how to convert it to WGS84 format. Thank you. EDIT: Here is the picture that is

I want to read exif info in image in android. I can read exif from image in gallery but i cannot read exif photo taken from the camera

自古美人都是妖i 提交于 2019-12-11 13:08:46
问题 As shown in the figure above.I chose the take a picture exif information is null. I chose image from phone option and exif information is not null. 回答1: You cannot read exif data from a Stream using the android api. ExifInterface doesn't have a constructor with an InputStream. However, You can use the metadata-extractor and use the constructor with an InputStream to build an InputStream backed by your byte[] using a ByteArrayInputStream 回答2: It is now possible to read EXIF data from streams

Objective C, iOS 7 - CLLocationManager: didUpdateLocations is being called only once

你说的曾经没有我的故事 提交于 2019-12-11 12:34:14
问题 EDIT: Ok, I just have noticed that the problem is exclusive of iOS 7. I'm still being unable to solve it, however, so I suppouse I'll try with the sugestions bellow. Thanks to all! ¡Hi! I'm programming a navigator app, and I need to update the user position whenever is possible. I have two View Controllers that use CLLocation manager. In both of them I've added this line: #import <CoreLocation/CoreLocation.h> And then added the to the interface declaration, and I'm setting this as a property