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...
Related
I'm wanting to develop an app for my personal use so that several mobile devices can pair to several Bluetooth speakers (regardless of the brand).
Because the sync will take place through internet, and that the app may become cross-platform overtime, it is essential that I can give to the device which is synced to me the ability to manually tweak its Bluetooth latency (ms offset), so that the speakers can be in phase. That was achieved previously because I saw it in certain apps; yet I can't find any developer information about it!
Any ideas as to how one would go about developing it?
I don't think compensating for Android Bluetooth Latency using app side code only is possible, because the latency varies a lot by manufacturer.
It might be possible though if you can modify your speaker firmwares in order to add timestamp based syncing between your speakers... or use Wi-Fi speakers
For more developer information about Android Bluetooth Latency, read this:
https://www.soundguys.com/android-bluetooth-latency-22732/
I am working on a location based application. I want to turn on/off GPS through code. I found a solution from this [link]: Turning on and off GPS programmatically in android 4.0 and above? but app is crashing when i run this portion.
Please guide me with proper solution.
I want to turn on/off GPS through code
There is "enabled/disabled", and there is "on/off". "Enabled/disabled" determines whether any app can get GPS fixes. "On/off" determines whether the device is trying to get GPS fixes right now. GPS can only be "on" if it is "enabled".
If you request locations from the GPS_PROVIDER, and GPS is enabled, the GPS radio will turn on. If you stop requesting locations from the GPS_PROVIDER, and no other app is requesting locations from the GPS_PROVIDER, the GPS radio will turn off. Depending on how you configure your request for locations (e.g., once an hour), the GPS radio may turn off and on to save battery life, even while your request is outstanding. Hence, Android developers do not worry much about "on/off" — developers just request locations, and the hardware takes care of powering on and off the GPS radio as needed.
Your link really refers to "enabled/disabled". Android removed the ability for apps to enable and disable GPS back in Android 1.5, for privacy reasons. Malware authors have continued to try to find ways to get around this, because malware authors are not interested in user privacy. The link you cited was an exploit for a flaw in Android that allowed apps to enable and disable GPS. That exploit was fixed years ago. I am not aware of a current exploit that allows apps to enable and disable GPS.
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
I am trying to access the sensors (proximity and RGBW sensors specifically) on my Samsung Galaxy S3 and have gotten a code to run to access the proximity sensors. However, I am only getting the values 1 or 8 (near/far). I am aware that sometimes the hardware can only access a near/far reading, but by using Samsung's #0# code and doing sensor testing, I was able to see ADC readings from the proximity sensor which showed relative distance measurements and RGBW values. I was wondering if there was anything I could do to access those values in an Android app.
In summary, is there any way I can access ADC values of the proximity sensor through an Android app? Is there a code in the Google API which allows me to access RGBW sensors, which are pretty new and not usually used by developers?
Thanks!
In summary, is there any way I can access ADC values of the proximity sensor through an Android app?
Not via the Android SDK using known Sensor types. Certain device manufacturers might offer SDK add-ons for that, though I am not aware of any. Or, a device manufacturer might support some alternative Sensor type name for that, though again I am not aware of any.
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