npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@haykmkrtich/react-native-patriot-native

v1.0.6

Published

[![npm version](https://badge.fury.io/js/%40haykmkrtich%2Freact-native-patriot-native.svg)](https://badge.fury.io/js/%40haykmkrtich%2Freact-native-patriot-native) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.o

Readme

React Native Patriot Native

npm version License: MIT Platform

🚀 Seamlessly install WearOS watch faces and retrieve device information directly from your React Native mobile application.

✨ What's New in v1.0.5

  • 🔍 Device Detection: New getConnectedWatchProperties() function
  • 📱 Multi-Platform Support: Detect WearOS, Fitbit, and other wearable devices
  • 🏷️ Device Information: Get name, platform, type, and unique ID
  • 🛡️ Enhanced Error Handling: Improved disconnection detection

🚀 Quick Start

npm install @haykmkrtich/react-native-patriot-native
import { installWatchface, getConnectedWatchProperties } from '@haykmkrtich/react-native-patriot-native';

// Install watchface
await installWatchface('com.example.watchface.package');

// Get device info
const watch = await getConnectedWatchProperties();
console.log(`Connected: ${watch.displayName} (${watch.platform})`);

📋 Requirements

  • ⚛️ React Native ≥ 0.60.0
  • 🤖 Android API level 21+ (Android 5.0+)
  • ⌚ Paired WearOS device

🎯 Features

| Feature | Description | |---------|-------------| | 📦 Watch Face Installation | Install watch faces directly on paired WearOS devices | | 🔍 Device Detection | Retrieve detailed information about connected devices | | 🏷️ Platform Detection | Identify WearOS, Fitbit, and other wearable platforms | | 📡 Connection Status | Monitor device connectivity and proximity | | 🔄 Promise-based API | Modern async/await support | | 💬 Native Feedback | Toast notifications for user feedback |

📖 API Reference

installWatchface(packageName: string)

Initiates watch face installation on connected WearOS device.

try {
  await installWatchface('com.example.watchface.package');
  // ✅ Installation initiated successfully
} catch (error) {
  // ❌ Handle installation errors
}

Errors:

  • NO_NODES - No connected WearOS device
  • INSTALL_FAILED - Installation process failed

getConnectedWatchProperties()

Retrieves detailed information about connected wearable devices.

interface WatchProperties {
  id: string;                    // Unique device identifier
  displayName: string;           // Human-readable device name  
  isNearby: boolean;            // Device proximity status
  type: string;                 // Device type (e.g., "watch")
  platform: string;            // Platform ("wearOS" | "fitbit")
  isDisconnected?: boolean;     // No device connected
}

Example Response:

// ✅ Connected Device
{
  id: "node_12345_abcdef",
  displayName: "Galaxy Watch 4", 
  isNearby: true,
  type: "watch",
  platform: "wearOS"
}

// ❌ No Device
{ isDisconnected: true }

🔧 Setup Requirements

Android Dependencies

Add to your android/app/build.gradle:

dependencies {
    implementation 'com.google.android.gms:play-services-wearable:18.1.0'
    implementation 'androidx.wear:wear-remote-interactions:1.0.0'
}

WearOS Development Best Practices

⚠️ Important: For Google Play Console compliance, create two applications with identical package names:

  • 📱 Mobile companion app (React Native)
  • ⌚ WearOS watch face app

This ensures proper functionality and distribution through Google Play Store.

🛠️ How It Works

graph LR
    A[Mobile App] --> B[WearOS Remote API]
    B --> C[Connected Watch]
    C --> D[Google Play Store]
    D --> E[Watch Face Installation]
  1. Device Discovery - Scan for connected WearOS devices
  2. Remote Installation - Send installation request to watch
  3. Play Store Integration - Open watch face listing on device
  4. User Confirmation - User confirms installation on watch

💡 Usage Examples

Basic Installation

import { installWatchface } from '@haykmkrtich/react-native-patriot-native';

const handleInstall = async (packageName: string) => {
  try {
    await installWatchface(packageName);
    console.log('✅ Check your watch for installation prompt');
  } catch (error) {
    console.error('❌ Installation failed:', error.message);
  }
};

Device Information

import { getConnectedWatchProperties } from '@haykmkrtich/react-native-patriot-native';

const checkWatchStatus = async () => {
  try {
    const watch = await getConnectedWatchProperties();
    
    if (watch.isDisconnected) {
      return '❌ No watch connected';
    }
    
    return `✅ ${watch.displayName} (${watch.platform}) - ${watch.isNearby ? 'Nearby' : 'Away'}`;
  } catch (error) {
    return `❌ Detection failed: ${error.message}`;
  }
};

🤝 Contributing

Contributions are welcome! Please read our contributing guidelines before submitting PRs.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

👨‍💻 Author

Hayk Mkrtich

🆘 Support


⭐ Star this repository if it helped you!

Made with ❤️ for the React Native community