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.
Related
I have a bluetooth LE device that is powered by its developer's app.
Sadly it is not maintained anymore and therefore I intend to rewrite the app from scratch.
Additionally it is not possible to pair to the device. It only listens to BLE.
Is it possible in any way to find out, how the device is being controlled?
I tried to decompile the code via JADX but since the manufacturer is chinese and decompilation already comes with its own problems, I thought if it would be possible to find it out without this procedure. (GitHub)App-Decompiled-Code (External)Original-APK-Download-Page
It depends what the device is really. There are number of profiles/services defined in the Bluetooth standard. If the device uses one of them then you could design from the specification rather than the device/app.
A good place to start is to use a generic Bluetooth Low Energy scanning and exploration tool such as nRF Connect to explore the device. Find out the UUIDs of the services and characteristics and compare it to the assigned 16-bit UUIDs values on https://www.bluetooth.com/specifications/assigned-numbers/
If it has a custom BLE profile/service then you can still use the nRF Connect app to explore it. If it is not obvious how to access the data or what commands need to be sent, then looking at the HCI logs on the phone after using the developer's app might be helpful.
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/
As all users of Windows Phone 10 know, the Bluetooth connectivity on this system is cutted to the simplest for end-user, which ends for programmers as a horror to create anything. When connecting to a device, system automatically looks for a "functions" that device has, for ex. audio. The questions are as following:1. How to define a function like that on external Android device? The main goal is, to control all types of music playback from it (ex. Groove music playing)2. Where can i find a list of things like this, for future app functions?
And to get ahead of answers, I already tried the easier ways, which came to nothing due to UWP limits of controlling other apps playback.
Main target of project is to make a xamarin c# (or java, I can "translate" from one to another with ease) android app for a smartwatch and in c# uwp for windows phone to do most common tasks, like - as mentioned before - music playback control and notifications reciever.
Based on your description, you want to develop an Android app to send Bluetooth command to control the music player of a windows phone device, then it depends on your Bluetooth of your android device.
But control music player by Bluetooth need the profile Avrcp I have check the google Bluetooth API I did not find the profile of Avrcp, I think it is may be hard to send the Avrcp command at the android application level.
And Android is source opened, many device factories prefer to customize their own Android system, it is possible that the device uses a Bluetooth module as a serial device, then the official Bluetooth APIs are not suitable for this scenario, the develop protocol of this Bluetooth module is in need.
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...
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