Search code examples
androidwear-osandroid-wear-data-api

onDataChanged() not getting invoked by WearableListener service


I have a mobile app for populating the DataApi and implemented a listener using WearableListenerService on the android wear side for listening to the data changes.Previously i was using Android studio and everything was working fine but when i switched to eclipse and integrated mobile code with an existing mobile app, wear app stopped responding to the data changes from the handheld side.I am including timestamps with every data packet to ensure the data is different every time.I have checked and the mobile app is successfully sending data to the wear but the onDataChanged method is not getting invoked. Any ideas?


Solution

  • Please check that the package name for both WearApp and MobileApp are the same. When developers generate code from Studio, we do that automatically. In Eclipse this is a manual step.