Socket
Socket
Sign inDemoInstall

react-native-speech-notification

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-native-speech-notification

A React Native Text-to-Speech library for Android and iOS with an option for Text-to-Speech as a Notification sound


Version published
Weekly downloads
3
Maintainers
1
Install size
28.4 kB
Created
Weekly downloads
 

Readme

Source

React Native Speech Notification - iOS and Android

React Native Speech Notification is Text-to-Speech as a notification library for iOS and Android

##Documentation

  • Installation
  • Usage
  • About
  • License

Installation

Step 1

Install react-native-speech-notification

npm install https://github.com/kn4rfy/react-native-speech-notification --save

Note: --save or --save-dev flag is very important for this step. rnpm will link your libs based on dependencies and devDependencies in your package.json file.

Automatic linking

Step 2

"rnpm" is a community project that allows linking of native dependencies automatically: Install rnpm

npm install rnpm -g

Note: rnpm requires node version 4.1 or higher

Step 3

Link your native dependencies:

rnpm link

Done! All libraries with a native dependencies should be successfully linked to your iOS/Android project.

Manual linking

Manual linking can be found at React Native Docs

Usage

import SpeechNotification from "react-native-speech-notification";

Using the Text-to-Speech only

SpeechNotification.speak({
  message: this.state.message,
  language: this.state.language
});

Using Text-to-Speech as notification

SpeechNotification.notify({
  title: 'Title',
  icon: 'icon', // {icon}.png/.jpg must be present in each corresponding android/app/src/main/res/drawable-*dpi/ folders
  message: this.state.message,
  language: this.state.language
});
Reminder: icon works only for Android.

{icon}.png/.jpg must be present in each corresponding android/app/src/main/res/drawable-*dpi/ folders

About

This library is an optimized port of Cordova Text-to-Speech Notification Plugin

License

The MIT License (MIT)

Copyright (c) 2016 Francis Knarfy Elopre

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Keywords

FAQs

Last updated on 06 Mar 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc