gps

Google Maps V2 : getting lat long value using GPS

孤人 提交于 2020-01-17 05:32:09
问题 I am creating a simple app which takes value of latitude and longitude using GPS and i am trying to pass it to google maps to show it on map. GPS is working fine but when i am using those values of lat long it does nothing at all. Only the map is visible with a default marker. MainActivity.java public class MainActivity extends AppCompatActivity { GoogleMap googleMap; GpsTracker gps; double lattitude; double longitude; Button btnMap; @Override protected void onCreate(Bundle savedInstanceState

GPS GPRS, how to receive and process live data

牧云@^-^@ 提交于 2020-01-17 04:58:24
问题 I have a GPS with a GPRS with an active SIM card. How do I go about directing the GPRS data to a specific website (IP port_ I believe port 3500 is used). I do not know how to acquire the GPS/GPRS data transmission and do not know how (or what should be done) to process the incoming data. I am not familiar with the route the GPRS data goes and how to acquire and process it. I assume it would need HTML/XML. I would like to process in real time. Also what format would a GPS normally send data?

How to calculate distance using coordinates from LocationManager

谁都会走 提交于 2020-01-17 04:49:07
问题 I am using LocationManager to get the values of Latitude and Longitude of a user. These values are updated regularly to a database. Now, i want to find out the distance between two users basing on the stored Latitude and Longitude values. I want to display a message when distance between two users is less than (say 100 meters). Can anyone please guide me with a tutorial or some sample code of how to achieve it. 回答1: You can have a look at the Location class. You can set the longitude and

Pause Location services when app is minimized?

故事扮演 提交于 2020-01-17 04:35:11
问题 I currently have an application that uses location updates when one of the activities is running. However, I want to pause/stop location services when the user minimizes the application, goes to the home, or moves to another activity until I need the location again. I do not want to stop the app, as there can be some continually running data. I just want to stop the location updates while the app is minimized. Then when the app is reopened, I want to begin the services again. Please and Thank

Pause Location services when app is minimized?

只愿长相守 提交于 2020-01-17 04:35:07
问题 I currently have an application that uses location updates when one of the activities is running. However, I want to pause/stop location services when the user minimizes the application, goes to the home, or moves to another activity until I need the location again. I do not want to stop the app, as there can be some continually running data. I just want to stop the location updates while the app is minimized. Then when the app is reopened, I want to begin the services again. Please and Thank

Android Maps GPS outlier

╄→尐↘猪︶ㄣ 提交于 2020-01-15 11:28:08
问题 Using the Android maps api I'm creating polygons as I collect location data from every third point. The polygons track my position fairly well. Problem is: Frequently the GPS returns points that are not remotely close especially when working around obstacles. How can I filter my location data for outliers? 回答1: Yes GPS has a hard time with especially around obstacles. Powerlines, buildings, etc. Simply filter them out. @Override public void onLocationChanged(Location location) { if (!location

Android Maps GPS outlier

无人久伴 提交于 2020-01-15 11:28:06
问题 Using the Android maps api I'm creating polygons as I collect location data from every third point. The polygons track my position fairly well. Problem is: Frequently the GPS returns points that are not remotely close especially when working around obstacles. How can I filter my location data for outliers? 回答1: Yes GPS has a hard time with especially around obstacles. Powerlines, buildings, etc. Simply filter them out. @Override public void onLocationChanged(Location location) { if (!location

GPS location and deep sleep

半腔热情 提交于 2020-01-15 10:57:20
问题 I've got a foreground service (with START_STICKY so no problem for the aspect "killed by OS")that receive a location (GPS) update every 2 seconds for navigation purpose. I don't take any wakelock. My question is: have I to take a wakelock to avoid a deep sleep? Or the location updates is enough to be "running"? 回答1: After of bit of digging in Android code, the response is: no, you don't need it. Android will grab a wakelock for you (LocationManagerService) until onLocationChange ends or your

How can we calculate/ to know, how much battery life my user defined application utilising?

蹲街弑〆低调 提交于 2020-01-15 07:18:06
问题 Here my question is, can we identify, how much battery life my android application is utilising. Because I developed an app based on GPS as well as network, service, broadcast receivers, so I have battery drain problem, so first of all i want to know that how much battery percentage is my application using. Any idea. Thanks in advance. 回答1: It is difficult to say exactly how much battery life is used by specific application. But, you can refer following links which may give you a little idea.

Plotting GPS coordinates using ggmap

懵懂的女人 提交于 2020-01-15 06:53:28
问题 I am attempting to create a plot of gps coordinates on a map in R using ggmap. Here is the first 10 rows of the dataset I am using: gps[1:10,] X_id lon timestamp lat 1 5555bcda65bc7d0f2c8d1a9c -4.018623 2015-05-15T09:31:06.859Z 53.23945 2 5555bcdb65bc7d0f2c8d1a9f -4.018623 2015-05-15T09:31:07.371Z 53.23945 3 5555bcdb65bc7d0f2c8d1aa2 -4.018623 2015-05-15T09:31:07.868Z 53.23945 4 5555bcdc65bc7d0f2c8d1aa5 -4.018623 2015-05-15T09:31:08.364Z 53.23945 5 5555bcdc65bc7d0f2c8d1aa8 -4.018623 2015-05