numandev1 / react-native-process-text-intent

Get text from android android.intent.action.PROCESS_TEXT intent-filter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-native-process-text-intent

Get text from android android.intent.action.PROCESS_TEXT intent-filter

Demo

Installation

npm install react-native-process-text-intent

Usage

import { getProcessTextIntent } from 'react-native-process-text-intent';

// ...

getProcessTextIntent()
  .then((textResult) => {
    if (textResult) {
      console.log(textResult, 'ProcessedText');   // here will be your processed Text coming from android.intent.action.PROCESS_TEXT intent-filter
    }
  })
  .catch((error) => {
    console.log(error);
  });
};

first you need to add this intent-filter in AndroidManifest.xml

<intent-filter>
  <action android:name="android.intent.action.PROCESS_TEXT" />
  <category android:name="android.intent.category.DEFAULT" />
  <data android:mimeType="text/plain" />
</intent-filter>

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

About

Get text from android android.intent.action.PROCESS_TEXT intent-filter

License:MIT License


Languages

Language:Java 43.1%Language:C++ 17.8%Language:Objective-C++ 12.7%Language:Ruby 7.3%Language:Objective-C 6.5%Language:JavaScript 4.5%Language:TypeScript 4.4%Language:Starlark 1.5%Language:Shell 1.2%Language:CMake 0.7%Language:C 0.3%Language:Swift 0.2%