Google fit data is different from device to device with same account - google-play-services

I have created a Google Fit application to read/write data from Google Fit. I have two devices linked to the same account, but I cannot see the data added from one device to another.
How is this fixed?

We can read global data (Cloud) by adding the .enableServerQueries() in DataReadRequest

Related

On Azure IOT Hub, Is it possible to create a device which acts an alias for an already deployed device?

For Azure IOT Hub - I am working on a project where I would like to create some scripts based around the device name of an IOT device in the field. The device name already has details related to the location and device number of the location (which is what the script will pull).
Example H4C1F5Device3, where H4C1F5 is the postal code, and device 3 refers to the 3rd device in this location.
However due to a mixup in deployment, some devices don't match this naming convention and make scripting a little broken.
So my question is there a way to create an "alias"/dummy device in IOT hub with the correct name which can point to the previously deployed device with the "incorrect" name?
So far I have only looked at solutions in the Portal (no CLI, Node.js, etc.). I have tried making changes in the "Device Twins" page, but it does not accept changes when attempting to save.
Would appreciate any help on this. The Azure documentation is quite good, but I'm having trouble finding the solution to this exact query.
There is no such feature in Azure IoT Hub. You could create the new device IDs and reprovision your device with the new credentials.
It's also good practice not to store this kind of information in the device ID. You could use tags on the device twin (or desired properties if the device needs to know), unlike the device ID they are mutable.

Accessing the localStorage of one device from another in react-native

Some days before, i saw a blog post about why we need to keep whatsapp open on our smartphone to make it work on our PC.
It said that WhatsApp fetches the data (messages) from our smartphone and shows them on our pc which seems pretty good as it will lower the load on our database.
So now i wanted to know if there is a way to do so in react-native i.e, access the localStorage of one device from another.
Why i want to do that?
I am building an app where in the profile, i also take the profile picture from the user and i don't want to store it on the database but instead store it locally and serve it from there.
The reason for that is that we need buckets to store media files and serve them from there and i wanted to cut that part when deploying my app.

Android, Getting inconsistency in User Current Location.?

I am new in android and wanna get user current location using GPS_PROVIDER, but every time getting different-different location how can I use Google Play Services. and what is the best way to get accurate location in android.
Thanks you.
In general there are two different types of locations available through the Android API.
One is the GPS-Location which only works outdoors and which has an accuaracy between 5m and 50m.
The other kind of location is the so called Network-Location which is a loaction measure based on Wifi Networks in you surrounding and GSM-Base-Stations which have a accuracy between 100m and 1500m. This localization technique also works indoors, because it only requires you smartphone to have network access. The accuaracy gets better in urban areas where a lot of Wifi and GSM-Base-Stations are located. The more GSM-Base-Station / Wifi hotspos are available the better is the accurarcy of the loation measurement. It can also get down to 5m.
When requesting such an location Google does internally some magic to compute the position. This request requires a internet connection (you don't need to explicitly give the permission). Interanally Android sends a request to a Google server which contains fingerprints of the surrounding GSM-Base-Stations and afterwards computes your location (if you are curious you can find the code here).
With GPS-bases location the location accurarcy is the same all over the world without any internet connection, but works only outdoors.
With my applications I implemented a logic which detects if GPS is present or not and if not I switched to network localization, this works fine.

how to build google gadget with persistent storage

I'm trying to make a google gadget that stores some data (say, statistics of users' actions) in a persistent way (i.e. statistics accumulates over time and over multiple users). Also I want these data to be placed at google free hosting, possibly together with the gadget itself.
Any ideas on how to do that?
I know, Google gadgets API has tools for working with remote data, but then the question is where to host it. Google Wave seemed to be an option, but it is no longer supported.
You should get a server and host it there.
You have then the best control over the code, the performance and the data itself.
There are several hosting providers out there who provide hosting for a reasonable price.
Naming some: Hostgator.com (US), Hetzner.de (DE), http://swedendedicated.com (SE, never used, just a quick search on the internet).

Is NSUbiquitousKeyValueStore certified to work without a connection?

The documentation doesn't seem very clear about this, but can I rely on NSUbiquitousKeyValueStore to persist data locally when the device is not connected, or should I also use a NSUserDefaults?
From the iCloud design doc with regards to Key Value storage
Always effectively available. If a device is not attached to an account, changes created on the device are pushed to iCloud as soon as the device is attached to the account.
(in the table at the bottom of the page)