Skip to content
This repository has been archived by the owner on Oct 21, 2021. It is now read-only.

Showcase of a two-way communication between React Native and Android Wear apps.

License

Notifications You must be signed in to change notification settings

bevkoski/react-native-android-wear-demo

Repository files navigation

React Native-Android Wear Communication Demo

Showcase of an established two-way communication between a React Native app and an Android Wear app using the MessageAPI.

Demo

Running it from Android Studio

Clone the repository

git clone https://github.com/bevkoski/react-native-android-wear-demo.git

cd react-native-android-wear-demo

Install dependencies

yarn or npm install

Start the packager

react-native start

Open the project in Android Studio

  1. Start Android Studio
  2. Choose "Open an existing Android Studio project"
  3. Select the /react-native-android-wear-demo/android folder

Run the mobile app

  1. Connect your Android phone via USB
  2. Select the app module as a run configuration
  3. Run the app module
  4. 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.

Run the watch app

  1. Connect your Android watch via USB
  2. Select the wear module as a run configuration
  3. Run the wear module
  4. Select your watch from the available connected devices

How it works

Check out this Medium article.

Thanks

Special thanks to @toteto for the implementation of the watch app and the extensive contribution to the native parts of the mobile app.

About

Showcase of a two-way communication between React Native and Android Wear apps.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published