I'm extending one of my apps to work with Android Wear, and I need to send 4 bitmaps to Wear. I'm using the DataApi
and DataMap
to do this and it is currently working fine.
My question is, how long does data stay synced in the DataApi
? Would I still be able to access them a week later? Is it something I have to manually manage. For instance, if some state would change on the handset, I would need to send different bitmaps. Do I need to remove the ones that are currently there?
The documentation is not specific on this point, but I would assume they will stay there forever, unless you clean them (or your app is uninstalled, I guess). A DataItem
is defined as:
The base object of data stored in the Android Wear network. DataItem are replicated across all devices in the network. It contains a small blob of data and associated assets.
Since it's described as storage (and not messaging) I guess that once stored they are permanent, until you delete them. You could think of this as an extension of the private data directory of your application (only this storage, and its synchronization, is directly managed by the Google Play Services app instead of your own).
As for "a week later", I have concrete evidence: a few ints I stored last week are still there. ;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With