gps

How to send GPS data from android to a website?

烈酒焚心 提交于 2019-12-04 17:51:36
I'm new to Android and web service development! currently I'm working in developing Android program that will send longitude and latitude information to asp.net website (to show the location change the website map) the questions are - how to send this data to the website (the best practice)! - any suggestions for a suitable framework starting from the android application itself , inserting to database , client/server connection !! I've read a lot about web services specially REST ..but didn't find tutorials Appreciate your kind help.. Paul Gregoire I would suggest that you use JSON to encode

How can I check if GPS is enabled before I try to use it

泄露秘密 提交于 2019-12-04 17:48:34
问题 I have the following code and it's not good because sometimes GPS takes very long How can I do the following: Check if GPS is enabled Use GPS if it is enabled otherwise use the network provider. If GPS takes more than 30 seconds, use network. I can do this with my own logic using a time or Thread.sleep but I think there might be a more stabndard way // Acquire a reference to the system Location Manager LocationManager locationManager = (LocationManager) this.getSystemService(Context.LOCATION

Android Gps Routing system

北慕城南 提交于 2019-12-04 17:32:20
I'm developing an android application that would locate the user(assuming that the user is on the road) and the app will create the shortest route for the user to take to be able to go to the users chosen destination. Locating the user isn't the question since there's an API for that here: http://www.vogella.com/articles/AndroidLocationAPI/article.html so here's the catch. The roads ,intersections and their distances can be mapped or declared via variables in the code but my problem is that the GPS APIs i found so far would only return a longitude and latitude and not the road names or the

GPS position correction

五迷三道 提交于 2019-12-04 17:03:21
I wrote simple NMEA parser and I'm reading latitude and longitude from GPS. Values readed by my parser are very scattered comparing to some GPS commercial library I'm using. Values readed from this library are very smooth. What algorithms I should use to correct readed position from gps? One option would be a Kalman filter GPS Signals read from a GPS receivers are today only scattered, if the receiver is standing still, or moving very slowly. A simple and very effective approach is to ignore all positions which have its speed attribute below 5km/h. This works well for vehicles. For pedestrians

error on java.lang.IllegalArgumentException: provider==null

荒凉一梦 提交于 2019-12-04 17:02:20
I published my application to android market. I got error in my home page. Somebody wrote crash error. But this application is perfectly working in my real device. I added permission also. My error: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.karthi.locationspeecher/com.android.locationspeecher.LocationSpeecher}: java.lang.IllegalArgumentException: provider==null at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1651) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667) at android.app.ActivityThread.access$1500

android - eclipse: display google maps using coordinates obtained using gps

别说谁变了你拦得住时间么 提交于 2019-12-04 16:58:40
I am trying to create an app that will obtain the users location via gps, display the users location in google maps, and then update after a certain amount of time/movement. I currently have an app that will obtain the users location via gps and update itself every 10meters/10,000 miliseconds, but currently all it does is display what the coordinates are. I have it set up to connect to google maps, but at the minute it is simply setting the map to some coordinates that I have manually entered myself. How do I get it so the map will display the location based on the coordinates obtained via gps

Use of Standard location service for tracking traveled distance in a foreground/background app

孤者浪人 提交于 2019-12-04 16:51:43
I have to develop a kind of GPS navigation application that needs to constantly keep track of the position of the user, which is moving by car. In the specific, I don't have to display the current location on a map but just to record its position with the best possible precision in order to calculate the total distance traveled. Of course the application needs to continue its work in background if the user switch to another app, a phone call come in or something like that… From the tests I have made and from what I have learned from this useful post (and from the documentation ), it seems to

Android Context without being in an activity? And other activity-less programming?

旧时模样 提交于 2019-12-04 16:25:27
问题 I'll try really hard to turn this into one comprehensive question: I'm writing a method to get a String that contains the name of an Android device's city, as determined by the LocationManager and getLastKnownLocation() and all that. Then I realized I'd need to do the same thing again in another activity, so why not just make an entirely separate class ( LocationFinder ) that I could use across my program, instead of writing duplicate code everywhere? But I've run into problems that confuses

Will the kCLLocationAccuracyBestForNavigation setting in Core Location Improve Location Services for Walking Around?

你。 提交于 2019-12-04 16:00:12
问题 I have an application that needs to keep very precise data about where a user is walking. Will having kCLLocationAccuracyBestForNavigation turned on as opposed to kCLLocationAccuracyBest gain me anything in this situation? Thanks. 回答1: kCLLocationAccuracyBestForNavigation is better for what you want to achieve as opposed to kCLLocationAccuracyBest. the only reason not to pick the BestForNavigation is the support of devices with iOS<4. As a side note, kCLLocationAccuracyBestForNavigation will

How can i enable and disable GPS programatically

天涯浪子 提交于 2019-12-04 15:49:01
I am developing an application wherein I want to enable GPS, when I start my activity and I want to disable GPS when I exit my application. Can I do it through my program.. Any help would be appreciated. Here is the code... private void turnGPSOn(){ String provider = Settings.Secure.getString(getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED); if(!provider.contains("gps")){ final Intent poke = new Intent(); poke.setClassName("com.android.settings","com.android.settings.widget.SettingsAppWidgetProvider"); poke.addCategory(Intent.CATEGORY_ALTERNATIVE); poke.setData(Uri.parse("3"))