1.0.92 • Published 1 year ago

cap-android-intents v1.0.92

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

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>
ParamType
optionsIntentCall

checkIntentReceived()

checkIntentReceived() => Promise<IntentCall>

Returns: Promise<IntentCall>


finish()

finish() => void

getElapsedRealTime()

getElapsedRealTime() => Promise<ElapsedTime>

Returns: Promise<ElapsedTime>


Interfaces

IntentCall

PropType
actionstring
extra{ key: string: any; }
data{ key: string: any; }
isDirectboolean
component{ key: string: any; }

ElapsedTime

PropType
timestring
1.0.92

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.91

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.3

1 year ago

1.0.0

1 year ago

0.0.1

1 year ago