geolocation

iOS Location Services visits and system Frequent Location

依然范特西╮ 提交于 2020-01-01 00:34:53
问题 I noticed that Frequent Location on iPhone seems to use much less battery than an app monitoring iOS Visits (https://developer.apple.com/reference/corelocation/clvisit). Frequent location on iPhone can be viewed on the phone via Settings -> Privacy -> Location Services -> System Services -> Frequent Locations. I would like to know if Visit monitoring service from CLLocationManager is the same as iOS Frequent location or is it on different system used by Apple. If Apple is using the same

Unit Testing Location Service

烈酒焚心 提交于 2019-12-31 22:28:12
问题 I've got a location tracking service that I'm trying to unit test. I'm trying to use the locationManager.addTestProvider and setTestProviderLocation methods to achieve this. I can't seem to get any of the locations to pass through the provider and hit my LocationListener, however. Here is my code: public void testGettingLocations() { mLocationManager = (LocationManager)mContext.getSystemService(Context.LOCATION_SERVICE); if (mLocationManager.getProvider(TEST_PROVIDER) != null) {

Google+ API : Get Profile's currentLocation

有些话、适合烂在心里 提交于 2019-12-31 08:34:20
问题 I'm currently building a test and trying to get a google+ user location. I'm testing on myself and have set my position to public. I was originally planning to use Google Latitude, however, since Google is deprecating this API in a few days, my only option is to use the Google+ API. The parameter currentLocation was added a few months ago I'm therefore trying to get it. But could not manage to do it. I've tested on my own server using the PHP API and then the JS API with Oauth2.0, but this

Google+ API : Get Profile's currentLocation

此生再无相见时 提交于 2019-12-31 08:34:09
问题 I'm currently building a test and trying to get a google+ user location. I'm testing on myself and have set my position to public. I was originally planning to use Google Latitude, however, since Google is deprecating this API in a few days, my only option is to use the Google+ API. The parameter currentLocation was added a few months ago I'm therefore trying to get it. But could not manage to do it. I've tested on my own server using the PHP API and then the JS API with Oauth2.0, but this

Grabbing longitude and Latitude value from a function

岁酱吖の 提交于 2019-12-31 05:24:05
问题 Please how do i get the value of "lat" and "lon" outside their function to use else where on the page. navigator.geolocation.getCurrentPosition(handle_geolocation_query,handle_errors); function handle_errors(error) { switch(error.code) { case error.PERMISSION_DENIED: alert("user did not share geolocation data"); break; case error.POSITION_UNAVAILABLE: alert("could not detect current position"); break; case error.TIMEOUT: alert("retrieving position timed out"); break; default: alert("unknown

What method(s) can I use for geolocation through a Spotify app?

Deadly 提交于 2019-12-31 04:14:24
问题 The Spotify Apps API doesn't allow HTML5 geolocation and apparently the documented Location api call doesn't work and is being removed from the documentation. What are some methods that I can use to geolocate a user? 回答1: Solutions for finding website visitor's geolocation and its suggestion of http://freegeoip.net/ seems like your best option here. You'd just have to add http://freegeoip.net/ to your manifest for access from your app. 来源: https://stackoverflow.com/questions/20196869/what

TypeError: undefined is not an object (evaluating 'navigator.geolocation.requestAuthorization')

限于喜欢 提交于 2019-12-30 17:31:48
问题 I am attempting to call: `navigator.geolocation.requestAuthorization();` to request geolocation permission. But, this is resulting in error when running in iOS simulator This was working at one point, but stopped. I attempted to delete and create a new project. I also tried to uninstall/reinstall node and react-native-cli. import React, {Fragment, Component} from 'react'; import { SafeAreaView, StyleSheet, ScrollView, View, Text, StatusBar, } from 'react-native'; import { Header,

Notification from Background Geofencing in iOS 5?

ε祈祈猫儿з 提交于 2019-12-30 11:21:34
问题 Is it currently possible to create an app that "reminds me when I get to work, Siri" right now ? Or the app needs to be running to apply geofencing ? 回答1: Yes, it is possible by using the CLLocationManager's startMonitoringForRegion which will call your App when entered/left a certain "fenced" geo-area. BUT since the user's location is/will be used, the location icon will appear for as long as this call has yet been canceled (by the matching stopMonitoringForRegion) (on iOS6 this icon will be

Is there any browser (Chrome, Firefox) plugin that allows to simulate geo location?

丶灬走出姿态 提交于 2019-12-30 10:05:09
问题 I need to test web application that extensively uses geo location api (getCurrentPosition, watchPosition). Is there any browser (Chrome, Firefox) plugin that allows to simulate geo location? 回答1: If I understood the question correctly and you're asking for a way to fake geolocation responses for your web app, you might be able to do this in Firefox by overriding the geo.wifi.uri in the prefs, like Firefox's unit tests do. See: http://mxr.mozilla.org/mozilla-central/source/dom/tests/mochitest

iOS overlay (MKPolygon) data for all U.S. states?

给你一囗甜甜゛ 提交于 2019-12-30 09:22:45
问题 In the Displaying Overlays on a Map section of the iOS Developer Library Location Awareness Programming Guide, there is an example that "shows a filled and stroked overlay covering the state of Colorado." // Define an overlay that covers Colorado. CLLocationCoordinate2D points[4]; points[0] = CLLocationCoordinate2DMake(41.000512, -109.050116); points[1] = CLLocationCoordinate2DMake(41.002371, -102.052066); points[2] = CLLocationCoordinate2DMake(36.993076, -102.041981); points[3] =