gps

Convert latitude and longitude into esri arcGIS MapPoint

徘徊边缘 提交于 2019-12-01 05:43:54
I am having trouble in converting the latitude and longitude values into android esri arcGIS map Point. Here's my code to get latitude and longitude values from GPS coordinates: LocationManager lm; String towers; double lat; double longi; TextView txt; lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE); Criteria crit = new Criteria(); towers = lm.getBestProvider(crit, false); Location location = lm.getLastKnownLocation(towers); if(location != null) { lat = location.getLatitude(); longi = location.getLongitude(); } now I have the latitude and longitude values. Now all I need is

Enable Location/GPS settings without using Play Services API

我是研究僧i 提交于 2019-12-01 05:33:01
As most of you might already known there is a new Location Settings Dialog API in Google Play Services. For those who don't know here is the screenshot of Maps app which used Dialog API in action. It is kinda unfair that google only added that API inside their play services. On the other hand, I think if they could do it, there would be a workaround to do it. That's why I am asking this question. Any information is appreciated. (Note: There was an exploit which let developers to enable and disable gps/location setting programmatically. However those tricks available on SO no longer works.

Android onLocationUpdate not called with GPS_PROVIDER

◇◆丶佛笑我妖孽 提交于 2019-12-01 05:19:45
问题 Hi I have an Android service using the location manager : if(locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)) { Log.i("service","start with GPS"); locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0,locationListener); } Then the location listener : private LocationListener locationListener = new LocationListener() { public void onLocationChanged(Location aLocation) { Log.i("location listener", "location updated"); } ... other methods .... } In the

How does a browser get GPS data from a computer?

[亡魂溺海] 提交于 2019-12-01 03:30:50
问题 This question was migrated from Super User because it can be answered on Stack Overflow. Migrated 8 years ago . HTML5 browser can retrive the gps position of a computer. http://diveintohtml5.ep.io/geolocation.html I would like to create an application that fakes a GPS device, but I couldn't read anywhere how the browser gets GPS data from the computer. 回答1: Chrome and Firefox: GPS via gpsd if available (Linux only) 1, 2 system's Location API (Windows 7 only) 2 WiFi networks via Google

Enable Location/GPS settings without using Play Services API

社会主义新天地 提交于 2019-12-01 03:16:08
问题 As most of you might already known there is a new Location Settings Dialog API in Google Play Services. For those who don't know here is the screenshot of Maps app which used Dialog API in action. It is kinda unfair that google only added that API inside their play services. On the other hand, I think if they could do it, there would be a workaround to do it. That's why I am asking this question. Any information is appreciated. (Note: There was an exploit which let developers to enable and

How can a 1 year old (java) lib correctly perform an UTC Time formatting, considering a newly introduced leap second

杀马特。学长 韩版系。学妹 提交于 2019-12-01 03:09:20
A timestamp expressed in milliseconds since 1.1.1970 UTC is a common way to store timestamps, e.g in Java. e.g: long timestampUtc = System.currentTimeMillis(); Such a timestamp can be formated in human readle time format, e.g using this code SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.US); df.setTimeZone(TimeZone.getTimeZone("UTC")); String humanTimeUtc = df.format(new Date(timestampUtc)); System.out.println(humanTimeUtc); which gives output: 2014-02-14 14:58:05 Now imagine that today at midnight the time administration introduces a new UTC leap second. If I run

iOS 8 gps not enabled

大兔子大兔子 提交于 2019-12-01 03:01:24
问题 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

Convert latitude and longitude into esri arcGIS MapPoint

丶灬走出姿态 提交于 2019-12-01 02:31:14
问题 I am having trouble in converting the latitude and longitude values into android esri arcGIS map Point. Here's my code to get latitude and longitude values from GPS coordinates: LocationManager lm; String towers; double lat; double longi; TextView txt; lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE); Criteria crit = new Criteria(); towers = lm.getBestProvider(crit, false); Location location = lm.getLastKnownLocation(towers); if(location != null) { lat = location.getLatitude(

Blackberry - change latitude and longitude on the device to test app

雨燕双飞 提交于 2019-12-01 02:20:16
I want to test my app on the device. Is it possible to hard code the latitude and longitude values somewhere in the device settings so the app reads those instead of the current location? I want to test my app for different locations other than my current location. Inside GPS mockup If you have access to your application code, you can always create a mockup implementation for LocationProvider so it will read location and speed data from file or RecordStore and return it as a Location , something like public class MockupLocationProvider extends LocationProvider { public MockupLocationProvider()

Android getbearing only returns 0.0. Trying to use to rotate current location icon

£可爱£侵袭症+ 提交于 2019-12-01 01:45:02
This is in part an extension to a previous question: Android programming, mapview locationoverlay: how to change the default blue location dot, with another image I have been working to get the devices location to display on the map (easy with enablemylocation) but I need to replace the default icon (easy enough, sorted that) and then rotate it to correspond to the current device bearing - acquired from GPS, as it needs to be direction of movement, not direction the phone is facing. I am using 'getbearing()' in the same way as I've been successfully using 'getlatitude()' and 'getaltitude()',