gps

Run GPS listener in background on Android

旧街凉风 提交于 2019-12-05 05:47:16
I would like to know how to receive GPS when the Android app is in the background. Is there a complete tutorial to explain it? Siddharth You need to use a AlarmManager to activate a pending intent (via a broadcast receiver) to launch a background service. Some sample code for you In your MainActivity AlarmManager am = (AlarmManager) getSystemService(ALARM_SERVICE); Intent notifyintent = new Intent(this, OnAlarmReceiver.class); notifyintent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); notifyintent.setAction("android.intent.action.NOTIFY"); PendingIntent notifysender = PendingIntent.getBroadcast

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

回眸只為那壹抹淺笑 提交于 2019-12-05 04:58:10
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 and just cached the result in lastKnownLocation() Obviously I'm using both GPS and Network providers

Android GPS Callback off UI Thread

老子叫甜甜 提交于 2019-12-05 03:43:50
问题 I'm having trouble getting the GPS's onLocationChanged to run on a different thread. I understand how to manage UI thread when I'm calling a function but with the GPS, I don't actively call the function. My intent is to have a light flash every time the GPS receives a reading. I have put this function in a Runnable. I passed this function to a class that implements LocationListener. Then in the main class, I started a new thread that calls requestLocationUpdates. I was hoping that

Get City name from GPS co-ordinates

Deadly 提交于 2019-12-05 03:01:36
问题 I want to get the name of the city from the GPS coordinates. I can get the details of the GPS points using Google API http://maps.googleapis.com/maps/api/geocode/output?parameters Where output is XML which I don't want to be... For example http://maps.google.com/maps/api/geocode/xmllatlng=53.244921,-2.479539&sensor=false&region=gb returns me the XML details of the coordinates.... Which I don't think is easy to get the name of the City.... I want only the name of the city.. Thanks for you help

Android - Can I set first priority to GPS to get current location in google map?

旧街凉风 提交于 2019-12-05 02:58:09
问题 I want to configure location settings such a way that first priority to get current location using GPS, If GPS is not available than get network provider's location otherwise not. Currently I am getting netwrok provider's settings only. I have set android menifest as below: <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />

How to track the GPS coordinates as user walks, from xamarin.forms for ios platform

我与影子孤独终老i 提交于 2019-12-05 02:57:27
问题 I just went through this link to track GPS co-ordinates of current location as User walks with a xamarin.forms app (iOS platforms) But I could not find how to do it, as I am born new to xamarin.forms, Can we do this in xamarin.forms or should I Create a xamarin ios project? Any links/tutorials to track the user location through xamarin.forms for iOS platfomrs would be appreciated, thanks in advance. 回答1: We used Xamarin-Forms-Labs to do this. Works perfect with Xamarin.Forms on all platforms.

Converting GPS coordinates to X, Y, Z coordinates

风格不统一 提交于 2019-12-05 02:47:18
问题 So here is the basic problem. I am currently working on a GPS system in C# in Unity 3D (the person that has given us the assignment is making us use this program, so I can't do it in anything else). Now I've run in to a small problem, basically we are able to request (what we think are decimal) coordinates from an android phone, but now we are trying to convert those coordinates to X, Y, Z coordinates. Preferebly X and Z, because we do not actually need height. However everything we have been

iPhone手机上的GPS位置信息采集与分享应用

会有一股神秘感。 提交于 2019-12-05 02:20:52
去年给清华大学水利系设 计实现了一款iPhone手机上的校友会应用。由于需要通过iPhone手机上报校友的位置信息,需要在iPhone手机地图上显示世界各地的校友位置, 所以对iOS平台的GPS与地图功能做了很深入的研究,最终顺利完成了校友位置上报与校友位置在地图上标注的功能。详情请参 考:https://itunes.apple.com/cn/app/qing-hua-shui-li/id597204697?mt=8 无独有偶,今年年初给几个朋友演示校友会时,他们对iPhone手机下的地图功能很感兴趣。原来他们是做电力设备监控的,他们的客户向他们提出能否在地图 上直观看到设备的分布与设备运行状态?由于在iPhone手机上能够解决地图位置偏差的问题,于是我写了一个iPhone手机下的GPS地理位置采集工具 给他们。该工具不仅可以采集实际卫星GPS地理位置,而且可以采集到偏差后的GPS地理位置。实际GPS地理位置可以用在桌面版本的Google地图上, 偏差后的GPS地理位置可以准确地标注到Google地图手机版本或者是高德的地图上。他们通过该工具去现场采集设备位置,然后将这些设备GPS位置数据 通过TXT或者CSV文件导出,就可以在监控系统中使用了。 有个同学,他们主要做城市节能路灯电源的。他知道这个工具后,很感兴趣,觉得对他们公司很有用

iPhone手机GPS时速表,里程表与海拔表

半腔热情 提交于 2019-12-05 02:20:42
前段时间开发的iphone手机“ GPS位置记录与分享 ”应用,不少用户觉得很实用。 一些户外用户提出希望加入海拔功能。 经过长时间的研究开发测试,完成了GPS时速表,里程表与海拔表功能。 也就是说,手持iphone手机,用户就可以知道自己的步行或者跑步速度, 走了或者跑了多远,户外爬山时知道海拔。 做为程序员,我平时运动少,现在,我每天中午吃完饭,会到外面散步 1000米左右。 欢迎朋友们下载实用,并提出改进意见。如果您能给个评价,我不胜感激。 主要界面: 行人时速表与里程表: 机动车时速表与里程表: 来源: oschina 链接: https://my.oschina.net/u/778469/blog/162948

iPhone GPS Performance

て烟熏妆下的殇ゞ 提交于 2019-12-05 02:12:55
问题 I'm writing an iPhone App that relies on getting the device location. Management have tasked me with producing data on how well the GPS performs in cities (tall buildings) and within buildings. Do any developers have data on reliability of GPS and the fall back to cell/wifi tower triangulation? Management-friendly info would be best but raw data that I can translate would also be fine. 回答1: To determine an object's location, the GPS system must receive a radio signal from at least three