Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Wear How Long do DataMap entries Stay Valid

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?

like image 239
Eliezer Avatar asked Jul 10 '14 00:07

Eliezer


1 Answers

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. ;)

like image 79
matiash Avatar answered Oct 27 '22 11:10

matiash