geolocation

Receiving Location even when app is not running in Swift

試著忘記壹切 提交于 2019-12-17 17:59:17
问题 Still very new to Swift. I have come from an Android background where there is BroadcastReceiver that can deliver location info to a service even though the app isn't running. So I was looking for something similar in iOS/Swift and it appears that before this wasn't possible but it may be now. I am developing for iOS 10 but would be great if it was backwards compatible. I found startMonitoringSignificantLocationChanges which I can execute to start delivering location updates, although this

Android - Reliably getting the current location

偶尔善良 提交于 2019-12-17 17:54:28
问题 My app checks at a specific time whether a user is at a given location. I use the alarm manager to start a service that makes this call: locationManager.requestLocationUpdates(bestProvider, 0, 0, listener); And also checks: locationManager.getLastKnownLocation(bestProvider); But I'm having problems when running on a real device. For one thing, getLastKnownLocation is most likely the last place the GPS was on, which could be anywhere (i.e., it could be miles from the user's current location).

iOS 6 breaks GeoLocation in webapps (apple-mobile-web-app-capable)

北战南征 提交于 2019-12-17 17:33:40
问题 I have an app that does a simple textbook navigator.geoLocation.watchPosition(...) that works great in iOS 5.x both in Safari and as a web app (using apple-mobile-web-app-capable meta tag). However, in iOS6, GeoLocation does not work in the webapp. It still works in safari as expected, but when I run the webapp, it prompts me for location permission, then silently fails. I see the location icon, but no events are thrown from watchLocation. I get no error events or any location events. Has

How to determine if an IP address belongs to a country

三世轮回 提交于 2019-12-17 17:32:23
问题 How would i determine the country that a spcific IP address is originating from using c#. I need to use this to check if connections originate from a specific country. 回答1: You can use this SQL data in your project to determine that: IP address geolocation SQL database. Download that data and import it into your database to run checks locally. Or you can use their free API that returns XML containing the country code and country name. You'd make a request to the following URL with the IP

Unable to get GPS coordinates using Javascript on browser in Android

烂漫一生 提交于 2019-12-17 16:29:15
问题 I am very new to android, java and javascript coding. I am trying to get current GPS co-ordinates and track it thereafter on an Android device. I am using webview and the majority of the code is written in javascript. I have searched a lot for a few days and tried many different ways but I am unable to get GPS co-ordinates on the android device. Please have a look at the code and hel pme figure out why I am not getting the GPS location. A few things to point are - 1. I downloaded and checked

phonegap geolocation always fail on timeout

拟墨画扇 提交于 2019-12-17 16:19:14
问题 I'm using sencha-touch 2.0 and phonegap 2.0.0 in my app to retrieve user's location. When runing on my locahost, everything works just fine. However, when loading the .apk to my android 15 api's device (using eclipse and the adt plugin), every call to getCurrentLocation or watchPosition never returns... here is my code: geoOn: function(){ var geoReady = navigator.geolocation || undefined; var onSuccess = function(position){ Top5.app.alert('Geolocation success '+String(position.coords.latitude

GeoLocation API [closed]

旧巷老猫 提交于 2019-12-17 16:11:06
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . I have just come across this great API: http://ipinfodb.com/ip_location_api.php However, I would like to also retrieve the continent. Is this even possible as I can not find it. Maybe there is another API that is freely available that will offer city, country and continent? I have tried Googles AJAX API but they

Android - How to get current location (latitude and longitude)?

亡梦爱人 提交于 2019-12-17 15:43:28
问题 I am using the following code to get the current location namely (latitude and longitude), but I am not getting current location (latitude and longitude). Anyone knows why? package com.ram.currentlocation; import android.app.Activity; import android.content.Context; import android.location.Location; import android.location.LocationListener; import android.location.LocationManager; import android.os.Bundle; import android.widget.Toast; public class Location_Gps extends Activity { /** Called

iOS 8 requestWhenInUseAuthorization no Popup

 ̄綄美尐妖づ 提交于 2019-12-17 15:34:09
问题 I tried to make my AppProject iOS 8 ready. I had read a lot about [_locationManager requestWhenInUseAuthorization]; and the entry in plist NSLocationWhenInUseUsageDescription So I changed all the necessary code lines. It works fine, but now I have copied my project again from my iOS 7 base to include new features. But when I make the changes for the iOS8 Location Privacy the Popup doesn't appear anymore. My code worked until I copied. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist

Tracking email with PHP and image

爱⌒轻易说出口 提交于 2019-12-17 15:14:55
问题 I have seen the service like spypig.com placing a small image in the email and tracking when it is opened and from where. They track city, country, IP address etc. How is this done? How do we know when the mail is opened? And how is the image generated? How is the IP address detected and how is it possible to know location from it? 回答1: Basically, in the HTML body of your email, there will be an <img> tag that would look like this : <img src="http://www.yoursite.com/tracker.php?id=123456" alt