location-services

Enable GPS programmatically Android (without navigating to the location settings)

僤鯓⒐⒋嵵緔 提交于 2020-01-27 06:14:25
问题 How to enable GPS programmatically, as it does happen in the official Google Maps app by just clicking on the 'turn on' option on the pop up screen (without navigating to location settings)? 回答1: The Google Maps app is using what is now available to us as SettingsApi the Play Services SDK. You can use SettingsApi to inquire as to whether your desired LocationRequest can be fulfilled with whatever location providers are enabled. If it cannot be fulfilled, and Play Services thinks that the user

Enable GPS programmatically Android (without navigating to the location settings)

大兔子大兔子 提交于 2020-01-27 06:13:52
问题 How to enable GPS programmatically, as it does happen in the official Google Maps app by just clicking on the 'turn on' option on the pop up screen (without navigating to location settings)? 回答1: The Google Maps app is using what is now available to us as SettingsApi the Play Services SDK. You can use SettingsApi to inquire as to whether your desired LocationRequest can be fulfilled with whatever location providers are enabled. If it cannot be fulfilled, and Play Services thinks that the user

Enable GPS programmatically Android (without navigating to the location settings)

試著忘記壹切 提交于 2020-01-27 06:13:24
问题 How to enable GPS programmatically, as it does happen in the official Google Maps app by just clicking on the 'turn on' option on the pop up screen (without navigating to location settings)? 回答1: The Google Maps app is using what is now available to us as SettingsApi the Play Services SDK. You can use SettingsApi to inquire as to whether your desired LocationRequest can be fulfilled with whatever location providers are enabled. If it cannot be fulfilled, and Play Services thinks that the user

Region monitoring while Device is in Airplane mode

余生长醉 提交于 2020-01-16 06:28:48
问题 I can see that from iOS 8.3 onwards , location services are working fine in airplane mode and per second locations are delivered. But I am not able to get the region monitoring ie, region exit or region enter when device is in ariplane mode. Can anybody help me with this?. What is the behaviour of region monitoring in airplane mode.? 来源: https://stackoverflow.com/questions/35654305/region-monitoring-while-device-is-in-airplane-mode

Region monitoring while Device is in Airplane mode

本秂侑毒 提交于 2020-01-16 06:28:09
问题 I can see that from iOS 8.3 onwards , location services are working fine in airplane mode and per second locations are delivered. But I am not able to get the region monitoring ie, region exit or region enter when device is in ariplane mode. Can anybody help me with this?. What is the behaviour of region monitoring in airplane mode.? 来源: https://stackoverflow.com/questions/35654305/region-monitoring-while-device-is-in-airplane-mode

showsUserLocation action attached to button not working

我只是一个虾纸丫 提交于 2019-12-24 17:28:39
问题 I am having problems with a map view in my app. I have created a button that when clicked should show users location on the map, but nothing happens (no error messages occur). I believe the issue may lie in the way I've written the delegates. The code from the relevant .h and .m files is below: mapViewController.h #import <UIKit/UIKit.h> #import <MapKit/MapKit.h> #import <CoreLocation/CoreLocation.h> @interface mapViewController : UIViewController { MKMapView *mapview; } @property (nonatomic,

'LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient)' not returning any location if GPS is off

烂漫一生 提交于 2019-12-23 05:32:51
问题 I'm trying to get user's current location and for that I'm following this tutorial. I'm running the following code on a device running Android Lollipop so there's no issue of runtime permission here. Here's my code ( Update 1.0 ): @Override public void onConnected(@Nullable Bundle bundle) { Log.d("onConnected", "called"); mLocationRequest = new LocationRequest(); mLocationRequest.setInterval(1000); mLocationRequest.setFastestInterval(1000); mLocationRequest.setPriority(LocationRequest

Change fuse location setting while service is running

醉酒当歌 提交于 2019-12-23 03:01:44
问题 Hi I am integrating location service in my application. And for that I am using Google's fuse location service. My implementation is as follows : public class LocationNotifyService extends Service implements LocationListener, GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener { protected void createLocationRequest() { mLocationRequest = new LocationRequest(); mLocationRequest.setInterval(INTERVAL); mLocationRequest.setFastestInterval(FASTEST_INTERVAL);

Change fuse location setting while service is running

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-23 03:01:12
问题 Hi I am integrating location service in my application. And for that I am using Google's fuse location service. My implementation is as follows : public class LocationNotifyService extends Service implements LocationListener, GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener { protected void createLocationRequest() { mLocationRequest = new LocationRequest(); mLocationRequest.setInterval(INTERVAL); mLocationRequest.setFastestInterval(FASTEST_INTERVAL);

lastKnownLocation is always returning null when gps is off

喜夏-厌秋 提交于 2019-12-22 12:19:52
问题 I am using Google Service API , LocationServices.FusedLocationApi to find user's current and then updated Location. I have tested on emulator as well as on actual device and I have found that if I turn off GPS LocationServices.FusedLocationApi.getLastLocation() always returns null, however I get a valid value if I turn on the GPS. Here is the code which I am using: private GoogleApiClient mGoogleApiClient; private Location mLastKnownLocation; mLastKnownLocation = LocationServices