0.1.0 • Published 1 year ago

@vinit_poojary/capacitor-intent v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Android Intent Plugin for Capacitor

npm npm bundle size NPM

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
ParamType
eventName'getSentIntent'
listenerFunc(data: IntentData) => void

Returns: Promise<PluginListenerHandle> & PluginListenerHandle


Interfaces

PluginListenerHandle

PropType
remove() => Promise<void>

IntentData

PropType
extraDataany
typeany