location

significant location change does not trigger at least every 15min

对着背影说爱祢 提交于 2019-12-05 15:57:19
According to apple docs, significant location change should update location at least every 15min. I am indeed receiving updates when I move significantly, but not when the device is stationary. What is your experience with updates? Do they come at least every 15min? If GPS-level accuracy isn’t critical for your app and you don’t need continuous tracking, you can use the significant-change location service. It’s crucial that you use the significant-change location service correctly, because it wakes the system and your app at least every 15 minutes, even if no location changes have occurred,

iOS 8 - Can't get current location, Error Domain=kCLErrorDomain Code=0

别等时光非礼了梦想. 提交于 2019-12-05 14:42:28
I've problem with getting my current location. I still getting error: Error Domain=kCLErrorDomain Code=0 "The operation couldn’t be completed. (kCLErrorDomain error 0.)" I already did everything that I found here: Reset content and settings in iOS Simulator (map application in simulator shows correct location). In Xcode at Product>Scheme>Edit I unmarked Allow Location Simulation (when I mark it,It simulate e.g. London). I have added NSLocationWhenInUseUsageDescription to Info.plist file in my project (App asks for Location permissions and I can see them in Settings in iOS simulator). I have Wi

JavaScript操作BOM对象

人盡茶涼 提交于 2019-12-05 13:34:26
JavaScript操作BOM对象 BOM模型 BOM : 浏览器对象模型 (Browser Object Model),BOM提供了独立于内容的 , 可以与浏览器窗口进行互动的对象结构。BOM可以实现:弹出新的浏览器窗口、移动 , 关闭浏览器窗口以及调整窗口的大小和页面的前进 , 后退等功能。 Window就是整个BOM的核心,window又分为history、document和location。 window对象 1. window对象的常用属性 属性名称 说明 history 有关客户访问过的URL的信息 location 有关当前URL的信息 语法:window.属性名称=“属性值”;如:window.location=“ https://www.souhu.com ” ; 2. window对象的常用方法 方法名称 说明 prompt() 显示课题是用户输入的对话框 alert() 显示带有一个提示信息和一个确定按钮的警示框 confirm() 显示一个带有提示信息、确定和取消按钮的对话框 close() 关闭浏览器窗口 open() 打开一个新的浏览器窗口,加载给定URL所指定的文档 setTimeout() 在指定的毫秒数后调用函数或计算表达式 setInterval() 按照指定的周期(以毫秒计)来调用函数或表达式 confirm()与alert ()、

iPhone running periodical process in the background - battery optimized way

隐身守侯 提交于 2019-12-05 13:28:18
I want to run a specific task in the background. This task takes few seconds to complete (it writes some GPS location data to a file). This task should run once every 1 hour. As I understand from the SDK, I do not have a way to INITIATE something in the background unless I run Location Services forever. When this service runs, it gives me an event from time to time, and I'm able to run my code during these calls. I tried it, and even with the minimal precision possible, my battery goes down very quickly. So, I'm looking for a way to run Location Services for few seconds every hour. All the

Getting current location in Android Studio app

谁说我不能喝 提交于 2019-12-05 12:51:52
I am developing my first Android app which should get the latitude and longitude of an android device and send it via a web service to a template document. I followed the guide of getting the location from http://developer.android.com/training/location/retrieve-current.html . This is the code from my .java class: import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.location.Location; import android.location.LocationManager; import android.os.Bundle; import android.provider.Settings; import android.support.v7.app.AlertDialog;

Fused Location sometimes STOPS

吃可爱长大的小学妹 提交于 2019-12-05 12:21:07
I've been working on an app that tracks the user's position. For this I have used the google play services location module (a.k.a. fused location). All in all everything works fine. BUT sometimes, completely random, I no longer receive location updates from the google location services, at all! I mean, my app is working fine, but no location updates. Not only that,if I start up google maps it can't get a fix on my location (even with GPS turned on). Reinstalling my app doesn't fix the issue. Out of the 3 taxi apps that I have on my phone, 2 of them can pinpoint my location. (Most likely they

Android: best method to calculate distance between two locations

六月ゝ 毕业季﹏ 提交于 2019-12-05 12:17:10
i researched a little in this topic, but there are many opinions that don't exactly give a clear image. My problem is this: I'm developing a gps-based app for Android, in wich i want to know distance between my current location specified by Androids LocationManager, and other location in real time. I tried Haversine formula, a Law of Cosines formula, then I discovered, that Android SDK gives me a simple function Location.distanceTo(Location) - i'm not sure what method does this function runs on. So, the point is, wich one will be good for me to use, in situations when real distance between

NSLocationWhenInUseUsageDescription warning but i have already added it

痞子三分冷 提交于 2019-12-05 11:30:37
问题 While i have already added NSLocationWhenInUseUsageDescription I keep receiving this warning This app has attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSLocationWhenInUseUsageDescription key with a string value explaining to the user how the app uses this data FYI: I have multiple info.Plist in the app. Not sure what to do? 回答1: Adding both NSLocationAlwaysAndWhenInUseUsageDescription and NSLocationWhenInUseUsageDescription keys

Get nearby street addresses within a radius

旧街凉风 提交于 2019-12-05 10:38:28
I would like to retrieve a list of all the street addresses within a small range on a geopoint. A scenario for use is for a user to select his/her current address from a list of addresses (within say 50 meters) of current location, since location retrieval is not going to be accurate enough. I am wondering if that is possible using Google maps API? Otherwise does anyone knows an alternative API that I can use for this purpose? From what I've seen, although the Google maps reverse geocoding service returns a number of "addresses" for a geopoint they are usually just different representations of

how to get the current location latitude and longitude of android mobile device?

╄→尐↘猪︶ㄣ 提交于 2019-12-05 09:04:09
问题 I have implemented sample application for get the current location latitude longitude.If i lunch my application in emulator and i am sending latitude and longitude from Emulator Controls at eclipse then i am getting current location latitude and longitude which from emulator controls.If i lunch the same application in real device then i am not able to get current location latitude and longitude I have implemented code for get the current location latitude and longitude as follows: