Is there a common communication protocol between smartwatches and Android phones? - android

I am very unhappy with my Fossil Q hybrid watch (no screen, tracks activity & sleep and button functions) but honestly it looks good. The app keeps crashing though. I would like to make my own Android app to extract all kinds of data (for future analysis). Before investing a lot of time, I tried to do some research on how to access the watch. It operates obviously on BLE. But all the documentation is either about Wear OS or actual smartwatches with more advanced functionality. Search engines fail to distinguish between what I am looking for and most popular results.
I was wondering, if there are any known communication protocols between apps and smartwatches, where I can start experimenting?
BTW, HCI snoop log reports all traffic but it doesn't look like anything to me. But I can also try to hack it (if it is not encrypted...).

I remember that I have found once a info on dev site regarding the heart rate tracking but I cant find it.
Anyway I have found one thing that might help you:
https://developers.google.com/fit/android/ble-sensors
Unfortunately this is "fit" reference site, which data might be obsolete,
afaik the regular updates might come to API reference:
https://developers.google.com/android/reference/com/google/android/gms/fitness/SensorsApi

You can start by reading code and documentation of the GadgetBridge project: https://codeberg.org/Freeyourgadget/Gadgetbridge/
They support some of the "Q Hybrid" watches to some extent

Related

Android Detect Nearby Device (Covid-19 app)

