https://github.com/IT-MikeS/capacitor-intents
Simple intent tools for Capacitor on Android platform.
https://github.com/IT-MikeS/capacitor-intents
Last synced: 6 months ago
JSON representation
Simple intent tools for Capacitor on Android platform.
- Host: GitHub
- URL: https://github.com/IT-MikeS/capacitor-intents
- Owner: IT-MikeS
- Created: 2020-05-26T19:56:17.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-09-26T15:00:26.000Z (about 1 year ago)
- Last Synced: 2025-05-04T02:40:47.175Z (7 months ago)
- Language: Java
- Homepage:
- Size: 991 KB
- Stars: 15
- Watchers: 3
- Forks: 11
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-capacitor - Intent - Supports multiple broadcast receiving of intents, and sending out BroadcastIntents in Android. (Other plugins)
README
# capacitor-android-intents
Simple intent tools for Capacitor on Android platform.
## Install
```bash
npm install capacitor-android-intents
npx cap sync
```
## Usage
See `example-app` in `packages` folder.
## API
* [`registerBroadcastReceiver(...)`](#registerbroadcastreceiver)
* [`unregisterBroadcastReceiver(...)`](#unregisterbroadcastreceiver)
* [`sendBroadcastIntent(...)`](#sendbroadcastintent)
### registerBroadcastReceiver(...)
```typescript
registerBroadcastReceiver(options: { filters: string[]; }, callback: (data: { [key: string]: any; }) => void) => any
```
| Param | Type |
| -------------- | ------------------------------------------------------- |
| **`options`** | { filters: {}; } |
| **`callback`** | (data: { [key: string]: any; }) => void |
**Returns:** any
--------------------
### unregisterBroadcastReceiver(...)
```typescript
unregisterBroadcastReceiver(options: { id: string; }) => any
```
| Param | Type |
| ------------- | ---------------------------- |
| **`options`** | { id: string; } |
**Returns:** any
--------------------
### sendBroadcastIntent(...)
```typescript
sendBroadcastIntent(options: { action: string; value: { [key: string]: any; }; }) => any
```
| Param | Type |
| ------------- | ---------------------------------------------------------------- |
| **`options`** | { action: string; value: { [key: string]: any; }; } |
**Returns:** any
--------------------