locationmanager

Android java.lang.AbstractMethodError on requestLocationUpdates

僤鯓⒐⒋嵵緔 提交于 2021-01-28 02:40:18
问题 i get this error java.lang.AbstractMethodError: abstract method "void android.location.LocationListener.onProviderDisabled(java.lang.String) when i call locationManager.requestLocationUpdates() . I saw another post where the answer was to override some methods i.e. @Override public void onProviderDisabled(@NonNull String provider) {} But the thing is i cannot override them anywhere in my project. I have simplified the code in order to help the readers and instead of two classes i have one

Button in ContentView that zooms to current location on MapBox map?

北城余情 提交于 2021-01-27 18:32:47
问题 So....in my coordinator--which conforms to the mapbox delegate protocol, I can just do: mapView.setCenter(mapView.userLocation!.coordinate, zoomLevel: 13, animated: true) and this function works fine in the coordinator or when it is called in the mapView class. The only problem is I don't know how to pass this mapView instance around (specifically back into ContentView where I want to have a button that does the same thing). I also have a LocationManager struct but I don't know how much use

Do network location provider need internet to determine location?

戏子无情 提交于 2020-12-03 07:42:56
问题 Do Android devices need internet when using network provider for location fetching? I see few articles saying it works without internet and few saying it needs internet. I am looking more into how Android internally does location fetching (rather than the code). Articles saying we need internet: Device captures cell id and wifi hotspots and sends it to google server. And google server returns the location information. These articles are saying we need internet to get location. Few articles

Do network location provider need internet to determine location?

◇◆丶佛笑我妖孽 提交于 2020-12-03 07:41:07
问题 Do Android devices need internet when using network provider for location fetching? I see few articles saying it works without internet and few saying it needs internet. I am looking more into how Android internally does location fetching (rather than the code). Articles saying we need internet: Device captures cell id and wifi hotspots and sends it to google server. And google server returns the location information. These articles are saying we need internet to get location. Few articles

Issues with “Allow always” location in iOS 13

我们两清 提交于 2020-06-25 03:39:47
问题 I've an app which depends on the user's location. Until iOS 13 the app worked correctly but now it doesn' send the user's location. I've tried to choose the option "While using app" and wait to the next prompt in order to choose "Allow always" but it doesn't work. Choosing "While using app" and going to settings for changing the option to "Allow always" doesn't work. (Both cases are the "official" answer of Apple in the documentation) Any idea? Thanks 回答1: From iOS 13 onwards, Apple replace

Issues with “Allow always” location in iOS 13

[亡魂溺海] 提交于 2020-06-25 03:39:23
问题 I've an app which depends on the user's location. Until iOS 13 the app worked correctly but now it doesn' send the user's location. I've tried to choose the option "While using app" and wait to the next prompt in order to choose "Allow always" but it doesn't work. Choosing "While using app" and going to settings for changing the option to "Allow always" doesn't work. (Both cases are the "official" answer of Apple in the documentation) Any idea? Thanks 回答1: From iOS 13 onwards, Apple replace

LocationManager is sending Last location all time

拟墨画扇 提交于 2020-01-25 10:01:06
问题 I have involved with location problems. I am getting my first time location and if i tried for next location, it is giving me Last location all time. I changed my location may times but all time, I am getting Last latitude and longitude. I think, GPS don't refresh. If i restarted to my phone and try again. it display to correct location and if i tried again, it is displaying me Last location. I am sharing my source code @Override protected void onResume() { super.onResume(); if(mMap!= null)