0.1.0 • Published 1 year ago
@vinit_poojary/capacitor-intent v0.1.0
Android Intent Plugin for Capacitor
Capacitor Plugin for android intent
Install
npm install @vinit_poojary/capacitor-intent
npx cap sync
yarn add @vinit_poojary/capacitor-intent
yarn cap sync
Configuration
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
Usage/Examples
import { CapacitorIntent } from '@vinit_poojary/capacitor-intent';
CapacitorIntent.addListener('getSentIntent', async ({ extraData, type }) => {
console.log('type', type);
console.log('extraData', extraData);
});
API
addListener('getSentIntent', ...)
addListener(eventName: 'getSentIntent', listenerFunc: (data: IntentData) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
Param | Type |
---|---|
eventName | 'getSentIntent' |
listenerFunc | (data: IntentData) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
Interfaces
PluginListenerHandle
Prop | Type |
---|---|
remove | () => Promise<void> |
IntentData
Prop | Type |
---|---|
extraData | any |
type | any |