gps

error handling in android. exception Caused by: java.lang.IllegalArgumentException: provider=gps

ぃ、小莉子 提交于 2019-12-11 05:37:43
问题 I've received an error report for one of my apps. I'm pretty much a beginner in android development, and don't quite understand where this could originate from. Where is the app code would it be best to catch all errors and for example just toast message that an error occured? My app basically sits and waits for GPS and/or Network location before displaying a button. This is the error: java.lang.RuntimeException: Unable to resume activity {fr.mcnamara.irelandtravelguide/fr.mcnamara

Error Including QGeoPositionInfo

主宰稳场 提交于 2019-12-11 05:29:38
问题 I am new to Qt , I have been given this task where i should use GPS so to use to GPS ,i only did this one line of code #include <QGeoPositionInfo> and the following error appeared In file included from ..\Project\mainwindow.cpp:3: ..\Project\/form.h:7:28: error: QGeoPositionInfo: No such file or directory how can i solve this issue ? how can i get this file ? please note that i have tried re installing Qt Creator... Please be specific i would really appreciate that... 回答1: QGeoPositionInfo is

Query Overpass turbo by latitude longitude

筅森魡賤 提交于 2019-12-11 05:15:28
问题 How do I ask overpass turbo to give me the way tags corresponding to a set of latitude longitude coordinates? thanks! This is what i tried so far: [out:json][timeout:25]; (way(around:1.0,52.004940, 4.369381)); (._;>;); out tags; But there are 2 problems here. 1. I get a list of different nodes and ways. But i actually only want the way where there is a speed limit given 2. I don't know how to write a query for a whole list of coordinates. Not sure if this is even possible. 回答1: Here's how the

Location updates not working on allowing runtime permission

梦想的初衷 提交于 2019-12-11 05:07:38
问题 I've written code for app that shows phone's latitude and longitude and displays it on the screen, but after granting location permission it doesn't show anything, only when I reopen the app. This is the code for the MainActivity: import android.Manifest; import android.content.pm.PackageManager; import android.location.Location; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.app.ActivityCompat; import

How can i set up a listener that would notify me when my new location is within a polygon(Kind of like geofencing)

夙愿已清 提交于 2019-12-11 04:53:44
问题 Am trying to set up an app that would notify the user when his/her location is with in the polygon. I have read about using polyutils library but have not been successful in implementing them. Here is what i Tried @Override public void onMapReady(GoogleMap googleMap) { mMap = googleMap; if (checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {

GPS data estimation

你说的曾经没有我的故事 提交于 2019-12-11 04:29:51
问题 I have a GPS on the middle of a plate as can be seen in attached picture. Clearly, the GPS gives me the Lon. and Lat of the center of the plate with no problem. My question is how can I estimate what is the Lon. and Lat at each end point (A,B,C,D) as the distance between end points and GPS is known? I believe there should be a formula for this purpose. I appreciate any idea and suggestion in advance. GPS and four points around it: ![][1] [1]: https://i.stack.imgur.com/cwWVU.jpg 回答1: Have a

Use GPS with Windows Mobile Phone

左心房为你撑大大i 提交于 2019-12-11 04:11:38
问题 My question might sound really stupid but, I would like to get longitude & latitude using only GPS on a Windows Mobile Phone 7( OFFLINE - WITHOUT THE NEED FOR A WIFI CONNECTION ). Is that possible or GPS is always assisted by a webservice in Windows Mobile phones? 回答1: If you set Accuracy to High - you will have location from a GPS sensor In the normal case you don't need to worry about how location is achieved, Location Service on WP7 is doing all hard work for you. 回答2: Exactly. GPS device

Foursquare API nearByVenue service issue

99封情书 提交于 2019-12-11 04:07:56
问题 Using Foursquare api "Venue" service.. i am parsing nearByVenue details like shop, restaurant etc. Suppose as an example i am getting following link: https://api.foursquare.com/v1/venues.json?geolat=40.562362&geolong=-111.938689 Issue is I am getting only 10 nearbyDetails.. suppose I am standing in New York there should be number of venue details.. why I am getting only 10 details only ? Is there any other service or i am following wrong approach to use it? Thanks 回答1: Add l=n where n is your

Why isProviderEnabled() method always return true even inside the Building

两盒软妹~` 提交于 2019-12-11 03:46:27
问题 In this case I use GPS as a Provider, I try walking inside the building but seem like it doesn't find the location. Yeah, it makes sense that in the building GPS not work. So, Why isProviderEnabled return true? Anyway, What is the way that i should implement "Searching for GPS signal"? String context = Context.LOCATION_SERVICE; locman = (LocationManager)getSystemService(context); Criteria criteria = new Criteria(); criteria.setAccuracy(Criteria.ACCURACY_FINE); criteria.setAltitudeRequired

getLastKnownLocation vs requestLocationUpdates

吃可爱长大的小学妹 提交于 2019-12-11 03:45:50
问题 I want to send the most fresh and accurate location from my android app to the server every 5 min. In this question I was advised to create an alarmManager which will register to LocationUpdates. Why is this better than just calling getLastKnownLocation and checking its accuracy? 回答1: getLastKnownLocation will give you the last location fix from the network provider. It may not give the exact current location (see google documentation) LocationUpdates, on the other hand, will give the current