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

@hello-x/react-native

v0.0.7

Published

HelloX 電話機能 SDK - React Native

Readme

@hello-x/react-native

HelloX 電話機能 SDK の React Native 向け実装。Asterisk 経由の SIP 通話 (発信・着信・通話制御) を JS API として提供します。

インストール

npm install @hello-x/react-native react-native-webrtc react-native-sound @react-native-async-storage/async-storage

@react-native-async-storage/async-storage はパッケージ側で static import しているため、カスタム storage 実装 (MMKV / Keychain / SecureStore など) を渡す場合でも install は必須です。

react-native-sound は着信音の再生に使うネイティブモジュールです。SDK が起動時に import するため、ringtone: false(着信音を鳴らさない設定)でも install は必須です。install 後はアプリのネイティブ再ビルドが必要で(iOS: pod install → 再ビルド、Android: 再ビルド)、Metro のリロードだけではリンクされません。未リンクのまま起動すると SDK の読み込みに失敗します(詳細は「着信音」節)。

サポートバージョン

  • React Native >= 0.84
  • react-native-webrtc >= 124.0.0
  • react-native-sound >= 0.11
  • @react-native-async-storage/async-storage >= 2.0

着信音

着信時に着信音を鳴らします (既定で有効)。react-native-sound で同梱音源を再生します。

1. react-native-sound のネイティブリンク(必須)

react-native-sound はネイティブモジュールです。npm install 後にアプリのネイティブ再ビルドを行ってください(iOS: cd ios && bundle exec pod install → 再ビルド、Android: 再ビルド)。Metro のリロードだけではリンクされません。未リンクのまま起動すると SDK の読み込み自体が失敗しますringtone: false でも同様。SDK が起動時に react-native-sound を import するため)。

2. 音源ファイルの配置

同梱音源 hellox_ringtone.wavreact-native-sound の仕様上ネイティブバンドルから読み込むため、アプリのネイティブプロジェクトに配置する必要があります。ファイルは node_modules/@hello-x/react-native/assets/hellox_ringtone.wav にあります。

  • Android: android/app/src/main/res/raw/hellox_ringtone.wav にコピー
  • iOS: Xcode でアプリターゲットに hellox_ringtone.wav を追加 (Copy Bundle Resources)

未配置の場合は SDK 初期化時に警告ログ [HelloX] [ringtone] failed to load ... が出るだけで、クラッシュはせず着信処理 (応答 / 拒否) にも影響しません(着信音が鳴らないだけ)。この警告は console.warn 経由のため、dev ビルドでは LogBox(黄色)や各種ログに出ますが、release ビルドの画面には出ません。

3. iOS のサイレントスイッチについて(制約)

iOS では、本体側面のサイレントスイッチが ON(消音)のとき着信音は鳴りませんreact-native-sound の既定オーディオセッションカテゴリが AVAudioSessionCategoryAmbient で、このカテゴリはサイレントスイッチに従うためです。マナーモード中でも着信音を鳴らしたい要件がある場合は、別途 Playback 等へのオーディオセッションカテゴリ変更が必要です。Android にこの制約はありません。

4. 無効化

着信音を鳴らさない場合は ringtone: false を渡します(前述のとおり react-native-sound の install / ネイティブリンク自体は必要です)。

const sdk = new HelloX({ tokens: { accessToken: "...", refreshToken: "..." }, ringtone: false });

ドキュメント

ネイティブ設定 (iOS / Android のマイク権限、register-globals の import など)・利用方法・API リファレンス・エラーハンドリング・トラブルシューティングは ドキュメントサイト に集約しています。