gps

“location provider requires ACCESS_FINE_LOCATION permission” even if I use runtime request permission

落花浮王杯 提交于 2020-01-06 05:26:09
问题 This is so weird. We all know that if <uses-sdk android:targetSdkVersion="23"/> is set to 23+, you must ask for runtime permissions besides declaring <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> in the manifest. This has been working with no problem for years. Now, The problem is that when I am setting targetSdkVersion to "26", the LocationManager is not working anymore! and throws this error: "gps" location provider requires ACCESS_FINE_LOCATION permission The

android, check gps position if near/close to certain position

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-06 03:42:11
问题 I've got sqlite database/table with gps locations (latitude and longitude). Now I need the gps to check every few seconds if I'm near, so close to one of the positions within my database. what would be the best/easiest way to do this? Can anyone give some guildlines or maybe an example/turturial on how to do this? 回答1: Using the Location Managers Proximity Alerts would be your best bet, you can set an alert for each location in your table and then catch the intent when they are fired. These

problem in getting gps coordinates in android 2.1(Found Answer)

匆匆过客 提交于 2020-01-06 03:32:05
问题 I am having a problem in getting GPS coordinates in 2.1. The code i am using right now is working well in 1.6 but when i test this same apk in 1.6 device is showing null values please help me to find a way to work with 2.1 devices also Here is my code. public class GpsLocator { private static String PROVIDER="gps"; private LocationManager myLocationManager=null; public GpsLocator(Context context) { myLocationManager=(LocationManager)context.getSystemService(Context.LOCATION_SERVICE); } public

Location change glitches on map using polyline options

落花浮王杯 提交于 2020-01-06 02:49:30
问题 Im facing some problem with my application, specifically with route plot/draw on my google maps. Ive made test route around my house and found out, that GPS providers are not as accurate as similar applications like runtastic or endomondo. Sometimes Location listener makes incomprehensible changes on my map and the polyline then draws any lines on the map near my location even with perfect GPS signal. Some other time, it just doesnot work. It does not listen to location change. Can anybody

Alternating colors in GPX-Tracks

混江龙づ霸主 提交于 2020-01-06 01:30:08
问题 This Question refers to:How to summarize, group 4000+ GPX Trackpoints as Tracks named for by each days date? Garmin GPS-Tracks provide the option to define a different color for each track. As a perfection to the result of the referring question, I wonder how to apply alternating colors for each GPS-track. For instance the 1st. track (all trackpoints for that day) are colored 'Magenta' the 2nd. day is colored 'DarkGray' and the 3rd. day again 'Magenta'. Using the node (date) to alternate

GPS Tracking - MIN_TIME_BW_UPDATES “hint” issue in android 2.3 (Gingerbread)

余生长醉 提交于 2020-01-05 18:38:44
问题 I have a problem in my GPS Tracking app. I'm sending a sms message to users predefined contact every MIN_TIME_BW_UPDATES with his location. It works really well, but when I tried it on Samsung Galaxy running on Android 2.3.5 platform it started updating every meter, ( MIN_DISTANCE_CHANGE_FOR_UPDATES was 1 meter) when the user was walking (about 200 messages :)), I't works really well on ICS and JB, I couldn't find any documentation on these "hints". As far as I understand MIN_DISTANCE_CHANGE

IOS Core Location framework did'nt work out on ios 4.2 simulator

蹲街弑〆低调 提交于 2020-01-05 14:13:29
问题 IOS Core Location framework did'nt work out on ios 4.2 simulator.Anybody knows the issues.Any one a have ios 4.2 working code for getting current location. Thanks, VKS 回答1: Simulator always gives you default fixed location in Cupertino... For thorough testing of Core Location apps in simulator you can use following library: https://github.com/futuretap/FTLocationSimulator 回答2: U cannot test CoreLocation framework in simulator. U have to test it with device. 来源: https://stackoverflow.com

Get user current and exact location using GPS [duplicate]

谁说我不能喝 提交于 2020-01-05 11:51:12
问题 This question already has answers here : How do I get the current GPS location programmatically in Android? (22 answers) Closed 4 years ago . For my new app, I need to get user location using GPS. To do so, I am using fusedLocationProviderApi.getLastLocation . Most of the time I am getting null . But then I realized that all the APIs are intended to get notified on Location changed. But I want to take current exact location of user (consider user not moving) in the app. How do I get the

When I start the App with GPS off , and later GPS is activated, Location is not detected

谁说我不能喝 提交于 2020-01-05 07:14:06
问题 I am having problems with GPS detection over Google Maps in Ionic App. When I start the App with GPS off and later I change from Settings device to GPS on, clicking by Find Me button - centerOnMe() function - the GPS is not working. The function responses always `Error: GPS Timeout! ERROR = 3` At the beginning I thought that was a cache problem but I have found out that is not that. It doesn´t matter the using $state.reload from the view. ¿does anyone get the same issue? Thanks for the

Can't Switch GPS On/Off and Wireless Location Settings through System.secure

…衆ロ難τιáo~ 提交于 2020-01-05 05:25:10
问题 I want switch Location Providers On and Off, that is GPS and Wireless Location I added permission in manifest my code to change wireless location settings is... Settings.Secure.setLocationProviderEnabled(context.getContentResolver(), provider, true); whenever I run this code logcat shows error logcat out put Caused by: java.lang.SecurityException: Permission denial: writing to secure settings requires android.permission.WRITE_SECURE_SETTINGS I searched about this, many person says The WRITE