How to get sleep data DIRECTLY from Wear OS? - android

I am new to Wear OS development, and am trying to get user's sleep duration.
I've managed to get sleep data from other smartbands using raw BLE stack, but I don't know how should I gather sleep data from Wear OS?.
I've searched a bit in the web, and most people suggest to use Google Fit API, but in my case, I can't depend on external APIs.
So these are my questions
1) Is there anyway I can get sleep data from the Wear OS direclty ? If Yes, How?
If No,
2) Should I build a sleep tracker myself (by analyzing watch's movement and heart rate) ?

1) No. WearOS is just a system that provides a runtime environment, maybe along with some base functions. Sleep data is not a basic function, while the raw sensor data is yes.
2) Yes. If you don't want to rely on GoogleFit or other 3rd part API. The only way is to fetch the raw sensor data and analyze them your self.

Related

Android wear stream accelerometer data to handheld

I an new to android wear app development. I wanted to create an app which streams accelerometer data continuously from wear device to handheld, and do some processing on my handheld. Does anyone know how can I do it?
I went through that pain recently. Try this link (a lot of base code required)
https://developer.android.com/training/wearables/data-layer/index.html up to the syncing data items page
Essentially, the data-api makes a shared dictionary that fires an event when a field is updated. Unfortunately the bluetooth connectivity seems quite slow. My current workaround is to increase the sensor delay and only update if the change is fairly dramatic.

Send accelerometerdata from wear to mobile

I am looking for the best way to send accelerometer data from my Android Wear device (20 entries per second) to my smartphone. The exchange should be as fast as possible to create a nearly real time XYchart on the smartphone.
What is the best way to send my data? Does MessageAPI provides an exchange which is fast enough?
You need to use either the Message or Data API. SharedPreferences aren't automatically "shared" between devices (such as a watch and a phone).
Also, be realistic about data transfer rates. You'll get accelerometer data on the watch at a much faster rate than you can realistically send it to the phone, and will need to handle that discrepancy. It might be that you want to use the Channel API instead - but that will require repackaging your ArrayList into a Stream.

How to retrieve activities from Garmin Fenix3

I'd like to automatically import my activities from my Garmin Fenix3 into a database (without the need to manually download the TCX files). Two options came to my mind to solve this task:
A Server based app which gets connected to the Garmin Connect API and is notified (via RESTful APIs) by GarminConnect each time an activity has been uploaded - is my understanding correct, that I need for this use case the $5,000 expensive Garmin API licence?? http://developer.garmin.com/garmin-connect-api/overview/
Create an Android App which gets notified by the installed Garmin Android Connect App each time a new activity has been created - how can I achieve this? From my understanding, the Connect IQ Mobile SDK For Android can be used to create an Android App which interacts with your own application on the Garmin Device itself (which is not needed for my scenario, I just want to automatically "download" the activities created by the default Fenix3 apps).
Any help is highly appreciated - thanks.
I can answer now my own question. It is NOT possible to access the recorded data automatically unless you pay the $5,000 for the Garmin API licence (this is soooo ridiculous Garmin!!!). The Connect IQ Mobile SDK approach will NOT do this job, confirmed by the Garmin Support Team.
The only way to get your data is by manually downloading the FIT or TCX file from https://connect.garmin.com . Keep in mind though that the Running Dynamics (which are captured and calculated by the HRM-Run sensor) are NOT included in these files!
Vertical Oscillation
Vertical Ratio
Left/Right Balance
Avg Ground Contact Time
Training Effect
This is a very big disappointment Garmin! In which century are you guys still living? The data generated by the user belongs to the user and it should be easy accessible! Keeping the data locked in your safe will not really attract more users to the connect platform... But time will tell.

How to find what is consuming mobile data transfer (MB) in my Android app?

I'm developing an application that needs a service to syncronize data beetween Android and a web service PHP. In the same app I have a ArcGIS Android map. I'm not able to find what is totally consuming my monthly traffic data in the background (as I can see in settings/data usage / my app background data -> growing every 2 minutes).
I also tryed with wireless and I saw the same issue.
I need something to look at what is going on in the background (URL, transferred packet, ecc). I use Eclipse, Linux and real Android device...
I need something to look at what is going on in the background (URL, transferred packet, ecc).
You are welcome to set up some sort of proxy server (e.g., Fiddle) and try to get your app (and ArcGIS) to use that proxy server.
You can also use TrafficStats and methods like setThreadStatsTag() and tagSocket() to apply tags to your network I/O. The Network Monitor tool in DDMS will show you traffic by tag. With savvy use of tags, you can try to narrow things down for your own code -- untagged I/O is probably from third-party code, like ArcGIS.

Data Transfer between Mobile Phones Across Connected Voice Call

I require a fast reliable method of sending control commands (simple data, possibly only a few dozen possible commands) to a remote system which is using a smartphone* as its onboard computer. I have deemed standard data packages used for mobile internet data transfer as too unreliable of control purposes, however I have noticed that once a voice call is initiated it is much more reliable. Has there been any development into sending data between phones across a connected call, and if not are there any known reasons a modified dialup modem in software form couldn't be used?
Furthermore, could this protocol be robust enough to send back low res video and other simple numeric data?
*Smartphone - A phone with significant processing power and ability to run custom programs (most likely with an Android based OS however am open to suggestions)
Have you tried SMS? while you won't get video data it may work for small chunks of data. Also if the small chunks are from the phone to a server, you may try sending DTMF down the line (however I've yet to see that working.
Other than that it's customised hardware.
Hmmm...this reminds me of those old TV games like Hugo...there you had a voice connection and I think the commands were given by the different tone of the key pressed from 0-9. Maybe you should try something similar.

Categories

Resources