Showcase of an established two-way communication between a React Native app and an Android Wear app using the MessageAPI.
git clone https://github.com/bevkoski/react-native-android-wear-demo.git
cd react-native-android-wear-demo
yarn
or npm install
react-native start
- Start Android Studio
- Choose "Open an existing Android Studio project"
- Select the
/react-native-android-wear-demo/android
folder
- Connect your Android phone via USB
- Select the
app
module as a run configuration - Run the
app
module - Select your phone from the available connected devices
If you get one of the following error messages:
Could not connect to development server.
Could not get BatchedBridge, make sure your bundle is packaged properly.
Try executing adb reverse tcp:8081 tcp:8081
from the command line and reloading the app.
- Connect your Android watch via USB
- Select the
wear
module as a run configuration - Run the
wear
module - Select your watch from the available connected devices
Check out this Medium article.
Special thanks to @toteto for the implementation of the watch app and the extensive contribution to the native parts of the mobile app.