Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/IT-MikeS/capacitor-intents
Simple intent tools for Capacitor on Android platform.
https://github.com/IT-MikeS/capacitor-intents
Last synced: about 2 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 4 years ago)
- Default Branch: main
- Last Pushed: 2024-09-26T15:00:26.000Z (4 months ago)
- Last Synced: 2024-11-10T01:42:28.425Z (2 months ago)
- Language: Java
- Homepage:
- Size: 991 KB
- Stars: 11
- Watchers: 3
- Forks: 5
- Open Issues: 5
-
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
--------------------