gps

Turn GPS on programmatically like Ola Cabs Android app

风流意气都作罢 提交于 2019-12-03 09:48:08
问题 I am working on an application and need to integrate GPS location. I want to switch the GPS on programmatically. The condition is: I don't want to send the user to the Setting panel to enable it. I want to enable it forcefully or a single prompt will work (similar to the Ola Cabs Android app). A lot of questions are for this on this site but everyone is looking for the similar functionality like Ola Cabs app. So I have started this thread so that it can be clear for all of us. 回答1: Here is my

Ionic display error if gps is turned off

我只是一个虾纸丫 提交于 2019-12-03 09:41:16
问题 Got a bit of an issue trying to determine if someone has their GPS turned off in Ionic/Cordova. Here is what I am trying to do at the moment, this works in the browser fine but not on android. navigator.geolocation.getCurrentPosition(function(pos) {}, function(err) { alert('We were unable to determine your location, please turn on your GPS/Location services'); }); Another thing is does anyone know if its possible to give a prompt to turn on GPS with Ionic/cordova? Anyone got any ideas? 回答1:

List of all street and road names in Google in API

谁说我不能喝 提交于 2019-12-03 09:19:34
问题 Am doing a location based app.When using GPS, it provides with street names from Google API. When user need to enter it manually, for a autocomplete text view am in need of names of all street and roads in Google API. Where could i get all street and roads name which google API provides when using GPS? I ve searched everywhere but in vain :( Thanks in advance. 回答1: As far as I can find, Google does not provide a database of street names for public download, but this site does: Open Street Map

Android : create simulator without GPS hardware

匿名 (未验证) 提交于 2019-12-03 09:18:39
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: As I got notification from google about the ACCESS_FINE_LOCATION permissions . As I understand if we don't add "android.hardware.location.gps" uses-feature to your manifest it will visible to non GPS hardware device also. If I add that my application wont display to them and I don't want to do that. I want to check that how app is reacting on device that not having GPS Hardware . How can I create simulator for this? Actual message from Google Play Store Action required: If your app requires GPS hardware to operate properly, you will need to

Android : INSTALL_FAILED_MISSING_FEATURE

こ雲淡風輕ζ 提交于 2019-12-03 09:15:39
I got error INSTALL_FAILED_MISSING_FEATURE while installing my apps in emulator. I am unable to find out the where is the error. My app consists of both GPS & Camera features. I am not getting where I am wrong. Is it problem with ANDROID MANIFEST???? Please Help me out due to this I am unable to deliver my app.Thank you Updated I am getting this error while installing in CONSOLE [2012-03-16 11:24:50 - DemoCamGPS] Installation error: INSTALL_FAILED_MISSING_FEATURE [2012-03-16 11:24:50 - DemoCamGPS] Please check logcat output for more details. [2012-03-16 11:24:50 - DemoCamGPS] Launch canceled!

How to calculate moving average speed from GPS?

别说谁变了你拦得住时间么 提交于 2019-12-03 09:10:54
I'm developing an android application using GPS. I'd like to implement a feature that displays the users average speed over the 1/5/15 minute. Something like the CPU load on unix. I can calculate average easily by cumulating the distance traveled second by second and divide it by the elapsed time, but I can't think of a smart way of calculating the moving average. Obviously I can get id done by putting the distance between the last and the current position in an array every second while deleting the oldest value. I'm looking for a neat way of doing this. Florian Brucker You will need to store

Sync Android devices via GPS time?

匿名 (未验证) 提交于 2019-12-03 08:59:04
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Short version: Problem: I need several Android devices to do something at the exact same time (within ca 100 milliseconds). For example, I want all devices to play a certain sound at previously determined point in time. Question: Could I use GPS time to make sure the devices clock's are synced? Longer version: Several people having Android devices are in the same outdoor location (for some specific sports event). All devices should signal certain events at the exact same time. (What time will be determined before hand and it is not important

Get gps location of a photo

和自甴很熟 提交于 2019-12-03 08:52:33
I know how to get the current GPS location of a mobile phone. I also know how to save the GPS location to the photo when you take it. (Camera option Samsung galaxy s2). But how can I get the GPS location of that photo (later)? When I open the photo on the computer, I can see the GPS location data, but got no idea how to extract them later in android. So could someone put me in the good direction? To make question more clearly: How can I get the GPS location of a photo that is already taken? Thanks already, Bigflow josnidhin made this answer possible, so be sure to give him credit too :) Here

Distance from Lat/Lng point to Minor Arc segment

喜你入骨 提交于 2019-12-03 08:52:08
问题 I need to calculate the shortest distance from a lat/lng GPS point P to a line segment described by 2 other lat/lng GPS points A and B. 'Cross-track distance' helps me to calculate the shortest distance between P and the great circle described by A and B. However, this is not what I want. I need need the distance between P and the line segment of A-B, not the entire great circle. I have used the following implementation from http://www.movable-type.co.uk/scripts/latlong.html Formula: dxt =

Where do the location and currentBestLocation come from? in Android Dev Guide (Obtaining User Location)

家住魔仙堡 提交于 2019-12-03 08:27:12
I read the tutorial about Obtaining User Location in Android Dev Guid and, I try to adapt this to the following code.. but i don't know which location value I should put into isBetterLocation(Location location, Location currentBestLocation) Example.class private LocationManager locman; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); String context = Context.LOCATION_SERVICE; locman = (LocationManager)getSystemService(context); Criteria criteria = new Criteria(); criteria.setAccuracy(Criteria.ACCURACY_FINE);