capacitor-context-menu
v1.0.1
Published
Allows catching context-menu events (PROCESS_TEXT) from android intentions
Downloads
9
Readme
capacitor-context-menu
Allows catching context-menu events (PROCESS_TEXT) from android intentions
Install
npm install capacitor-context-menu
npx cap sync
Manifest
To use this plugin you need to add the following to your AndroidManifest.xml inside your MainActivity
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.PROCESS_TEXT" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
``
## API
<docgen-index>
* [`checkProcessTextIntentReceived()`](#checkprocesstextintentreceived)
* [`addListener('processTextReceived', ...)`](#addlistenerprocesstextreceived)
* [Type Aliases](#type-aliases)
</docgen-index>
<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->
### checkProcessTextIntentReceived()
```typescript
checkProcessTextIntentReceived() => Promise<{ text: string; }>
Returns: Promise<{ text: string; }>
addListener('processTextReceived', ...)
addListener(eventName: 'processTextReceived', listenerFunc: ListenerCallback) => void
| Param | Type |
| ------------------ | ------------------------------------------------------------- |
| eventName
| 'processTextReceived' |
| listenerFunc
| ListenerCallback |
Type Aliases
ListenerCallback
(err: any, ...args: any[]): void