@simplysm/capacitor-plugin-broadcast 13.0.58 → 13.0.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +19 -15
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -25,13 +25,17 @@ npx cap sync
25
25
 
26
26
  A wrapper class consisting only of static methods. Access the native plugin through this class instead of using it directly.
27
27
 
28
- | Method | Return Type | Description |
29
- |--------|----------|------|
30
- | `subscribe(filters, callback)` | `Promise<() => Promise<void>>` | Registers a Broadcast receiver and returns an unsubscribe function |
31
- | `unsubscribeAll()` | `Promise<void>` | Unregisters all registered Broadcast receivers |
32
- | `send(options)` | `Promise<void>` | Sends a Broadcast Intent |
33
- | `getLaunchIntent()` | `Promise<IBroadcastResult>` | Retrieves the Intent information that launched the app |
34
- | `addNewIntentListener(callback)` | `Promise<PluginListenerHandle>` | Registers a listener for new Intents received while the app is running |
28
+ ```typescript
29
+ import { Broadcast } from "@simplysm/capacitor-plugin-broadcast";
30
+ ```
31
+
32
+ | Method | Signature | Return Type | Description |
33
+ |--------|-----------|----------|------|
34
+ | `subscribe` | `(filters: string[], callback: (result: IBroadcastResult) => void)` | `Promise<() => Promise<void>>` | Registers a Broadcast receiver and returns an unsubscribe function |
35
+ | `unsubscribeAll` | `()` | `Promise<void>` | Unregisters all registered Broadcast receivers |
36
+ | `send` | `(options: { action: string; extras?: Record<string, unknown> })` | `Promise<void>` | Sends a Broadcast Intent |
37
+ | `getLaunchIntent` | `()` | `Promise<IBroadcastResult>` | Retrieves the Intent information that launched the app |
38
+ | `addNewIntentListener` | `(callback: (result: IBroadcastResult) => void)` | `Promise<PluginListenerHandle>` | Registers a listener for new Intents received while the app is running |
35
39
 
36
40
  ### `IBroadcastResult` Interface
37
41
 
@@ -46,14 +50,14 @@ An interface representing Broadcast reception results or Intent information.
46
50
 
47
51
  The low-level Capacitor plugin interface. In most cases, use the `Broadcast` wrapper class instead of this interface directly. It is exported for advanced use cases such as custom plugin registration.
48
52
 
49
- | Method | Return Type | Description |
50
- |--------|----------|------|
51
- | `subscribe(options, callback)` | `Promise<{ id: string }>` | Register a BroadcastReceiver with intent filters |
52
- | `unsubscribe(options)` | `Promise<void>` | Unregister a specific BroadcastReceiver by ID |
53
- | `unsubscribeAll()` | `Promise<void>` | Unregister all BroadcastReceivers |
54
- | `send(options)` | `Promise<void>` | Send a Broadcast Intent |
55
- | `getLaunchIntent()` | `Promise<IBroadcastResult>` | Retrieve the launch Intent |
56
- | `addListener("onNewIntent", callback)` | `Promise<PluginListenerHandle>` | Listen for new Intents while the app is running |
53
+ | Method | Signature | Return Type | Description |
54
+ |--------|-----------|----------|------|
55
+ | `subscribe` | `(options: { filters: string[] }, callback: (result: IBroadcastResult) => void)` | `Promise<{ id: string }>` | Register a BroadcastReceiver with intent filters |
56
+ | `unsubscribe` | `(options: { id: string })` | `Promise<void>` | Unregister a specific BroadcastReceiver by ID |
57
+ | `unsubscribeAll` | `()` | `Promise<void>` | Unregister all BroadcastReceivers |
58
+ | `send` | `(options: { action: string; extras?: Record<string, unknown> })` | `Promise<void>` | Send a Broadcast Intent |
59
+ | `getLaunchIntent` | `()` | `Promise<IBroadcastResult>` | Retrieve the launch Intent |
60
+ | `addListener` | `(eventName: "onNewIntent", listenerFunc: (data: IBroadcastResult) => void)` | `Promise<PluginListenerHandle>` | Listen for new Intents while the app is running |
57
61
 
58
62
  ```typescript
59
63
  import type { IBroadcastPlugin, IBroadcastResult } from "@simplysm/capacitor-plugin-broadcast";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simplysm/capacitor-plugin-broadcast",
3
- "version": "13.0.58",
3
+ "version": "13.0.60",
4
4
  "description": "심플리즘 패키지 - Capacitor Broadcast Plugin",
5
5
  "author": "김석래",
6
6
  "license": "MIT",