gps

Change minTime for GPS LocationListener dynamically

匿名 (未验证) 提交于 2019-12-03 02:41:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: The app that I'm writing uses the GPS location manager service requestLocationUpdates() but I would like to be able to change the min Time and min Distance parameters throughout the program. I initialize the location listener on creation but I can't figure out how to change these parameters or even find out if it's possible to do that. The main purpose for this would be to conserve battery life when the program doesn't need regular position updates. Thanks so much for your help! -Dom 回答1: I'm not sure if this is correct, but faced with the

How to find out why GPS coordinates are missing in Android?

匿名 (未验证) 提交于 2019-12-03 02:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to get a device's location information using GPS, but for some reason one of the two coordinates is missing sometimes. This is the code: LocationManager lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE); Location location = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER); double longitude = location.getLongitude(); double latitude = location.getLatitude(); Log.d("LOCATION1", "Longitude: " + longitude); Log.d("LOCATION2", "Latitude: " + latitude); Sometimes I do get both coordinates, but not always, which

How does the iPhone learn new WiFi locations in terms of using them for location estimates

不想你离开。 提交于 2019-12-03 02:31:40
I know the iPhone can and does use WiFi proximity to get approximate location. This obviously only can occur when some database in the sky knows the approximate location of that WiFi hotspot. My question is how do hotspots get into that db? Is it automatically added whenever the iPhone has a reasonably accurate GPS position and detects the WiFi or is there some manual or programatic way of adding hotspots? Apple uses their own database since iOS 3.2 (prior to that they used Skyhook Wireless). This works by sending WiFi MAC addresses to Apple by GPS-enabled iOS devices. So if the device has a

GPS location on iOS and Android

匿名 (未验证) 提交于 2019-12-03 02:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have limited experience programming Android apps and none at all for iOS. Part of a future project of mine is to make my app be able to record the current location using GPS possibly on both Android and iOS. Can the GPS coordinates be taken in "Universal Transverse Mercator" format like in Google Earth for both platforms? If not, is there some way to calculate the coordinates to this format? EDIT: Any chance anyone would know what format the functions in their respective APIs return? 回答1: The API will provide a location object (class

Use GPS and Network Provider at the same time in Android

匿名 (未验证) 提交于 2019-12-03 02:14:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have implemented a locationlistener in my app which uses the Network Provider. This all works fine because i want a location quickly and with GPS Provider it takes ages. But I've come to a point in my app where location has to be accurate (max 5-10meters). I was wondering if it's possible to use the GPS provider with the Network Provider at the same time and then get the best result of both? And is it also possible to let me know when the GPS provider provided me with an GPS Location? So basically: LocationManager lm = (LocationManager)

LocationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER) is not reliable, why?

匿名 (未验证) 提交于 2019-12-03 02:14:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: One user of my app reported that app tells network for location is off even he did turn it on. He sent me few screen shots and they made me think; LocationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER) is not working properly. His phone is running Android 4.1.2 and first I thought this is the cause of this issue. But it was not the case. He sent me a screen shot of that setting too. Then I googled and found this . The question seems to help me but unfortunately answer was not helpful for this case and questioner did not pursue

Android - Unable to get the gps location on the emulator

匿名 (未验证) 提交于 2019-12-03 02:14:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: i'm tring to use the gps on the android emulator, i've the following code: public class NL extends Activity { private LocationManager locmgr = null; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.nl); locmgr = (LocationManager) getSystemService(Context.LOCATION_SERVICE); Criteria crit = new Criteria(); crit.setAccuracy(Criteria.ACCURACY_FINE); String provider = locmgr.getBestProvider(crit, true); Location loc = locmgr.getLastKnownLocation(provider); Toast msg = Toast

PHP extract GPS EXIF data

匿名 (未验证) 提交于 2019-12-03 02:13:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I would like to extract the GPS EXIF tag from pictures using php. I'm using the exif_read_data() that returns a array of all tags + data : GPS . GPSLatitudeRef : N GPS . GPSLatitude : Array ( [ 0 ] => 46 / 1 [ 1 ] => 5403 / 100 [ 2 ] => 0 / 1 ) GPS . GPSLongitudeRef : E GPS . GPSLongitude : Array ( [ 0 ] => 7 / 1 [ 1 ] => 880 / 100 [ 2 ] => 0 / 1 ) GPS . GPSAltitudeRef : GPS . GPSAltitude : 634 / 1 I don't know how to interpret 46/1 5403/100 and 0/1 ? 46 might be 46° but what about the rest especially 0/1 ? angle / 1 5403 / 100 0 /

Wakelock and doze mode

匿名 (未验证) 提交于 2019-12-03 02:13:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: According to Android Marshmallow documentation when the system is in doze mode, any wakelock is ignored. However it's not clear to me if a wakelock prevent doze mode or not. 回答1: Based on some testing, using a Nexus 5 with the the final(?) preview of Android 6.0 installed: Holding a PARTIAL_WAKE_LOCK is insufficient to block Doze mode ― the device will still doze, even though you have the WakeLock and are trying to do regular work (e.g., setExactAndAllowWhileIdle() to get control every minute) Keeping the screen on using android:keepScreenOn

How to get the current location latitude and longitude in android

匿名 (未验证) 提交于 2019-12-03 02:11:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: In my application, I get the current location's latitude and longitude when application is open, but not when the application is closed. I am using Service class to get the current location latitude and longitude in my application. Please tell me how to get the current location latitude and longitude even when application is closed 回答1: Before couple of months, I created GPSTracker library to help me to get GPS locations. In case you need to view GPSTracker > getLocation Demo AndroidManifest.xml <uses-permission android:name="android