cap-android-intents
TypeScript icon, indicating that this package has built-in type declarations

1.0.91 • Public • Published

cap-android-intents

Capacitor plugin. Enables sending of direct and broadcast intents

Install

npm install cap-android-intents
npx cap sync

API

Example

import { Intents } from 'cap-android-intents'

Broadcast

await Intents.sendIntent({action: "com.app.exampleaction", isDirect: false})

Direct

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(...)

sendIntent(options: IntentCall) => Promise<void>
Param Type
options IntentCall

checkIntentReceived()

checkIntentReceived() => Promise<IntentCall>

Returns: Promise<IntentCall>


finish()

finish() => void

Interfaces

IntentCall

Prop Type
action string
extra { [key: string]: any; }
data { [key: string]: any; }
isDirect boolean
component { [key: string]: any; }

Readme

Keywords

Package Sidebar

Install

npm i cap-android-intents

Weekly Downloads

163

Version

1.0.91

License

MIT

Unpacked Size

24.4 kB

Total Files

27

Last publish

Collaborators

  • better-at-home