gps

2 Phones closeby position tracking without GPS

北城以北 提交于 2019-12-12 03:54:50
问题 Is there any way of getting any location data between two closeby devices (distance, direction etc.) using any of the phone capabilities without internet or GPS? If I have two phones that are in a building. Can they find each other without GPS? 回答1: One of the most important capabilities that smartphones now have is knowing where they are. More than desktops, laptops, personal navigation devices or even tablets, which are harder to take with you, a smartphone can combine its location with

Android Google Maps API GPS location is changing even when device is at the same place

给你一囗甜甜゛ 提交于 2019-12-12 03:44:18
问题 I am using Google Maps API for my application. My GPS location is changing even when device is at the same place, the location is said to be updated every 6s and thus it keeps updating but it also moves a little with each update and sometimes a lot. My code is below. And I'll also add screenshots. package b.a.location_tracker; import android.graphics.Color; import android.location.Location; import android.support.v4.app.FragmentActivity; import android.os.Bundle; import android.util.Log;

Android - How can I calculate the cumulative distance with GPS

我是研究僧i 提交于 2019-12-12 03:34:09
问题 How can I calculate the cumulative distance travelled using the Android GPS? I'm using Android Location services to listen to the location change events but simply finding the distanceTo from the last point to the new point and adding it to a running total tells me I've travelled a distance when I'm stationery. public void onLocationChanged(Location newLocation) { if (lastLocation != null)) { distanceTravelled = distanceTravelled + lastLocation.distanceTo(newLocation); Toast.makeText(this,

Check if the user location is near of some points

别说谁变了你拦得住时间么 提交于 2019-12-12 02:49:54
问题 I have a question about GPS alarm. I have some points (latitude and longitude). I need a way to check if the user location is near to some of these points (approximately are 1800 points). If I remember correctly there is a best practice to do this: to be notified when GPS position is in a certain region. This allows for optimizations regarding the battery. Can you give me any suggestions? 回答1: 1800 points as per 1800 different regions to be monitored? It is not possible. See here: For this

GPS Location always remains active in notification tray after exit MapView

寵の児 提交于 2019-12-12 02:44:11
问题 Original Title: "Location set by GPS" still remains active after LocationServices.FusedLocationApi.removeLocationUpdates() Edited Title: GPS Location always remains active in notification tray after exit MapView I want to disable remove the "Location set by GPS" and the location icon in top notification tray right after exit my map activity but it doesn't. I'm using someone's code in stackoverflow which using following variable only: GoogleMap mGoogleMap; MapView mapView; LocationRequest

Android: LocationManager.requestLocationUpdates doesn't respect params

笑着哭i 提交于 2019-12-12 02:42:33
问题 I have a problem recieving notifications from LocationManager after a set period of time: locationManager = (LocationManager)getSystemService(LOCATION_SERVICE); if(useGPS) { locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 999999, 999999, locationListener); In emulator my location listener's onLocationChanged method gets called whenever I send a fix via emulator control (i.e. every other second) So, the question is - is this because the way I'm testing on emulator, or

NMEA message to Android Location

倾然丶 夕夏残阳落幕 提交于 2019-12-12 02:41:21
问题 I am working with an external GPS, since they are far more accurate. I already have the bluetooth connection worked out, but now I'm stuck in a flood of NMEA formatted messages. It seems like, since you can get NMEA out of the built in GPS stack, that there must be a way to get a Location given a NMEA message. How do I go about converting my NMEA messages into useful Location objects? 回答1: NMEA is quite easy to parse. There are various types of sentences for different things. For location

Extract latitude and longitude from coordinates

*爱你&永不变心* 提交于 2019-12-12 02:39:33
问题 I have this sort of data, and I want to extract the latitude and longitude in Python. col[index]= 52.420223333,-1.904525 52.420221667,-1.904531667 52.420221667,-1.904536667 52.42022,-1.904545 52.420218333,-1.904553333 52.420216667,-1.904556667 I know how to do this in PHP, but wasn't sure how to implement it in Python: sscanf($string, '"(%f, %f)"', $lat, $lng); EDIT: This code runs and outputs the coordinates above for index in range(len(col)): print col[index] In the for loop, is it possible

Creating fake status bar information

蓝咒 提交于 2019-12-12 02:33:20
问题 I'm trying to fake some information that are shown on the status bar (I'm doing this for a good reason, for example when a thief steels the phone, he doesn't deserve to know the status of anything: battery, WiFi, 3G, GPS, etc...) I know that this is possible somehow without creating a ROM, see this app in the Android market: CSB Fake at 2:26 in the video, he fakes the battery level IN THE STATUS BAR! I really need to know how is this done. There are only two ways I can think of at some

Waiting for GPS fix dialog box throws Bad token Exception - Android

ぃ、小莉子 提交于 2019-12-12 02:27:02
问题 I'm trying to show a dialog box that says waiting for GPS fix on a map. But it throws BadTokenException. Can some one please correct my code. I not necessarily need a dialog box. It can be a notification on top that 'stays on' and says waiting for gps fix...and disappear once fix is obtained. kindly help me with this! package Firstdroid.Gps; import com.google.android.maps.*; import Firstdroid.Gps.R; import android.app.Dialog; import android.app.ProgressDialog; import android.content.Context;