Reputation: 822
For example if we have media player and we want to press next button twice and send this action every time to mobile using DataApi.
Problem is that DataApi uses onDataChange which will send data only when Data has changed.
Is there any other options to get my example working.
Upvotes: 2
Views: 69
Reputation: 157487
For example if we have media player and we want to press next button twice and send this action every time to mobile using DataApi.
Problem is that DataApi uses onDataChange which will send data only when Data has changed
That's the expected behaviour and this done for saving resources. If you want to force this behaviour you can add the result of System.currentTimeMillis()
to the payload (E.g. to DataMap) in order to cheat the system and send the payload again.
Edit:
For sending messages you should use the MessageApi
Upvotes: 4