Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

Awesome Lists containing this project

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

--------------------