The covid-19 app is capable of detecting who came into contact with who, how do they do it? I am trying to make something similar but I am unsure how they managed to get that information from the phones. I don't need the information to be private (like phone number), it could be something that only the government can make use of (like sim card number or MAC address. Is that possible?
I looked into Google Nearby and Wifi Direct... But as far as I understand it, it requires a handshake (covid19 app doesn't). I also looked into potentially making your phone into a hotspot and capturing wifi requests but I am not sure which library / API lets me do that.
Does anyone have know how this is done? I can't find a concrete answer anywhere, this seems to be actually impossible until I realized that the covid-19 app is doing it.
As Morrison Chang and ArtHare have commented already, Google and Apple have implemented this on an OS level:
In the coming months, Apple and Google will work to enable a broader Bluetooth-based contact tracing platform by building this functionality into the underlying platforms. (source)
If you want the specs they're using, Apple and Google have pages on how contact tracing is implemented, but it would be hard (if not impossible) for an app to implement this.

Android as an UVC Camera

I'm stuck at home with a rather bad webcam. I was considering upgrading, but then it struck me: phones these days have really good cameras embedded in them. So why not use it as a webcam?
However, as I was researching this further I was really disappointed with the available apps for this. As far as I was able to find, we have Android apps that work roughly as follows:
Present phone camera as a network attached camera. Then you can use local software to use that feed as a webcam. See e.g., IP Webcam. This may be sufficient, but it's a complicated setup, and network latency makes this far from ideal.
The Android app sends the camera feed to an custom host application that in turn creates a virtual web camera. See e.g., DroidCam. This mostly solves the latency problem, but it is still rather complicated, and requiring us to install a specific third party application is troublesome in regard to user privacy. Especially since the applications are closed source.
So, I took the engineering approach and tried to see if it was even possible to improve the situation. As far as I was able to find, Android supports being used as a custom USB accessory. And looking over the USB video class documentation, it strikes me that it should be possible to create an Android app that presents the phone as a generic UVC webcam, such that we do not have to resort to tricks such as the ones above.
Ideally, I would have liked Android to add another USB device option ("Use USB connection as webcam") in addition to debug mode, file-transfer, etc. This seems quite unlikely to happen in the short term however.
So, my question is this: Does an application that does the above already exist? My searching thus far haven't yielded any results, but I might be missing something as googling for this turned out a bit harder than I expected.
Alternatively, am I wrong in my assumption above, such that there is some fundamental issue why an Android application cannot be made to work in that way?
There does not seem to be any complete app yet as of 2020-10, but the parts are mostly there:
https://github.com/tejado/android-usb-gadget has code to switch the Android device into gadget mode (but no UVC yet)
https://git.ideasonboard.org/uvc-gadget.git feeds v4l2 into the uvc gadget output
Sources:
http://www.davidhunt.ie/raspberry-pi-zero-with-pi-camera-as-usb-webcam/
https://www.raspberrypi.org/forums/viewtopic.php?t=148361
https://www.reddit.com/r/androiddev/comments/iabc2o/can_i_use_my_android_as_wired_camera_ie_as_a/g1nrijl/
It appears Google has started to take notice on this issue and are currently working on a "DeviceAsWebcam" service, which is exactly the solution to this problem, as seen in the Android review below:
https://android-review.googlesource.com/c/platform/system/sepolicy/+/2410788
Naturally though, this is a Android 14 feature, so it will like take a while before this is usable on a lot of devices. Hopefully, someone is able to backport this feature to older versions of Android.
If android / the version of Android that comes on your target phone provides / permits use of the USB gadget driver, then libguvc,
https://developer.ridgerun.com/wiki/index.php?title=USB_Video_Class_Gadget_Library_-_libguvc
can be used to "make an application appear as a USB webcam".
Potentially relevant to get you started would be https://stackoverflow.com/search?q=Android+USB+gadget (other SO references to the use of the USB gadget driver on Android).

Is it possible to use Android to control relays?

This isn't a highly technical (or specific) question. I just want to know if it is possible to use an android app to control 12V relays.
I want to use this running android:
http://www.mini-box.com/pico-SAM9G45-X
with this touchscreen attached:
http://www.mini-box.com/INNOLUX-7-TFT-with-touchscreen
I want to mount this in my car and write a simple android application that can be used to control my lighting in the car (via several 12V relays). I have a lot of background programming in many different languages, so I am not worried about the application part. However, I have very little experience using software to control hardware.
Any ideas for this would be great. Thanks!
First you'll need to get Android running on your Pico board. There are several releases of Android ported to Pico for you to play with here: http://arm.mini-box.com/index.php?title=Releases
Once you accomplish this, I recommend wiring up an ADK board to the pico and using that to interface with your relays. http://developer.android.com/guide/topics/usb/adk.html The most popular and widely documented ADK board designs are based on Arduino or PIC chips so if you have experience with either I don't think it will be too much trouble. Writing the application would entail writing a program on the ADK which listens for input from an Android app which you also create and reacts accordingly. There's a handful of good information you can find with google searches to help you out and also some dedicated discussion groups.
Alternatively, it may be possible to use the remaining unused pins on the Pico to talk to your relays. I don't know for certain though if the Android ports support this or not.
It should be a fun project to keep you busy for a couple weeks. Good luck, and be sure to write up some information on it if you get it working!
you can find so many relay boards which come with wifi and they have their own app. which you can install in your Android phone or PC or iphone(you can find a ios app for same board). and you can also modify apps according to your choice and there are products which come with input pins also so you can control lights or anything else using those input. you can check this product check this Android control realy and there are so many products available.

Android app for Scan an RF to intercept mobile phone calls

I was reading following article and I come up to know about RF(Radio frequency) signals are the medium of communication between connect mobile phone calls.
Idea came in my mind to have android app kind of RF scanner which secretly eavesdrop on mobile phone conversations around you.
I know i need more research but i quickly want to know if it is possible with android apps or not ?
enter link description here
Android does not offer APIs to do this. They are buried in radio kernel, which comes from pphone vendor. So answer is negative. It is possible but not with android.
PS: COTS solutions doing this are usually restricted in export and pretty expensive.
Honestly I don't see why this would be impossible. The pitfall of building an app like this would be:
a. user will most likely need a rooted phone and some kind of custom radio with their kernel. This shouldn't be a huge issue though as most users looking for something like this should have the know how to root their phone.
b. you wouldn't be able to release this on the market. as soon as google caught wind of such a malicious app they would remove it immediately.
Catching the signal of other conversation is not enough, cause signal is at least encrypted!

How widely supported is the accelerometer in Android devices?

We're developing an Android app that relies on the accelerometer for certain features. I'm wondering how safe it is to rely on the existence of the accelerometer and not provide alternative UI options for devices that do not support it (e.g. a button). My observation is that most "smartphone" Androids out there support it. Am I correct?
It would be nice if someone can point me to some data or stats for all Android devices out there.
I've personally never seen an android device without an accelerometer. The internet seems to agree on that aswell:
Link 1
Link 2

Categories

Resources