Reputation: 808
I'm storing a thumbnail picture with my data as an asset. On the Wear side, it doesn't show up sometimes. However, if I debug, I can clearly see that the DataMapItem does contain a HashMapEntry with key "photo" and data behind it "Asset[@<RANDOM_CHARACTERS>]"
However, calling dataMapItem.getDataMap().getAsset("photo") returns null.
Upvotes: 0
Views: 184
Reputation: 199880
Your asset has the key "photo " - note the space at the end, yet you try to retrieve it using "photo". The keys need to match exactly.
Upvotes: 2