项目介绍

cawfree/react-native-quiet 是一个托管在 GitHub 上的开源项目,主要使用 JavaScript 编写,目前获得 176 个 Star、20 次 Fork。

仓库全名
cawfree/react-native-quiet
Star 数
176
Fork 数
20
未关闭 Issue
21

README 摘要

react-native-quiet This is a React Native wrapper around the Quiet Project, which enables the transfer of data using sound as the transfer medium. This has a number of benefits: Super cross-platform. (You just need a microphone and a speaker.) Broadcast to devices within range without pairing. No network connection required. Quiet can even go ultrasonic, allowing us to communicate without impacting on noise levels…

完整内容见 GitHub 原始 README 或本页 。

常见问题

react-native-quiet 用什么语言开发?

主要使用 JavaScript 编写,目前有 176 个 Star。

如何获取 react-native-quiet 的源码?

可以直接克隆仓库:git clone https://github.com/cawfree/react-native-quiet.git,默认分支为 master;安装与运行步骤见仓库 README。

react-native-quiet 最近还在维护吗?

仓库最近一次更新为 2023年1月5日,当前有 21 个未关闭 Issue;Star 数为 176,可作为社区活跃度的参考。

关于

🤫 Quiet for React Native.

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

简要分析

热度分
217
价值分
110
活跃状态
活跃

语言占比

Java
JavaScript
Objective-C
Ruby
Starlark

贡献者

README

react-native-quiet

This is a React Native wrapper around the Quiet Project, which enables the transfer of data using sound as the transfer medium. This has a number of benefits:

  • Super cross-platform. (You just need a microphone and a speaker.)
  • Broadcast to devices within range without pairing.
  • No network connection required.

Quiet can even go ultrasonic, allowing us to communicate without impacting on noise levels that are perceptible by human ears.

Try the awesome online demo here.

🚀 Getting started

Using npm:

$ npm install react-native-quiet --save

Using yarn:

yarn add react-native-quiet
Android

This project relies upon the Android NDK; please make sure this is configured within your system path. Android relies upon caching the Quiet Android Project, meaning that we have to manually configure it’s visibility to your compiled application. To do this, in your <project-dir>/android/settings.gradle, append the :quiet native project, which is packaged inside of react-native-quiet:

include ':quiet'
project(':quiet').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-quiet/android/Transducer/quiet')

Finally, under File > Project Structure, be sure to define your Android NDK location under SDK Location. You can just use the dropdown to select the default location.

iOS

On iOS, after installing be sure to sync your Cocoapods via pod install.

Upgrading

0.1.0

android/settings.xml


include ':quiet'
- project(':quiet').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-quiet/android/org.quietmodem.Quiet/quiet')
+ project(':quiet').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-quiet/android/Transducer/quiet')

✍️ Example

This project exposes high level functionality to send and receive messages using near-ultrasound. Simply start the library, use send() to transmit a message string and addListener to listen to receive sent messages. Be careful; you can hear your own messages.

import Quiet from 'react-native-quiet';

// Start listening. (This will ask for microphone permissions!)
(async() => {
  await Quiet.start("ultrasonic-experimental");
  const { unsubscribe } = Quiet
    .addListener(msg => console.warn(msg));
  Quiet.send("hello, world!");
  await new Promise(resolve => setTimeout(resolve, 10000));
  Quiet.stop();
  unsubscribe();
})();

✌️ License

MIT

评论

暂无评论