Back to Trending
RepositoryJava
fabOnReact

fabOnReact/react-native-wear-connectivity

Connect Wear OS apps with react-native.

171stars
9forks
1issues
2views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: wearable-devices

#1 Repository of the week

1
TINIX TRENDING·Topic: wear-api

#1 Repository of the month

1
TINIX TRENDING·Topic: wear-os

#1 Repository of the week

react-native-wear-connectivity

Allows you to connect React Native Mobile apps with WearOS.

Sending Voice Message (enable audio)Sending Text

Note: Refer to react-native-watch-connectivity for Apple Watch development.

Table of Contents

How to run the example

I suggest you to try to run the example before doing your own implementation. You can try to modify the WearOS example and connect it to your React Native Mobile app following this instructions.

How to run the React Native Mobile App example

You need to clone the react-native-wear-connectivity project, build and run the mobile app example.

git clone https://github.com/fabOnReact/react-native-wear-connectivity
cd react-native-wear-connectivity
yarn
cd example
yarn
yarn android

How to run the Jetpack Compose WearOS example

  1. Clone the WearOS Jetpack Compose example
git clone https://github.com/fabOnReact/wearos-communication-with-rn
  1. Open the project with android studio, build and run it on an Android WearOS emulator.
  2. Now you can pair the WearOS emulator with the Android Mobile Emulator as explained in these instructions.

Make sure you respect this requirements:

Both apps share the same package name and applicationId

Generate the app using the same package name and applicationId of the React Native Android App otherwise follow these instructions to rename package name (in AndroidManifest, build.gradle, the project files) and applicationId in build.gradle.

Both apps are signed with the same key

Make sure both apps use the same signing key. You can verify it as follows:

Jetpack Compose App WearOS app (no react-native)

  • Verify that your build.gradle.kts on WearOS uses the same certificate from the Mobile App. The WearOS example configurations are here for our WearOS Jetpack Compose example.
  • Make sure the two projects use the same keystore. The WearOS project uses the same debug.keystore of the Mobile App.

In our example, the gradle configs set the singingConfigs to use the same file debug.keystore from the React Native Mobile App. The same configuration needs to be done for the release/production key.

Android Mobile React Native app

  • Make sure both apps are using the same key, in our example the singingConfigs for the React Native Mobile App are configured here and the debug.keystore is the same from the WearOS app.

Detailed explanation of the Implementation

Sending messages from Jetpack Compose WearOS to React Native Mobile Device

sendMessageToClient is implemented on Jetpack Compose WearOS to send messages to the React Native Mobile App. sendMessageToClient is triggered on WearOS when clicking on the watch Button Component.

fun sendMessageToClient(node: Node) {
    val jsonObject = JSONObject().apply {
        put("event", "message")
        put("text", "hello")
    }
    try {
        val sendTask = Wearable.getMessageClient(applicationContext).sendMessage(
            node.getId(), jsonObject.toString(), null
        )
    } catch (e: Exception) {
        Log.w("WearOS: ", "e $e")
    }
}

The WearOS sendMessageToClient function retrieves the devices connected via bluetooth to the WearOS device, and sends a JSON payload to those devices.

The payload is:

{
   event: "message",
   text: "this is the message parameter",
}

The React Native Mobile App uses watchEvents.on(eventName, callback) to listen to the message event and to increase the number displayed in the React Native Mobile App. The implementation in the React Native Mobile example is in CounterScreen/index.android.tsx.

useEffect(() => {
  const unsubscribe = watchEvents.on('message', () => {
    setCount((prevCount) => prevCount + 1);
  });

  return () => {
    unsubscribe();
  };
}, []);

Sending messages from React Native Mobile Device to Jetpack Compose WearOS

The React Native Mobile App Example sends messages to the WearOS Jetpack Compose example with sendMessage.

const sendMessageToWear = () => {
  setDisabled(true);
  const json = { text: 'hello' };
  sendMessage(json, onSuccess, onError);
};

The Jetpack Compose WearOS app implements onMessageReceived and updates the Counter number on the screen when the message is received:

override fun onMessageReceived(messageEvent: MessageEvent) {
    val jsonObject = JSONObject(messageEvent.path)
    val event = jsonObject.getString("event")
    if (event.equals("message")) {
        count = count + 1;
    }
}

onMessageReceived modifies the count state variable and re-renders the Counter component with a new text.

You can copy the implementation from the example, or follow the instructions above to rename package name, application id and change the signing key to pair that example with your React Native App.

Alternative methods of installation

The instructions for writing the WearOS apps with react-native are available at alternative-installation.md. React Native does not officially support WearOS, some essential components like CircularScrollView are not available in React Native. More info in Issues https://github.com/fabOnReact/react-native-wear-connectivity/issues/12 and https://github.com/andrew-levy/jetpack-compose-react-native/issues/9.

FAQ on Troubleshooting Errors

While some error messages are displayed on the metro server for the mobile or wearOS device (port 8082), other warnings are only available through logcat. To display them you need to open the android logcat tool from within Android Studio, where you can select the emulator and filter the messages by package name (more info in this screenshot).

Wearable App not installed on Mobile Device

The error displays on the Metro Server if the mobile device did not install the Wear App, which is used to pair mobile device with wearOS device. The Wear app is installed from Google Play and allows to pair the Wear Device with the Android Phone. Follow this [instructions][21] to pair WearOS emulator with Android Phone.

The Android mobile phone needs to install the Google Play Wear app.

wearOS device too far for bluetooth connection

Logcat (wearOS) shows the following log message when sending messages via bluetooth to a mobile device too far from the watch. The message is not displayed on the Metro Server.

Pixel_8_Pro_API_35Device is too far for bluetooth connection.

Failed to deliver message to AppKey

Logcat shows the error messages when the WearOS and Mobile apps are not signed with the same key, or they do not share the same package name and applicationId (more info here).

Failed to deliver message to AppKey

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

Feature requests are discussed in the issue tracker.

License

MIT

Similar Projects

Discover other similar projects and AI models.

RepositoryC++
react/react-native

A framework for building native applications using React

127.0k
Nov 27, 2026
RepositoryJava
DevEmperor/WristAssist

A powerful ChatGPT and DALL-E app for all WearOS devices

124
Nov 24, 2025
RepositoryKotlin
amoledwatchfaces/Complications-Suite-Wear-OS

Complications Suite - Wear OS app

133
Oct 26, 2026
RepositoryKotlin
Zaffox/Discord-WearOS

Discord For WearOS

60
Nov 9, 2026
RepositoryTypeScript
morluto/rea

Reverse engineer anything with agents, from app behavior down to native binaries.

487.0k
Dec 2, 2026
RepositoryTypeScript
laurent22/joplin

Joplin - the privacy-focused note taking app with sync capabilities for Windows, macOS, Linux, Android and iOS.

57.4k
Dec 1, 2026
RepositoryJava
CatimaLoyalty/Android

Catima, a Loyalty Card & Ticket Manager for Android

1.8k
Nov 29, 2026
RepositoryJava
hms-douglas/kapture

Kapture is a screen recorder for android and wear os that allows to record/capture the microphone audio while sharing it with other apps.

126
Nov 16, 2026
RepositoryJava
pccr10001/TeslaWearKey

Tesla Key Card for NFC-enabled Android Wear watches

125
Jul 22, 2025