gps

Convert GPS coordinates to a city name / address in Swift

邮差的信 提交于 2019-12-22 05:25:09
问题 I have a latitude/longitude location that I want to convert to the location name String in Swift. What is the best way to do this? i believe it's best to use the reverseGeocodeLocation function but not exactly sure how to. This is what I have so far: func locationManager(manager: CLLocationManager!, didUpdateLocations locations: [AnyObject]!) { if (locationFixAchieved == false) { locationFixAchieved = true var locationArray = locations as NSArray var locationObj = locationArray.lastObject as

Convert GPS coordinates to a city name / address in Swift

自作多情 提交于 2019-12-22 05:25:03
问题 I have a latitude/longitude location that I want to convert to the location name String in Swift. What is the best way to do this? i believe it's best to use the reverseGeocodeLocation function but not exactly sure how to. This is what I have so far: func locationManager(manager: CLLocationManager!, didUpdateLocations locations: [AnyObject]!) { if (locationFixAchieved == false) { locationFixAchieved = true var locationArray = locations as NSArray var locationObj = locationArray.lastObject as

Why does having Wifi on but not connected help Network location, when using LocationManager?

99封情书 提交于 2019-12-22 05:04:47
问题 This is possibly off-topic for SO, if so I apologise (and gladly accept the flag for closure), but I'm having issues figuring out why when WIFI is on, but not connected to any access point (on my android device), it vastly improves the accuracy of network provider when using LocationManager . Without it on, the general network location result is about 1 mile away from my current position. Also, most of the time the lat/lng values returned are different, so it's not even that it requested once

Find coordinates inside a rectangular area constructed by lat/long GPS pairs

跟風遠走 提交于 2019-12-22 01:48:18
问题 I've never deal much with location-based data, so very much new to the whole GPS coding related questions. I have a problem that I don't seem to find a very efficient way in solving it or maybe there's an algorithm that I'm not too sure. Let said you have given 4 lat/long coordinates which construct some kind of a rectangular area: (X0, Y0), (X1, Y0), (X0, Y1), (X1, Y1) ----------------------------------- | b | | a | | | d | | | c | ----------------------------------- e Is there a way to find

Is there way to programmatically enable GPS on Android 2.1 & above?

放肆的年华 提交于 2019-12-22 01:08:57
问题 I have been seeing different posts that GPS cannot be enabled programmatically How do I find out if the GPS of an Android device is enabled But this app enables the GPS when it is disabled. Can anyone please help me out. Thanks, Prateek 回答1: If the documentation said that it can't be set programmatically, I suggest you not to do so. There are many impacts why the documentation said that. And if someone was able to do that (enabling the GPS programmatically), it means he/she doing something

Detect phone movement when screen is off

和自甴很熟 提交于 2019-12-22 00:09:42
问题 I am developing an application which should detect user movement and when he stops for more than 5 minutes it should sound an alarm. I was able to detect movement with accelerometer but the problem is it doesnt work when the screen is off. I have also tried using partial wakeLock. Re-registering accelerometer doesnt work either (this should be workaround for motorola devices). Maybe I can do this using GPS and sound an alarm when GPS speed is less than 1m/s for more than 5 minutes but I am

AlarmManager & onStartCommand

五迷三道 提交于 2019-12-21 23:53:28
问题 I develop a GPS Tracking app on android. I use AlarmManager to wake up the device every 5 minutes. I developed a log file that shows that the application works great until a moment when I receieve public int onStartCommand(Intent intent, int flags, int startId) with startId = 1 again .... in this case I noticed that all variables are reset so I initialize all variables again .. the issue is that once this happens I keep getting same event with startID = 1 again and after few calls the app

location.getSpeed() not coming for Marshmallow, using Fused Location API

喜你入骨 提交于 2019-12-21 23:52:21
问题 I'm using Fused Location API in my app ( getLatitude() , getLongitude() , getSpeed() , getElevation() , and distanceTo() ). It was working fine until I updated my phone (Moto X2 2014) to Marshmallow. Now I don't receive speed in the location object in my app, rest methods are responding normally. However, if I run navigation on google maps in the background, I seem to receive speed inside my app as well. Also, my app seems to work without any issues on Nexus 5X (Marshmallow) and other below

Read data from an USB-GPS-Receiver

落花浮王杯 提交于 2019-12-21 23:23:02
问题 I'm wondering how difficult it is to read positioning data from an USB GPS Receiver (also known as "USB Mouse"). Is there some kind of ready-to-use API in .NET (like it is in mobile platforms like Android/WP7 etc.) which works because the GPS device's driver integrates much into Windows or is this some annyoing pinvoke stuff that depends on the GPS device? Any experience? 回答1: Typically a GPS device shows up as a virtual com port. You should see it listed in com ports in the device manager.

How to send GPS data from android to a website?

梦想的初衷 提交于 2019-12-21 21:54:01
问题 I'm new to Android and web service development! currently I'm working in developing Android program that will send longitude and latitude information to asp.net website (to show the location change the website map) the questions are - how to send this data to the website (the best practice)! - any suggestions for a suitable framework starting from the android application itself , inserting to database , client/server connection !! I've read a lot about web services specially REST ..but didn't