gps

How do I get coordinates from a GPS service into a text file?

江枫思渺然 提交于 2019-12-08 11:06:21
问题 I am new to Android programming. The source code that I have pasted is not my own, it is from a Github project. I want to save the coordinates of a GPS service into a textfile. Does anyone know how to do this? public class MainActivity extends AppCompatActivity { private Button btn_start, btn_stop; public Button save; private BroadcastReceiver broadcastReceiver; int delay = 1000; // delay for 1 sec. int period = 10000; // repeat every 10 sec. Timer timer = new Timer(); public EditText

Android google map on click of current location button show alert box if gps not enabled

北城以北 提交于 2019-12-08 10:58:21
问题 I have implemented Google map in my app. When i click on the current location button i wanted to show alert box if Gps is not enabled. I tried this way where i got the view of that button. SupportMapFragment fm = (SupportMapFragment) getSupportFragmentManager() .findFragmentById(R.id.map); View plusMinusButton = fm.getView().findViewById(1); View locationButton = fm.getView().findViewById(2); Using that locationButton i tried to use setOnclickListener but that did not help. My requirement is

How to make a database for my android app

夙愿已清 提交于 2019-12-08 10:38:13
问题 I am developing an android application which gives the nearest set of places as output.i hope to get the current location of the user and then app should calculate nearest locations by getting information from a database. My question is how I create a database and where should I create it? What are the techniques i should use?Hope a quick response from u guys. Thanks all...:-) 回答1: Before posting a question Google it. There are lots of samples and guides related to creating a database in

16bit CRC-ITU calculation for Concox tracker

房东的猫 提交于 2019-12-08 10:37:34
问题 I am creating C# code for a server program that receives data from a Concox TR06 GPS tracker via TCP: http://www.iconcox.com/uploads/soft/140920/1-140920023130.pdf When first starting up, the tracker sends a login message, which needs to be acknowledged before it will send any position data. My first problem is that, according to the documentation, the acknowledge message is 18 bytes long, yet the example they provide is only 10 bytes long: P.s. in the table above, the "bits" column I'm

Xamarin Recursive Location Request

▼魔方 西西 提交于 2019-12-08 09:50:19
问题 I'm working in a ios recursive function to send the message 'My App need request your location' each time that the user turn off his GPS then, the message should appears again requesting his location. I'm just using: public bool LocationServicesEnabled { get {return CLLocationManager.LocationServicesEnabled;} } public bool IsAuthorized { get {return CLAuthorizationStatus.Authorized == _authstatusLast;} } With those functions, the first one return me is the Service is Enable and the second one

In ANDROID, How to get a current position and tracking in map using GPS without giving any location in a program?

只愿长相守 提交于 2019-12-08 09:01:42
问题 I am new to android, can anyone help me for my question.... How to get a current position and tracking in map using GPS without giving any location in a program????? 回答1: You want the easy way out ! Use MyLocationOverlay object. you can get the current location by calling the method getLastFix(); . To enable tracking use enableMyLocation() . To add this object to the map you need to add it to your map overlays. MyLocationOverlay currLoc=new MyLocationOverlay(context,mapKey); mapView

Getting GPS satellites and atomic clock time stamp in iOS

痞子三分冷 提交于 2019-12-08 08:45:25
问题 Is it possible to get the GPS atomic clock time stamp in iOS? Also, is it possible to see which satellites were used in a certain sample? As far as I know GPS receivers get this info, but I didn't find any way to get access to it. 回答1: iOS is not providing any such public APIs to access those details. As per Apple documents: A location manager object provides support for the following location-related activities: Tracking large or small changes in the user’s current location with a

How do you determine with CLLocationManager when a user denies access to location services?

不羁岁月 提交于 2019-12-08 08:30:34
问题 With CLLocationManager I can use the following code to determine if I can access location services on the device. This is the master setting for all apps and can be turned on and off. if (self.locationManager.locationServicesEnabled) { [self.locationManager startUpdatingLocation]; } But a user can deny access to an individual app and in order to not execute the code to use the location manager I need to know if the user approved access to location services for this specific app. I saw that at

getting distance between two points using google gps api with php

家住魔仙堡 提交于 2019-12-08 08:14:54
问题 I found this link on Stack Overflow Google Maps - How to get the distance between two point in metre? which shows the following solution in regards to finding a km distance given two different latitude and longitude values: <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&libraries=geometry"></script> var p1 = new google.maps.LatLng(45.463688, 9.18814); var p2 = new google.maps.LatLng(46.0438317, 9.75936230000002); alert(calcDistance(p1, p2)); //calculates

Maps API only loads with location setting GPS

血红的双手。 提交于 2019-12-08 08:12:29
问题 I use the Google Maps API in my Android app and locate the user with LocationManager and getLongitude() , getLatitude() . But now there have to be strange settings on the mobile phone to get a map. The location setting has to be changed to only use GPS, and even then it's not working all the time, sometimes the map is not loaded. If not loaded the app shuts down at the point the first marker is set because of NullPointerException . Why is this and how can I prevent it? I already tried with