location

Receive a notification (via BroadcastReceiver) when GPS (or location services) is started/stopped

妖精的绣舞 提交于 2019-12-10 20:37:49
问题 I tried an approach by using a BroadcastReceiver that listens for PROVIDERS_CHANGED action, but that only tells me when the location settings are turned on/off. I would like to know when the location services are being used to acquire a location by any application. I don't need to know which application is doing it, and I don't care for the location itself. I just want to know whenever some application tries to acquire a location, and when it stops doing that. Is this possible? 回答1: I don't

LatLng return 0,0

青春壹個敷衍的年華 提交于 2019-12-10 20:25:53
问题 I am trying to create an app that shows my current location I have all the permisson neccessary, I have another class name GPS tracker to get my gps locations Heres my code : GPSTracker gpsTracker = new GPSTracker(this); LocationManager lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE); lm.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, this); map = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap(); map.setMapType(GoogleMap.MAP_TYPE_NORMAL

Turn on location services without navigating to settings page ? Flutter Dart

余生颓废 提交于 2019-12-10 20:13:37
问题 We are migrating from to Flutter. We used this thread to Turn on location services without navigating to settings page How can this be achieved in Flutter? The current temporary code that navigates to settings: Future _getCurrentLocation() async { Position position; try { position = await Geolocator().getCurrentPosition( desiredAccuracy: LocationAccuracy.bestForNavigation); } on PlatformException catch(e){ print(e.code); if(e.code =='PERMISSION_DISABLED'){ print('Opening settings'); await

Removing the background location alerts in iOS?

廉价感情. 提交于 2019-12-10 19:24:16
问题 I'm writing a navigation app that tracks the user location. In order to continue showing notification about the route (when phone is locked, answering the phone, etc.) - i also need to continue tracking the location while the app is in the background: (Capabilities>Background Modes>Location updates, locationManager.allowsBackgroundLocationUpdates = true) I have been struggling with this question for a very long time and read a lot about it, but couldn't find the answer i'm looking for. i have

Android, get the location when the screen is off

只愿长相守 提交于 2019-12-10 19:03:29
问题 I use a started service with the fused api, and implement the location listener directly on it. The Location keeps updating even when the screen is locked, But it stops if the screen goes off. So, is there any way to make sure that the location will keep updating when the screen is off? I read a lot of other questions and I don't really know what i'm missing. public class CLocationService extends Service implements GoogleApiClient.ConnectionCallbacks, LocationListener, GoogleApiClient

Position JavaFX Button in a specific location

烈酒焚心 提交于 2019-12-10 18:08:41
问题 My Question is how can i position a javafx button in a specific location. All the time that i tried to do this simple code is resulting that the Button is only located in the Center of the screen and not on my desired location. (I'm using StackPane) Code: Button button = new Button(); button.setLayoutX(x); button.setLayoutY(y); Thanks in advance , Amit. 回答1: If you want to specify the exact co-ordinates of your node, you can use a Pane instead of StackPane . Your button, if added to a

How to get the user's current city name without using the core location service?

▼魔方 西西 提交于 2019-12-10 15:29:31
问题 So the original requirements was that on the launch of the app, the mobile app will get the current location of the user precise to City. Based on the city, the server/app client will give-city related content. I know it would not be too difficult if I could use the core location service (since you know suspicious (self-concerned) users usually will disable the location service for a not-so-trusting app). I have searched the web for few hours and get an summary of following solutions where I

GPS Provider unknown error in Set Mock Location?

不羁岁月 提交于 2019-12-10 15:18:02
问题 I'm trying to set my mock location however, I am getting the following error(Provider 'gps' unknown) and not to sure what is wrong? I've got all the permission declared in my manifest.xml along with all the parameters. Mock Location Method //Initiates the method to set the phones location private void setMockLocation() { mLocationManager.removeTestProvider(LocationManager.GPS_PROVIDER); mLocationManager.addTestProvider ( LocationManager.GPS_PROVIDER, "requiresNetwork" == "",

What are the permissions AdMob requires in android

£可爱£侵袭症+ 提交于 2019-12-10 14:49:34
问题 On Google’s site they only mention two of them: <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> Nothing about location? Is it ok? I noticed on forums that people also use other permissions, like: <meta-data android:value="true" android:name="ADMOB_ALLOW_LOCATION_FOR_ADS" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS

Why is Cell.CellReference optional? How do I get cell location otherwise?

爷,独闯天下 提交于 2019-12-10 14:05:51
问题 According to the OpenXml spec CellReference is optional. But is there an alternative way to get a cell's location? For example, I can get a row's cells by something like: foreach (Row r in sheetData.Elements<Row>()) { foreach (Cell c in r.Elements<Cell>()) { Console.WriteLine(c.CellReference); } } But without CellReference, how do I know the cells' locations? I have done some research and all solutions seem to rely on comparing a cell's CellReference against a given string. 回答1: The