Skip to content

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

License

Notifications You must be signed in to change notification settings

numandev1/react-native-process-text-intent

Repository files navigation

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