gps

What are the things which reduces (Android) battery time?

谁都会走 提交于 2019-12-01 08:09:16
问题 In one of our application we need to use the GPS continuesly ,the purpose is to get the user driving speed. Recently I found that while using the GPS continuesly can drain the device battery. If the GPS device is not used, device battery will work for hours but if the GPS is used it reduces the battery life dramatically. I was wondering that "what are other things" which can reduce the battery time? How we can avoid them ? What are the best practices to use them? 回答1: Well i found the answer

Android runtime permissions on android versions below M?

只谈情不闲聊 提交于 2019-12-01 06:57:21
问题 Recently my ola cabs application, after the latest update, asked for location permission at runtime. It did not open the location settings screen but just by clicking on yes, my location (GPS) of the device was turned on and the application proceeded without going to location settings or any settings screen. This feature was about to come in android M and is available on the MNC preview only, so I am guessing it cannot be used in devices at this point of time. So how is this application

iPhone GPS Accuracy

放肆的年华 提交于 2019-12-01 06:55:03
问题 as I am developing for iPhone, I've just bought an iPhone 4 to test my application which needs to measure the coordinates of my location. I don't have any Internet (3GS, GPRS or whatever...) on my iPhone and the problem is: 1) Without internet I get a 1744m horizontal accuracy, and that's very bad. (I've also tested the accuracy in other applications too, and it is always as bad or worse) 2) With WiFi-Internet I get a 80m horizontal accuracy. Is that normal? What can I do to improve my

Android draw a path on a mapView from a large amount of longitude/latitude points

家住魔仙堡 提交于 2019-12-01 06:49:16
问题 I am writing a application that needs to draw a "route" comprised of lots of GPS points (long+lat). The points are close together and don't follow roads, simply drawing a line between each point is ideal. The current implementation I have is very slow as I am looping over all the GPS coordinates and creating a new Point and overlayitem in an itemized overlay. This takes around 20 seconds for it to load all of these points and draw them to the mapview. Is there a way in which I can construct a

iOS 8 gps not enabled

无人久伴 提交于 2019-12-01 06:34:42
I tackled an issue, that GPS services work perfectly on iOS 7, but on iOS 8 I never get the permission request and the method: - (void) locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations never gets called. My code is here: #import "Locator.h" @implementation Locator - (instancetype) init { if (self = [super init]) { // Start up the location manager self.locationManager = [[CLLocationManager alloc] init]; self.locationManager.delegate = self; self.locationManager.desiredAccuracy = kCLLocationAccuracyBest; self.locationManager.distanceFilter = 3; // New property

I keep getting an inaccurate location in Android

对着背影说爱祢 提交于 2019-12-01 06:26:51
my app records the gps location on a button click; however when I do it says I'm about three blocks away and is extremely inaccurate. Can you take a look at my code to see how I can improve it? Thanks @Override protected Void doInBackground(Void... arg0) { SharedPreferences prefs = getSharedPreferences("Settings", 0); final String id = prefs.getString("ID", ""); DefaultHttpClient httpclient = new DefaultHttpClient(); HttpPost httpost = new HttpPost( "http://iphone-radar.com/gps/gps_locations"); JSONObject holder = new JSONObject(); try { holder.put("id", id); LocationManager locationManager =

P3720 [AHOI2017初中组]guide

谁说我不能喝 提交于 2019-12-01 06:17:01
题目描述 农场主John最近在网上买了一辆新车,在购买汽车配件时,John不小心点了两次“提交”按钮。导致汽车上安装了两套GPS系统,更糟糕的是John在使用GPS导航时,两套系统常常给出不同的路线。从地图上看,John居住的地区有N(2 ≤ N ≤ 100,000)个十字路口和M(1 ≤ M ≤ 500,000)条限定通行方向的道路。第i条道路连接路口 A_i (1 ≤ A_i ≤ N)和B_i (1 ≤ B_i ≤ N),两个路口之间可能连接有多条道路。允许双向通⾏的道路是将两条单向通⾏的道路隔开所形成的。 John的家在路口1位置,农场在路口N的位置。John可以沿着⼀系列单向道路从家驾车到农场。所有GPS系统的底层地图信息都是⼀样的,区别仅在于对每一条道路的通⾏时间计算不同。对于第i条道路第一套GPS系统计算通行时间为P_i个单位时间,而第二套GPS系统则给出Q_i个单位时间。(所有道路的通行时间都是范围在1到100,000之间的整数)John想要驾车从家到农场。可是,一路上GPS系统总是不厌其烦的提醒John(请从路口X开往路口Y),这是由于John选取了某套GPS系统建议的路径,而另一套GPS系统则认为这不是从路口X到农场的最短路径。我们称之为GPS系统的抱怨。 请你计算一下如果John选择合适的路径到达农场能听到的最少GPS系统的抱怨数

Creating Turn-Turn Navigation iPhone app

天大地大妈咪最大 提交于 2019-12-01 06:14:51
问题 I am trying to build a turn-by-turn navigation app like TomTom or Mapquest, and I am looking for some help in getting started, in the direction of available options and licensing (if any). Technically, I think its fairly easy to plot the current location or address on map via Core Location. But I have some question more specific to routing. - Is there a Google/or any other API for turn-by-turn directions? - Technically, what is the best way to go about creating an app like that using

Location returns 0.0 with WIFI/3G/4G in Lollipop 5.0.2

允我心安 提交于 2019-12-01 05:51:56
问题 I am trying to fetch location based on WiFi/3G/4G connection but it always returns 0.0 as latitude and longitude . If same code is used with GPS ON then it works so something is changed from 4.4 onwards. Also tried following link but its not working too. http://www.androidhive.info/2015/02/android-location-api-using-google-play-services/ public class GPSTracker extends Service implements LocationListener { private static final String TAG = "GPSTracker"; private final Context mContext; boolean

Android - Network Date/Time

落爺英雄遲暮 提交于 2019-12-01 05:49:02
问题 I'm in the process of writing an app for Android. I need to allow my users to capture their current location & log the date/time that this happened. The catch is that the date/time cannot be something that the user can change by adjusting the date/time on their device. Can you point me in the right direction for obtaining the Cellular Network date/time when using location services for towers, and also how to obtain the GPS date/time. Any help is appreciated, thank you! 回答1: GPS or Network