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 🙏

© 2025 – Pkg Stats / Ryan Hefner

react-native-tone-framework

v1.0.12

Published

TONE Telegenics is a TONE-Enabled content sharing and streaming platform for businesses to exchange marketing and mobile engagement concepts

Readme

React Native Tone Framework Documentation

Table of Contents

  1. Introduction

  2. Installation

  3. Prerequisites

  4. Platform Setup

  5. Basic Usage

  6. API Reference

  7. Event Handling

  8. Permissions

  9. Advanced Features

  10. Troubleshooting

  11. License

  12. Introduction


The React Native Tone Framework is a specialized module that enables TONE-enabled content sharing and streaming capabilities in React Native applications. It allows businesses to exchange marketing and mobile engagement concepts through audio frequency detection.

Key Features:

  • Audio frequency detection
  • Content sharing
  • Marketing engagement
  • Cross-platform support (iOS & Android)
  • Offline mode support
  • Location-based services
  1. Installation

Install via npm:

npm install react-native-tone-framework

Or using yarn:

yarn add react-native-tone-framework
  1. Prerequisites

  • Client key from Tone Framework official site
  • Android API level 22 or above
  • iOS version 12 or above
  • React Native version 0.59 or above
  1. Platform Setup

iOS Setup:

  1. Add required permissions to Info.plist:
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>We use the location to provide accurate and relative information for users</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>We use the location to provide accurate and relative information for users</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>We use the location to provide accurate and relative information for users</string>
<key>NSMicrophoneUsageDescription</key>
<string>This app requires microphone access to enable voice commands.</string>
  1. Enable Background Modes capabilities for:
  • Microphone usage
  • Location updates

Android Setup:

  1. Add permissions to AndroidManifest.xml:
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
  1. Add dependency to build.gradle:
implementation 'com.google.code.gson:gson:2.10.1'
  1. Basic Usage

Import required functions:

import {
  initFramework,
  setClientID,
  requestPermission,
  start,
  stop,
  onToneReceived,
  onToneTag
} from 'react-native-tone-framework';

Basic implementation:

useEffect(() => {
  // Initialize framework
  initFramework();
  
  // Request necessary permissions
  requestPermission();
  
  // Set client ID
  setClientID('your-client-id');
  
  // Start listening
  start();
  
  // Setup listeners
  const toneReceivedListener = onToneReceived((toneData) => {
    console.log('Tone received:', toneData);
  });
  
  const toneTagListener = onToneTag(({ toneTag, isBadCode }) => {
    console.log('Tone tag:', toneTag, 'Is bad code:', isBadCode);
  });
  
  return () => {
    // Cleanup
    stop();
    toneReceivedListener.remove();
    toneTagListener.remove();
  };
}, []);
  1. API Reference

Core Functions:

  • initFramework(): Initialize the Tone Framework
  • setClientID(clientID: string): Set the client identification
  • requestPermission(): Request necessary platform permissions
  • start(): Start tone detection
  • stop(): Stop tone detection
  • restart(): Restart the framework
  • removeListeners(): Remove all event listeners

Offline Mode Functions:

  • enableOfflineMode(): Enable offline functionality
  • disableOfflineMode(): Disable offline functionality
  • downloadOfflineData(): Download data for offline use
  • deleteOfflineData(): Clear offline data

Platform Specific Functions:

  • startReceiver(): Start receiver (Android only)
  • stopReceiver(): Stop receiver (Android only)
  • enableAppleExclusivePermission(): Enable iOS specific permissions
  • disableAppleExclusivePermission(): Disable iOS specific permissions
  • showDefaultToneTagSheet(): Show default tone tag sheet (iOS only)
  1. Event Handling

The framework provides two main event listeners:

onToneReceived:

const listener = onToneReceived((toneData) => {
  // Handle received tone data
});

onToneTag:

const listener = onToneTag(({ toneTag, isBadCode }) => {
  // Handle tone tag data
});
  1. Permissions

The framework requires several permissions:

  • Location (Fine location for Android)
  • Microphone access
  • Notifications (Android)
  • Background mode capabilities (iOS)

Use requestPermission() to handle permission requests:

await requestPermission();
  1. Advanced Features

Offline Mode:

// Enable offline mode
enableOfflineMode();

// Download data for offline use
downloadOfflineData();

// Disable offline mode
disableOfflineMode();

// Clear offline data
deleteOfflineData();

Platform Specific Features:

iOS:

// Enable Apple exclusive permissions
enableAppleExclusivePermission();

// Show default tone tag sheet
showDefaultToneTagSheet();

Android:

// Manage receiver
startReceiver();
stopReceiver();
  1. Troubleshooting

Common Issues:

  1. Framework not initialized:
  • Ensure initFramework() is called before other functions
  • Verify client ID is set correctly
  1. Permissions not granted:
  • Call requestPermission() before starting the framework
  • Check platform-specific permission settings
  1. Events not receiving:
  • Verify listeners are properly set up
  • Check if framework is started
  • Ensure cleanup is handled properly
  1. Platform specific issues: iOS:
  • Verify background modes are enabled
  • Check Info.plist permissions

Android:

  • Verify manifest permissions
  • Check gradle dependencies
  1. License

Proprietary License - TheToneknows Company

This framework is proprietary software owned by TheToneknows Company. Usage of this framework requires a valid license that must be purchased from TheToneknows Company.

License Requirements:

  • Commercial license must be purchased from TheToneknows Company
  • One license per application/implementation
  • License is non-transferable
  • Unauthorized use, reproduction, or distribution is prohibited

To obtain a license, please contact: TheToneknows Company Website: https://thetoneknows.com Email: [email protected]

For more information and support, visit: https://github.com/Anilkumar18/react-native-tone-framework