can we change the gps values of a mobile device? - java

I am trying to test a Location aware application on Android and iPhone in which I need to go to different locations.
Is it possible to mask/change the GPS location of the smart phone in which the GPS app is running using some code in.Net /Java? This is to make testing easier...

Pretty sure something like that would require hacking the onboard GPS chip. The easiest solution here would be to actually have your app mock the GPS coordinates instead.

I use a free 'Fake GPS' application from the Google Play Store for that purpose. I'm sure there are several available on both your target platforms

Related

how the Android SDK talks to the internal GPS SDK

I'm happily developing GPS aware apps using LocationManager and NmeaListener, so I am not asking about how to use the Android SDK, but how the Android SDK talks to the internal GPS SDK
I'm trying to understand how Android interacts with the GPS SDK to deliver, for example, the speed and direction values in the GPRMC sentence. Do they come directly from the chip SDK or are they calculatedd by Android?
I'm looking at Android source in LocationManager.java, but I can't find where it interacts with the GPS SDK.
Can anyone point me in the right direction please?
I expect the GPS is a separate sub system which reports data to the system over a serial NMEA connection. If so then the GPS module will calculate Speed (SOG) and Course (COG) using internal methods. For low cost GPS modules they typically have a filtered position difference method. Higher end GPS receivers use carrier phase measurements to get instant results.
I'm guessing that you are noticing a lag in the COG and SOG values and hoping that knowing more about how they are derived will help you correct the lag...

GPS Info without internet in android

I want to save GPS info into database when the internet connection is off in android.
that information by which the phone detect GPS location.
is this possible?
please advice me..
GPS works without Internet. Internet is only required for A-GPS (to get the position faster when GPS does not know where you are since it's way faster if GPS knows a rough area of your location).
On the other hand there is afik no way to provide that rough position to your GPS since that is not a part of Android's GPS API (GPS is really vendor specific). The implementation might already do that.
If you still want to save that location go look for Database examples - e.g. http://www.vogella.de/articles/AndroidSQLite/article.html

Getting location coordinates from device like iPhone in Java (not based on IP more like GPS or cell signal)

How can one get more accurate location coordinates from mobile device (smarthphone, iPhone, BlackBerry ...) other than from IP address. For example by using GPS query from smartphone API. And how would one go about integrating with Java?
This depends on what you're asking.
If you mean "How can one retrieve GPS coordinates using Java in a native application on a smartphone?", then that answer will differ for every smartphone platform, and there is no answer for iPhones because iPhones do not run Java.
If you mean "How can one retrieve GPS coordinates in a web application using Java on the backend?", then you can use the Geolocation API in HTML5, assuming the browser supports it (as far as I know, Mobile Safari and the browser in Android support this. I don't know about Blackberry, and would assume that it does not). See here.

iPhone location method

I have been wondering how the iPhone determines location based on wifi, because I want to integrate this functionality into a java app of mine.
When I run a location check on my ip, it throws me all the way into some other neighborhood... But when I use my iPhone's location feature, it points right too me. (and GPS is turned off)
How does the iPhone determine location? Because I know it's not using an ip location.
It uses a wifi access point database. See: http://skyhookwireless.com/ and specifically http://www.skyhookwireless.com/press/skyhookapple.php.
It's using a triangulation scheme based off of known wifi access points. When this was first announced, I heard the name Skyhook Wireless thrown around, so it's possible that the iPhone is using their databases for location.
Cell tower triangulation? It can see the neighbouring GSM antennas and knows the relative signal strengths. This allows a pretty good estimate

How to define GPS module in Android?

I'm porting android to Devkit8000 which is a BeagleBoard clone. I have a GPS module connected on /dev/ttyS0. I could successfully get NMEA output when writing "cat /dev/ttyS0" in the terminal emulator.
I want to know how to let android know that there is a GPS module on /dev/ttyS0 and it is outputting NMEA standard? To be able to use the android.location class with it! or test it with any GPS app in the store!
Is there something to edit in the android's source? adding driver for example, writing a code with android-ndk or what?
The interface you must implement is described in the Platform Development Kit and you may want to use the source for the emulated GPS as a reference.

Categories