Capacitor plugin. Enables sending of direct and broadcast intents
npm install cap-android-intents
npx cap sync
import { Intents } from 'cap-android-intents'
await Intents.sendIntent({action: "com.app.exampleaction", isDirect: false})
await Intents.sendIntent({action: "intent.action.example",
isDirect: true,
extras: {
foo1: "fa",
foo2: "faa"
},
data: {
foo3: "faaa",
foo4: "faaaa
},
component: {
"pkg": "com.example.app",
"cls": "app.example.ExampleActivity"
}
})
sendIntent(options: IntentCall) => Promise<void>
Param | Type |
---|---|
options |
IntentCall |
checkIntentReceived() => Promise<IntentCall>
Returns: Promise<IntentCall>
finish() => void
Prop | Type |
---|---|
action |
string |
extra |
{ [key: string]: any; } |
data |
{ [key: string]: any; } |
isDirect |
boolean |
component |
{ [key: string]: any; } |