location

how to get satellite name or number when we are getting location through GPS in Android?

南楼画角 提交于 2019-12-03 13:25:33
问题 I am new in android, I am getting location through gps, I am also getting satellite number in our code but I want to get specific satellite name or number which is used to get the location. I have google so much but not getting proper solution regarding this. My Question is:- 1. It is possible to get a particular satellite name or number ? if yes please help me how to find it ? Thanks in advance 回答1: locationManager.getGpsStatus(null).getSatellites() (The caller may either pass in a GpsStatus

How do I decide what interval to use for requestLocationUpdates?

心已入冬 提交于 2019-12-03 13:20:08
LocationManager#requestLocationUpdates allows you to pass in a minTime and minDistance parameter. I'm having a hard time deciding what these numbers should be, and could appreciate some guidance. Our app is not a turn-by-turn navigation app; I just want to show the 10 nearest points of interest. Since I'm showing the 10 nearest, they can get a little stale, but if the user is in a moving vehicle, I'd want/need to update them pretty frequently to avoid staleness. I imagine a lot of people are in the same position of vague requirements: "I don't want the data to be too stale, but I don't want to

Where should I put third-party libraries?

偶尔善良 提交于 2019-12-03 13:05:57
问题 I contribute to a decent-sized C++ project with a number of dependencies. The problem is, the project contains the source of all of its dependencies (e.g. pcre, zlib, etc.). I want to trim the project down to just what's relevant to the program itself. Is there some relatively standard way to compile these libraries and put them somewhere, and have their header files also easily accessible? For what it's worth, I'm using Windows 7, and I'm developing using VS2005. I'm also a complete noob

Google Maps API: Getting coordinates of current location iOS

微笑、不失礼 提交于 2019-12-03 13:04:51
I am currently working with Google Maps API in my project. I am trying to set the default camera/zoom to the users location. I do this: @implementation ViewController{ GMSMapView *mapView_; } @synthesize currentLatitude,currentLongitude; - (void)viewDidLoad { [super viewDidLoad]; mapView_.settings.myLocationButton = YES; mapView_.myLocationEnabled = YES; } - (void)loadView{ CLLocation *myLocation = mapView_.myLocation; GMSMarker *marker = [[GMSMarker alloc] init]; marker.position = CLLocationCoordinate2DMake(myLocation.coordinate.latitude, myLocation.coordinate.longitude); marker.title = @

CLLocationManager.location is nil

随声附和 提交于 2019-12-03 12:46:12
this is my locationManager init method: func initLocationManager() { seenError = false locationFixAchieved = false locationManager = CLLocationManager() locationManager.delegate = self locationManager.desiredAccuracy = kCLLocationAccuracyBest locationManager.requestAlwaysAuthorization() locationManager.startUpdatingLocation() } after calling this method this line println(self.locationManager.location) prints nil why is that? it worked for me well at the past i just made few changes in my app and it doesn't work well now.. 1) CLLocation location documentation - The value of this property is nil

iPhone location button

纵然是瞬间 提交于 2019-12-03 12:29:42
问题 Ya know the little location button in the lower-left corner of the Maps application? Does anybody know where I can find that? I looked in UIButtonType and UITabBarSystemItem but came up blank. I'd prefer to use a system image or a system something-or-other, to help ensure consistency with other system functions. 回答1: Have a look at https://github.com/myell0w/MTLocation I mimiced Google Maps' Locate Me - Button, including 4 different states and the animation that is done when switching between

Why onActivityResult always return 0, even if ok button is pressed?

你说的曾经没有我的故事 提交于 2019-12-03 12:09:05
I want to implement a dialog that ask users to decide if want to turn on location wifi and gps, but onActivityResult it's always return 0 ,even if ok button is pressed, more detail: when wifi and gps are off ,return 0, but both are properly activated (ok button pressed). when gps it is on and wifi it off, return 0 ,but wifi it properly activated (ok button pressed). only when wifi it is on ,and gps it is off, return -1 ,but gps it properly activated (ok button pressed). here my code: public void activategps(){ builder = new LocationSettingsRequest.Builder().addLocationRequest(locationRequest);

How does the iPhone learn new WiFi locations in terms of using them for location estimates

。_饼干妹妹 提交于 2019-12-03 12:03:54
问题 I know the iPhone can and does use WiFi proximity to get approximate location. This obviously only can occur when some database in the sky knows the approximate location of that WiFi hotspot. My question is how do hotspots get into that db? Is it automatically added whenever the iPhone has a reasonably accurate GPS position and detects the WiFi or is there some manual or programatic way of adding hotspots? 回答1: Apple uses their own database since iOS 3.2 (prior to that they used Skyhook

Foreground service not receiving location updates in Android 7.0+ when screen is off

断了今生、忘了曾经 提交于 2019-12-03 11:53:41
问题 I am trying to create an Android application that continuously logs device location data in realtime while the device screen is off. My code works correctly with Android 6.0 and earlier but it seems that Android 7.0+ breaks my app. I have implemented an Android foreground service that uses a wakelock and subscribes to the Google FusedLocation API. Once the screen is turned off the onLocationChanged callback is never triggered. Has anyone seen a solution to this problem? I have tried disabling

Insert variable into Header Location PHP

隐身守侯 提交于 2019-12-03 11:35:05
The question is: How do i insert the variable (echo $url_endpoint;) as a part of the link in the last line: header('Location: http://linkhere.com/HERE_I_WANT_THE_VARIABLE '); <?php $url_endpoint = get_permalink(); $url_endpoint = parse_url( $url_endpoint ); $url_endpoint = $url_endpoint['path']; ?> <?php $useragent=$_SERVER['HTTP_USER_AGENT']; if(preg_match('/android.+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)