bridgefy-react-native 1.1.9 → 1.2.0
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.
- package/README.md +510 -101
- package/android/build.gradle +1 -2
- package/android/src/main/java/me/bridgefy/plugin/react_native/BridgefyReactNativeModule.kt +25 -5
- package/android/src/main/java/me/bridgefy/plugin/react_native/util/BridgefyOperationModeManager.kt +1 -1
- package/bridgefy-react-native.podspec +1 -1
- package/ios/BridgefyReactNativeModule.swift +1 -1
- package/lib/module/NativeBridgefy.js +0 -3
- package/lib/module/NativeBridgefy.js.map +1 -1
- package/lib/module/index.js +1 -7
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/NativeBridgefy.d.ts +1 -3
- package/lib/typescript/src/NativeBridgefy.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +1 -7
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/NativeBridgefy.ts +0 -4
- package/src/index.tsx +1 -15
package/README.md
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
|
|
2
1
|
<p align="center">
|
|
3
|
-
<img src="
|
|
2
|
+
<img src="example/assets/bridgefylogo1.svg" width="512"/>
|
|
4
3
|
</p>
|
|
5
|
-
|
|
6
4
|
<p align="center">
|
|
7
|
-
<img src="
|
|
5
|
+
<img src="example/assets/usecasemain.png" width="256"/>
|
|
8
6
|
</p>
|
|
9
7
|
|
|
10
8
|
# Bridgefy React Native SDK
|
|
@@ -12,25 +10,30 @@
|
|
|
12
10
|

|
|
13
11
|

|
|
14
12
|
|
|
13
|
+
|
|
15
14
|
The **Bridgefy Software Development Kit (SDK)** is a state‑of‑the‑art plug‑and‑play solution that enables offline communication in your mobile apps by using Bluetooth mesh networks.
|
|
16
15
|
|
|
17
16
|
Integrate the Bridgefy SDK into your Android and iOS app to reach users who don't always have a reliable Internet connection and keep engagement high even in challenging environments.
|
|
18
17
|
|
|
19
18
|
**Website:** [https://bridgefy.me/sdk](https://bridgefy.me/sdk)
|
|
19
|
+
|
|
20
20
|
**Email:** [contact@bridgefy.me](mailto:contact@bridgefy.me)
|
|
21
|
+
|
|
21
22
|
**Twitter:** [https://twitter.com/bridgefy](https://twitter.com/bridgefy)
|
|
23
|
+
|
|
22
24
|
**Facebook:** [https://www.facebook.com/bridgefy](https://www.facebook.com/bridgefy)
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
***
|
|
25
27
|
|
|
26
28
|
## Operation mode
|
|
27
29
|
|
|
28
30
|
Bridgefy automatically manages device discovery and connections to create a **mesh network**, whose size depends on the number of nearby devices and environmental conditions.
|
|
29
31
|
This mesh allows messages to hop across multiple devices, letting nodes in the same cluster or in different clusters exchange data without Internet access.
|
|
32
|
+
<p align="center">
|
|
33
|
+
<img src="https://images.saymedia-content.com/.image/t_share/MTkzOTUzODU0MDkyNjE3MjIx/particlesjs-examples.gif" width="70%">
|
|
34
|
+
</p>
|
|
30
35
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
---
|
|
36
|
+
***
|
|
34
37
|
|
|
35
38
|
## Platform permissions
|
|
36
39
|
|
|
@@ -39,128 +42,387 @@ Before using the SDK in a React Native app, configure the required permissions a
|
|
|
39
42
|
- [iOS Permissions](https://github.com/bridgefy/sdk-ios#permissions)
|
|
40
43
|
- [Android Permissions](https://github.com/bridgefy/sdk-android#android-permissions)
|
|
41
44
|
|
|
42
|
-
|
|
45
|
+
***
|
|
43
46
|
|
|
44
47
|
## Installation
|
|
45
48
|
|
|
46
|
-
|
|
49
|
+
1. Add the Bridgefy React Native package to your project:
|
|
47
50
|
|
|
48
51
|
```bash
|
|
52
|
+
|
|
49
53
|
npm i bridgefy-react-native
|
|
50
54
|
# or
|
|
51
55
|
yarn add bridgefy-react-native
|
|
56
|
+
|
|
52
57
|
```
|
|
53
58
|
|
|
54
|
-
|
|
59
|
+
2. Make sure you are using:
|
|
60
|
+
|
|
61
|
+
- Android Gradle Plugin with D8/desugaring enabled.
|
|
62
|
+
- Xcode 14+ for iOS builds.
|
|
63
|
+
|
|
64
|
+
***
|
|
55
65
|
|
|
56
66
|
## Usage
|
|
57
67
|
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
### Migration Guide: Legacy → TurboModule SDK
|
|
71
|
+
<details>
|
|
72
|
+
<summary>API changes, new features, and gotchas.</summary>
|
|
73
|
+
|
|
74
|
+
### Import & Instantiation
|
|
75
|
+
❌ Old
|
|
76
|
+
```typescript
|
|
77
|
+
import { Bridgefy } from 'bridgefy-react-native';
|
|
78
|
+
const bridgefy = new Bridgefy();
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
✅ New
|
|
82
|
+
|
|
83
|
+
```typescript
|
|
84
|
+
import Bridgefy from 'bridgefy-react-native'; // Singleton instance
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**New:** Use `Bridgefy` class (wraps EventEmitter + convenience methods).
|
|
88
|
+
|
|
89
|
+
### Initialization
|
|
90
|
+
|
|
91
|
+
❌ Old
|
|
92
|
+
```typescript
|
|
93
|
+
import { Bridgefy } from 'bridgefy-react-native';
|
|
94
|
+
const bridgefy = new Bridgefy();
|
|
95
|
+
await bridgefy.initialize(apiKey, verboseLogging);
|
|
96
|
+
```
|
|
97
|
+
✅ New (Added operationMode)
|
|
98
|
+
|
|
99
|
+
```typescript
|
|
100
|
+
import Bridgefy, { BridgefyOperationMode } from 'bridgefy-react-native';
|
|
101
|
+
|
|
102
|
+
await Bridgefy.initialize(apiKey, verboseLogging, BridgefyOperationMode.HYBRID);
|
|
103
|
+
```
|
|
104
|
+
**New:** `operationMode?: BridgefyOperationMode` (FOREGROUND/BACKGROUND/HYBRID).
|
|
105
|
+
|
|
106
|
+
### Propagation Profiles
|
|
107
|
+
|
|
108
|
+
❌ Old (Missing realtime)
|
|
109
|
+
|
|
110
|
+
```typescript
|
|
111
|
+
export enum BridgefyPropagationProfile {
|
|
112
|
+
standard = 'standard',
|
|
113
|
+
highDensityNetwork = 'highDensityNetwork', // Note: different name
|
|
114
|
+
sparseNetwork = 'sparseNetwork',
|
|
115
|
+
longReach = 'longReach',
|
|
116
|
+
shortReach = 'shortReach',
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
✅ New (Added Realtime, renamed)
|
|
121
|
+
|
|
122
|
+
```typescript
|
|
123
|
+
import Bridgefy, { BridgefyPropagationProfile } from 'bridgefy-react-native';
|
|
124
|
+
|
|
125
|
+
await Bridgefy.start(userId, BridgefyPropagationProfile.REALTIME); // New!
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
**Mapping:**
|
|
129
|
+
|
|
130
|
+
| Old | New |
|
|
131
|
+
| ------------------ | -------------------- |
|
|
132
|
+
| highDensityNetwork | HIGH_DENSITY_NETWORK |
|
|
133
|
+
| Others match | + REALTIME |
|
|
134
|
+
|
|
135
|
+
### Error Handling
|
|
136
|
+
|
|
137
|
+
❌ Old (String enums)
|
|
138
|
+
|
|
139
|
+
```typescript
|
|
140
|
+
export enum BridgefyErrorType {
|
|
141
|
+
simulatorIsNotSupported = 'simulatorIsNotSupported',
|
|
142
|
+
// Many iOS/Android-specific
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
✅ New (Unified codes)
|
|
147
|
+
|
|
148
|
+
```typescript
|
|
149
|
+
import Bridgefy, { BridgefyErrorCode, type BridgefyError } from 'bridgefy-react-native';
|
|
150
|
+
|
|
151
|
+
onFailToStart((error: BridgefyError) => {
|
|
152
|
+
if (error.code === BridgefyErrorCode.SERVICE_NOT_STARTED) { /* handle */ }
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
**New:** `BridgefyError = { code: BridgefyErrorCode, message: string, ... }` – consolidated codes.
|
|
157
|
+
|
|
158
|
+
### Events (Biggest Change!)
|
|
159
|
+
|
|
160
|
+
❌ Old (Manual EventEmitter)
|
|
161
|
+
|
|
162
|
+
```typescript
|
|
163
|
+
import { NativeEventEmitter } from 'react-native';
|
|
164
|
+
const emitter = new NativeEventEmitter(BridgefyReactNative);
|
|
165
|
+
|
|
166
|
+
emitter.addListener(BridgefyEvents.bridgefyDidStart, handler);
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
✅ New (Typed helpers + full coverage)
|
|
170
|
+
```typescript
|
|
171
|
+
import Bridgefy from 'bridgefy-react-native';
|
|
172
|
+
// Convenience methods (recommended)
|
|
173
|
+
Bridgefy.onStart((event) => console.log(event.userId));
|
|
174
|
+
Bridgefy.onReceiveData((event) => console.log(event.data));
|
|
175
|
+
|
|
176
|
+
// Full list (17+ events vs old 9)
|
|
177
|
+
Bridgefy.onConnectedPeers(({ peers }) => updatePeers(peers));
|
|
178
|
+
Bridgefy.onSendDataProgress(({ position, of }) => updateProgress(position / of));
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
**New events:** `DID_UPDATE_CONNECTED_PEERS`, `SEND_DATA_PROGRESS`, operation mode.
|
|
182
|
+
|
|
183
|
+
**Cleanup:**
|
|
184
|
+
```typescript
|
|
185
|
+
sub.remove(); // All helpers return { remove }
|
|
186
|
+
Bridgefy.removeAllListeners(); // Clears everything
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Send Messages
|
|
190
|
+
❌ Old (Always required uuid)
|
|
191
|
+
```typescript
|
|
192
|
+
await BridgefyReactNative.send(data, { type: 'broadcast', uuid: '...' });
|
|
193
|
+
|
|
194
|
+
```
|
|
195
|
+
✅ New (Convenience + optional uuid)
|
|
196
|
+
```typescript
|
|
197
|
+
import Bridgefy from 'bridgefy-react-native';
|
|
198
|
+
|
|
199
|
+
// Broadcast (auto-generates uuid)
|
|
200
|
+
await Bridgefy.sendBroadcast('Hello all');
|
|
201
|
+
|
|
202
|
+
// P2P/Mesh (shorthand)
|
|
203
|
+
await Bridgefy.sendP2P('Hi!', 'recipient-id');
|
|
204
|
+
await Bridgefy.sendMesh('Through mesh', 'recipient-id');
|
|
205
|
+
|
|
206
|
+
// Raw (uuid optional for broadcast)
|
|
207
|
+
await Bridgefy.send(data, { type: BridgefyTransmissionModeType.BROADCAST });
|
|
208
|
+
```
|
|
209
|
+
**Returns:** `Promise<string>` (messageId)
|
|
210
|
+
|
|
211
|
+
### New Methods (Must‑use)
|
|
212
|
+
```typescript
|
|
213
|
+
import Bridgefy from 'bridgefy-react-native';
|
|
214
|
+
|
|
215
|
+
// Operation mode (BACKGROUND/HYBRID!)
|
|
216
|
+
await Bridgefy.setOperationMode({ mode: BridgefyOperationMode.HYBRID });
|
|
217
|
+
const status = await Bridgefy.getOperationStatus(); // { shouldRunInService, debugInfo }
|
|
218
|
+
|
|
219
|
+
// Background/foreground switches
|
|
220
|
+
await Bridgefy.switchToBackground();
|
|
221
|
+
|
|
222
|
+
// Connected peers array (vs old object?)
|
|
223
|
+
const peers = await Bridgefy.connectedPeers(); // string[]
|
|
224
|
+
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
### Breaking Changes Summary
|
|
228
|
+
|
|
229
|
+
| Area | Old | New |
|
|
230
|
+
| ------- | ------------------ | --------------------------- |
|
|
231
|
+
| Events | 9 manual | 17+ typed helpers |
|
|
232
|
+
| Profile | 5 (no realtime) | 6 (+REALTIME) |
|
|
233
|
+
| Error | String enums | BridgefyError objects |
|
|
234
|
+
| Send | Manual uuid always | Convenience + optional uuid |
|
|
235
|
+
| Init | 2 params | 3 params (+mode) |
|
|
236
|
+
| Peers | Object? | string[] |
|
|
237
|
+
| License | Date object | Timestamp number |
|
|
238
|
+
|
|
239
|
+
</details>
|
|
240
|
+
|
|
241
|
+
***
|
|
242
|
+
|
|
58
243
|
### Initialization
|
|
59
244
|
|
|
60
245
|
Use `initialize` to configure the Bridgefy SDK with your API key and base options.
|
|
61
246
|
|
|
62
247
|
```typescript
|
|
63
|
-
import { Bridgefy, BridgefyPropagationProfile } from 'bridgefy-react-native';
|
|
64
248
|
|
|
65
|
-
|
|
249
|
+
import Bridgefy, {
|
|
250
|
+
BridgefyOperationMode,
|
|
251
|
+
} from 'bridgefy-react-native';
|
|
66
252
|
|
|
67
253
|
export default function App() {
|
|
68
254
|
React.useEffect(() => {
|
|
69
|
-
|
|
70
|
-
.initialize(
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
.catch((error) => {
|
|
255
|
+
// Example: initialize & start
|
|
256
|
+
Bridgefy.initialize(
|
|
257
|
+
'YOUR_API_KEY', // UUID - Your Bridgefy license key.
|
|
258
|
+
true, // Enables or disables verbose logs.
|
|
259
|
+
BridgefyOperationMode.FOREGROUND // foreground | background | hybrid
|
|
260
|
+
).catch((error) => {
|
|
76
261
|
console.error(error);
|
|
77
262
|
});
|
|
263
|
+
|
|
78
264
|
}, []);
|
|
79
265
|
}
|
|
80
266
|
```
|
|
267
|
+
- **apiKey:** Provided by Bridgefy developer site.
|
|
268
|
+
- **verboseLogging:** `true` for debugging.
|
|
269
|
+
- **operationMode:** `FOREGROUND`, `BACKGROUND`, or `HYBRID`.
|
|
81
270
|
|
|
82
271
|
### Starting and stopping the SDK
|
|
83
272
|
|
|
84
273
|
Once initialized, you can start or stop the SDK as needed.
|
|
85
274
|
|
|
86
275
|
```typescript
|
|
276
|
+
import Bridgefy, {
|
|
277
|
+
BridgefyPropagationProfile,
|
|
278
|
+
} from 'bridgefy-react-native';
|
|
87
279
|
/**
|
|
88
280
|
* Start Bridgefy SDK operations
|
|
89
281
|
*/
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
282
|
+
Bridgefy.start(
|
|
283
|
+
'your-user-id', // Optional UUID - Custom user identifier in the network.
|
|
284
|
+
BridgefyPropagationProfile.REALTIME // Optional BridgefyPropagationProfile - Message propagation profile.
|
|
93
285
|
);
|
|
286
|
+
```
|
|
287
|
+
- **userId:** Optional session uuid.
|
|
288
|
+
- **propagationProfile:** how messages travel through the mesh network. Choose the best fit for your use case.
|
|
94
289
|
|
|
290
|
+
```typescript
|
|
95
291
|
/**
|
|
96
292
|
* Stop Bridgefy SDK operations
|
|
97
293
|
*/
|
|
98
|
-
|
|
294
|
+
Bridgefy.stop();
|
|
99
295
|
```
|
|
100
296
|
|
|
101
|
-
|
|
297
|
+
***
|
|
102
298
|
|
|
103
299
|
## Sending data
|
|
104
300
|
|
|
105
|
-
|
|
301
|
+
Under the hood, these call `send(data, transmissionMode)` with the proper `BridgefyTransmissionModeType`.
|
|
106
302
|
|
|
107
303
|
```typescript
|
|
304
|
+
import Bridgefy from 'bridgefy-react-native';
|
|
305
|
+
|
|
108
306
|
async function sendData() {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
307
|
+
|
|
308
|
+
// Broadcast
|
|
309
|
+
const lastBroadcastMessageId = await Bridgefy.sendBroadcast(JSON.stringify({ text: 'Hello everyone' }));
|
|
310
|
+
|
|
311
|
+
// P2P
|
|
312
|
+
const lastP2PMessageId = await Bridgefy.sendP2P(JSON.stringify({ text: 'Hello peer' }), 'recipient-user-id');
|
|
313
|
+
|
|
314
|
+
// Mesh
|
|
315
|
+
const lastMeshMessageId = await Bridgefy.sendMesh(JSON.stringify({ text: 'Through mesh' }), 'recipient-user-id');
|
|
316
|
+
|
|
117
317
|
}
|
|
118
318
|
```
|
|
119
319
|
|
|
120
320
|
The method returns a message UUID you can use for tracking or acknowledgement flows.
|
|
121
321
|
|
|
122
|
-
|
|
322
|
+
***
|
|
123
323
|
|
|
124
324
|
## Handling SDK events
|
|
125
325
|
|
|
126
|
-
Bridgefy
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
);
|
|
152
|
-
|
|
153
|
-
return () => {
|
|
154
|
-
for (const sub of subscriptions) {
|
|
155
|
-
sub.remove();
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
}, []);
|
|
326
|
+
Bridgefy provides a comprehensive event system via React Native's `NativeEventEmitter`,
|
|
327
|
+
with typed helper methods on the `Bridgefy` class for easy listening.
|
|
328
|
+
All events are defined in the `BridgefyEvents` enum and emit from the native Module.
|
|
329
|
+
|
|
330
|
+
### Event Listening Basics
|
|
331
|
+
Use `addEventListener(eventName, listener)` for any event, or the typed helpers like `onStart(listener)`.
|
|
332
|
+
Each returns `{ remove: () => void }` for cleanup. Always call `remove()` or `removeAllListeners()` to prevent leaks, especially in components.
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
```typescript
|
|
336
|
+
|
|
337
|
+
import Bridgefy,
|
|
338
|
+
{ BridgefyEvents }
|
|
339
|
+
from 'bridgefy-react-native';
|
|
340
|
+
|
|
341
|
+
// Generic listener
|
|
342
|
+
const sub = Bridgefy.addEventListener(BridgefyEvents.BRIDGEFY_DID_START, (event) => {
|
|
343
|
+
console.log(event);
|
|
344
|
+
});
|
|
345
|
+
sub.remove(); // Clean up
|
|
346
|
+
|
|
347
|
+
// Helper (preferred)
|
|
348
|
+
const subHelper = Bridgefy.onStart((event) => console.log(event.userId));
|
|
349
|
+
subHelper.remove();
|
|
350
|
+
|
|
159
351
|
```
|
|
352
|
+
### Lifecycle Events
|
|
353
|
+
|
|
354
|
+
These track SDK start/stop/destroy operations.
|
|
355
|
+
|
|
356
|
+
- `onStart(listener: (event: BridgefyStartEvent) => void)` → `BRIDGEFY_DID_START`
|
|
357
|
+
|
|
358
|
+
- Fires when SDK starts successfully.
|
|
359
|
+
- Payload: `{ userId: string }` (your assigned UUID).
|
|
360
|
+
|
|
361
|
+
- `onStop(listener: () => void)` → `BRIDGEFY_DID_STOP`
|
|
362
|
+
- SDK stopped cleanly.
|
|
363
|
+
|
|
364
|
+
- `onFailToStart(listener: (error: BridgefyError) => void)` → `BRIDGEFY_DID_FAIL_TO_START`
|
|
365
|
+
- Start failed (e.g., permissions, Bluetooth off).
|
|
366
|
+
- Payload: `BridgefyError` with `code` like `BLUETOOTH_DISABLED`.
|
|
367
|
+
|
|
368
|
+
- `onFailToStop(listener: (error: BridgefyError) => void)` → `BRIDGEFY_DID_FAIL_TO_STOP`
|
|
369
|
+
- Stop operation failed.
|
|
370
|
+
|
|
371
|
+
- `BRIDGEFY_DID_DESTROY_SESSION` / `BRIDGEFY_DID_FAIL_TO_DESTROY_SESSION`
|
|
372
|
+
- Session destroyed or failed (use generic addEventListener).
|
|
160
373
|
|
|
161
|
-
|
|
374
|
+
### Connection Events
|
|
375
|
+
Monitor peer connections and network changes.
|
|
162
376
|
|
|
163
|
-
|
|
377
|
+
- `onConnect(listener: (event: BridgefyConnectEvent) => void)` → `BRIDGEFY_DID_CONNECT`
|
|
378
|
+
- New peer connected.
|
|
379
|
+
- Payload: `{ userId: string }`.
|
|
380
|
+
|
|
381
|
+
- `onConnectedPeers(listener: (event: BridgefyUpdatedConnectedEvent) => void)` → `BRIDGEFY_DID_UPDATE_CONNECTED_PEERS`
|
|
382
|
+
- Peers list updated (add/remove).
|
|
383
|
+
- Payload: `{ peers: string[] }` (array of user UUIDs).
|
|
384
|
+
|
|
385
|
+
- `onDisconnect(listener: (event: BridgefyDisconnectEvent) => void)` → `BRIDGEFY_DID_DISCONNECT`
|
|
386
|
+
- Peer disconnected.
|
|
387
|
+
- Payload: `{ userId: string }`.
|
|
388
|
+
|
|
389
|
+
### Secure Connection Events
|
|
390
|
+
For encrypted P2P/mesh communication.
|
|
391
|
+
- `onEstablishSecureConnection(listener: (event: BridgefySecureConnectionEvent) => void)` → `BRIDGEFY_DID_ESTABLISH_SECURE_CONNECTION`
|
|
392
|
+
- Secure link ready.
|
|
393
|
+
- Payload: `{ userId: string }`.
|
|
394
|
+
|
|
395
|
+
- `onFailToEstablishSecureConnection(listener: (error: BridgefyError & { userId: string }) => void)` → `BRIDGEFY_DID_FAIL_TO_ESTABLISH_SECURE_CONNECTION`
|
|
396
|
+
- Secure setup failed (e.g., timeout).
|
|
397
|
+
- Payload: BridgefyError + { userId: string }.
|
|
398
|
+
|
|
399
|
+
### Message Events
|
|
400
|
+
Track send/receive progress and failures.
|
|
401
|
+
|
|
402
|
+
- `onSendMessage(listener: (event: BridgefySendMessageEvent) => void)` → `BRIDGEFY_DID_SEND_MESSAGE`
|
|
403
|
+
- Message sent successfully.
|
|
404
|
+
- Payload: '{ messageId: string }` (UUID).
|
|
405
|
+
|
|
406
|
+
- `onSendDataProgress(listener: (event: BridgefyDidSendDataProgress) => void)` → `BRIDGEFY_DID_SEND_DATA_PROGRESS`
|
|
407
|
+
- Transfer progress (useful for large payloads).
|
|
408
|
+
- Payload: `{ messageId: string, position: number, of: number }`.
|
|
409
|
+
|
|
410
|
+
- `onFailSendingMessage(listener: (error: BridgefyError & { messageId: string }) => void)` → `BRIDGEFY_DID_FAIL_SENDING_MESSAGE`
|
|
411
|
+
- Send failed (e.g., no path).
|
|
412
|
+
- Payload: `BridgefyError` + `{ messageId: string }`.
|
|
413
|
+
|
|
414
|
+
- `onReceiveData(listener: (event: BridgefyReceiveDataEvent) => void)` → `BRIDGEFY_DID_RECEIVE_DATA`
|
|
415
|
+
- Data received.
|
|
416
|
+
- Payload: `{ data: string, messageId: string, transmissionMode: BridgefyTransmissionMode }`.
|
|
417
|
+
|
|
418
|
+
- `BRIDGEFY_MESSAGE_RECEIVED`
|
|
419
|
+
- Legacy message event (use generic listener).
|
|
420
|
+
|
|
421
|
+
### License events (removed)
|
|
422
|
+
|
|
423
|
+
License events have been removed from the latest Bridgefy React Native SDK and are no longer emitted at runtime. If you previously used `onUpdateLicense` or `onFailToUpdateLicense`, you can safely delete those listeners; license validation now runs internally.
|
|
424
|
+
|
|
425
|
+
***
|
|
164
426
|
|
|
165
427
|
## Additional functionality
|
|
166
428
|
|
|
@@ -170,28 +432,97 @@ The `Bridgefy` class exposes several helper methods to manage sessions, connecti
|
|
|
170
432
|
- `establishSecureConnection(userId: string): Promise<void>`: Establishes an end-to-end encrypted connection with the specified peer.
|
|
171
433
|
- `currentUserId(): Promise<string>`: Returns the current device's user identifier.
|
|
172
434
|
- `connectedPeers(): Promise<string[]>`: Returns the list of currently connected peers.
|
|
173
|
-
- `licenseExpirationDate(): Promise<
|
|
174
|
-
- `updateLicense(): Promise<void>`:
|
|
435
|
+
- `licenseExpirationDate(): Promise<number>`: Returns the configured license expiration timestamp (milliseconds since epoch).
|
|
436
|
+
- `updateLicense(): Promise<void>`: Deprecated: License updates are handled automatically; this method is preserved only for backwards compatibility and will be removed in a future release.
|
|
175
437
|
- `isInitialized(): Promise<boolean>`: Indicates whether the SDK has been initialized.
|
|
176
438
|
- `isStarted(): Promise<boolean>`: Indicates whether the SDK is currently running.
|
|
177
439
|
|
|
178
440
|
### Operation mode control
|
|
179
441
|
|
|
180
|
-
|
|
442
|
+
Bridgefy's runs in relation to your app's lifecycle,
|
|
443
|
+
balancing battery efficiency, reliability, and background connectivity.
|
|
444
|
+
They are defined in the `BridgefyOperationMode` enum and set during `initialize` or runtime.
|
|
445
|
+
|
|
446
|
+
**FOREGROUND Mode**
|
|
447
|
+
|
|
448
|
+
SDK runs **only when your app is in the foreground**.
|
|
449
|
+
- **Key traits:**
|
|
450
|
+
- No background service needed.
|
|
451
|
+
- Stops BLE scanning/mesh when app backgrounds (e.g., user switches apps).
|
|
452
|
+
- Lowest battery impact.
|
|
453
|
+
|
|
454
|
+
- **Best for:** Testing, development, or foreground-only apps like games.
|
|
455
|
+
- **Trade-offs:** No connectivity when backgrounded; simple setup (no Android manifest changes).
|
|
456
|
+
|
|
457
|
+
**BACKGROUND Mode**
|
|
458
|
+
|
|
459
|
+
SDK runs **continuously in a foreground service**, even when app is backgrounded or killed.
|
|
460
|
+
- **Key traits:**
|
|
461
|
+
- Persistent mesh networking.
|
|
462
|
+
- Shows persistent notification (Android requirement for foreground services).
|
|
463
|
+
- Higher battery drain due to constant BLE.
|
|
181
464
|
|
|
182
|
-
-
|
|
183
|
-
-
|
|
184
|
-
- `switchToBackground(): Promise<void>`
|
|
185
|
-
- `switchToForeground(): Promise<void>`
|
|
186
|
-
- `getOperationStatus(): Promise<BridgefyOperationModeStatus>`
|
|
465
|
+
- **Best for:** Always-on messaging apps needing 24/7 mesh.
|
|
466
|
+
- **Trade-offs:** Requires Android service declaration + FOREGROUND_SERVICE permission; visible notification; more battery use.
|
|
187
467
|
|
|
188
|
-
|
|
468
|
+
**HYBRID Mode**
|
|
189
469
|
|
|
190
|
-
|
|
470
|
+
**Adaptive mode** that switches automatically: foreground when app active, background service when backgrounded.
|
|
471
|
+
|
|
472
|
+
- **Key traits:**
|
|
473
|
+
- Starts in foreground (efficient when visible).
|
|
474
|
+
- Auto-switches to service on background (maintains connectivity).
|
|
475
|
+
- Uses switchToBackground() / switchToForeground() under the hood.
|
|
476
|
+
|
|
477
|
+
- **Best for:** Most production apps – balances UX, battery, and reliability.
|
|
478
|
+
- **Trade-offs:** Needs both foreground and service setup; seamless transitions.
|
|
479
|
+
|
|
480
|
+
### API Usage
|
|
481
|
+
Set mode at init or runtime (after `initialize`).
|
|
482
|
+
|
|
483
|
+
```typescript
|
|
484
|
+
|
|
485
|
+
import Bridgefy, {
|
|
486
|
+
BridgefyOperationMode,
|
|
487
|
+
} from 'bridgefy-react-native';
|
|
488
|
+
|
|
489
|
+
import { BridgefyOperationMode } from 'bridgefy-react-native';
|
|
490
|
+
|
|
491
|
+
// At initialization (recommended)
|
|
492
|
+
await Bridgefy.initialize('YOUR_KEY', false, BridgefyOperationMode.HYBRID);
|
|
493
|
+
|
|
494
|
+
// Runtime change
|
|
495
|
+
await Bridgefy.setOperationMode({ mode: BridgefyOperationMode.BACKGROUND });
|
|
496
|
+
|
|
497
|
+
// Check current
|
|
498
|
+
const mode = await Bridgefy.getOperationMode(); // Returns 'foreground' | 'background' | 'hybrid'
|
|
499
|
+
|
|
500
|
+
// Full status
|
|
501
|
+
const status = await Bridgefy.getOperationStatus();
|
|
502
|
+
// Returns: { operationMode, isInitialized, isStarted, shouldRunInService, debugInfo }
|
|
503
|
+
|
|
504
|
+
// Manual switches (for HYBRID)
|
|
505
|
+
await Bridgefy.switchToBackground();
|
|
506
|
+
await Bridgefy.switchToForeground();
|
|
507
|
+
|
|
508
|
+
```
|
|
509
|
+
Type: `BridgefyOperationModeConfig = { mode: BridgefyOperationMode };` `BridgefyOperationModeStatus` includes service flags.
|
|
510
|
+
|
|
511
|
+
### Setup Notes
|
|
512
|
+
|
|
513
|
+
**iOS Security imposes several limitations on applications participating in communication sessions when the app is not on the active screen.**
|
|
514
|
+
|
|
515
|
+
- **Android:** BACKGROUND/HYBRID need `<service android:foregroundServiceType="dataSync" />` and permissions.
|
|
516
|
+
- **Recommendation:** Start with HYBRID for production; use getOperationStatus() to debug service issues.
|
|
517
|
+
|
|
518
|
+
***
|
|
191
519
|
|
|
192
520
|
## Bridgefy propagation profiles
|
|
193
521
|
|
|
194
|
-
The `BridgefyPropagationProfile`
|
|
522
|
+
The `BridgefyPropagationProfile` optimize mesh networking for different environments by tuning **hops, TTL, sharing time, propagation limits, and tracking**.
|
|
523
|
+
Select during `start()` to match your use case.
|
|
524
|
+
|
|
525
|
+
### When to Use Each
|
|
195
526
|
|
|
196
527
|
- `STANDARD`: Balanced default profile for general messaging.
|
|
197
528
|
- `HIGH_DENSITY_NETWORK`: Optimized for crowded environments such as concerts or stadiums.
|
|
@@ -200,30 +531,108 @@ The `BridgefyPropagationProfile` enum defines presets for how messages propagate
|
|
|
200
531
|
- `SHORT_REACH`: Focuses on nearby devices only.
|
|
201
532
|
- `REALTIME`: Prioritizes ultra-low latency for time-sensitive notifications.
|
|
202
533
|
|
|
203
|
-
|
|
534
|
+
***
|
|
535
|
+
|
|
536
|
+
## Common Errors
|
|
537
|
+
|
|
538
|
+
### Android
|
|
539
|
+
<details>
|
|
540
|
+
<summary>Gradle & D8 / Desugar Requirements</summary>
|
|
541
|
+
|
|
542
|
+
Bridgefy uses modern Java APIs and requires *D8 and core library desugaring* to be enabled.
|
|
543
|
+
|
|
544
|
+
In your root `android/build.gradle` (or `settings.gradle` + new AGP configuration), ensure:
|
|
545
|
+
|
|
546
|
+
- Android Gradle Plugin version supports desugaring (AGP 7+ recommended).
|
|
547
|
+
- Java 8+ compatibility and core library desugaring are enabled in app module.
|
|
548
|
+
|
|
549
|
+
In `android/app/build.gradle`:
|
|
550
|
+
```groovy
|
|
551
|
+
android {
|
|
552
|
+
compileSdkVersion 34
|
|
553
|
+
|
|
554
|
+
defaultConfig {
|
|
555
|
+
minSdkVersion 23
|
|
556
|
+
targetSdkVersion 34
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
compileOptions {
|
|
560
|
+
sourceCompatibility JavaVersion.VERSION_1_8
|
|
561
|
+
targetCompatibility JavaVersion.VERSION_1_8
|
|
562
|
+
coreLibraryDesugaringEnabled true // Enable desugaring
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
dependencies {
|
|
567
|
+
// Required for desugaring
|
|
568
|
+
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5'
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
```
|
|
204
572
|
|
|
205
|
-
|
|
573
|
+
This avoids “Default interface methods” and time API issues at runtime.
|
|
574
|
+
|
|
575
|
+
</details>
|
|
576
|
+
|
|
577
|
+
<details>
|
|
578
|
+
<summary>Android Service (Background / Hybrid Modes)</summary>
|
|
579
|
+
|
|
580
|
+
When using **BACKGROUND** or **HYBRID** `BridgefyOperationMode`, Bridgefy should run in a foreground service so it keeps the mesh active while your app is in the background.
|
|
581
|
+
|
|
582
|
+
1. Declare the service in `AndroidManifest.xml`:
|
|
583
|
+
```xml
|
|
584
|
+
<service
|
|
585
|
+
android:name="me.bridgefy.plugin.react_native.service.BridgefyService"
|
|
586
|
+
android:enabled="true"
|
|
587
|
+
android:exported="false"
|
|
588
|
+
android:foregroundServiceType="dataSync" />
|
|
589
|
+
|
|
590
|
+
```
|
|
591
|
+
2. Add required permissions:
|
|
592
|
+
|
|
593
|
+
```xml
|
|
594
|
+
<uses-permission android:name="android.permission.BLUETOOTH" />
|
|
595
|
+
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
|
596
|
+
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
|
|
597
|
+
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
|
|
598
|
+
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
|
599
|
+
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
|
600
|
+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
|
601
|
+
|
|
602
|
+
```
|
|
603
|
+
Missing runtime permissions for BLE scanning.
|
|
604
|
+
|
|
605
|
+
**Fix**(Android 12+):
|
|
606
|
+
```xml
|
|
607
|
+
<!-- Manifest -->
|
|
608
|
+
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" android:usesPermissionFlags="neverForLocation" />
|
|
609
|
+
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
|
|
610
|
+
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
|
611
|
+
|
|
612
|
+
```
|
|
613
|
+
|
|
614
|
+
3. At runtime, request the necessary Bluetooth and location permissions before starting the SDK.
|
|
615
|
+
|
|
616
|
+
</details>
|
|
617
|
+
<details>
|
|
618
|
+
<summary>FOREGROUND_SERVICE permission crash</summary>
|
|
619
|
+
|
|
620
|
+
**Cause:** Missing permission for Android 14+.
|
|
621
|
+
|
|
622
|
+
**Fix:** Add to AndroidManifest.xml:
|
|
623
|
+
```xml
|
|
624
|
+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
|
|
625
|
+
```
|
|
206
626
|
|
|
207
|
-
|
|
627
|
+
**Bluetooth denied in background**
|
|
208
628
|
|
|
209
|
-
|
|
210
|
-
- SDK runs only while the app is in the foreground.
|
|
211
|
-
- No persistent background service.
|
|
212
|
-
- Lower battery usage and simpler integration.
|
|
213
|
-
- Good for development, demos, or foreground-only use cases.
|
|
629
|
+
**Cause:** Android restricts BLE in background without foreground service.
|
|
214
630
|
|
|
215
|
-
|
|
216
|
-
- SDK runs continuously in a foreground service, even when the app is backgrounded.
|
|
217
|
-
- Enables always-on mesh networking and better reachability.
|
|
218
|
-
- Higher battery consumption; best for critical connectivity scenarios.
|
|
631
|
+
**Fix:** Use BACKGROUND/HYBRID mode + service setup.
|
|
219
632
|
|
|
220
|
-
|
|
221
|
-
- Runs in the foreground while the app is active.
|
|
222
|
-
- Automatically switches to background mode when the app is backgrounded.
|
|
223
|
-
- Automatically resumes foreground mode when the app becomes active again.
|
|
224
|
-
- Smart balance between connectivity and battery for the best user experience.
|
|
633
|
+
</details>
|
|
225
634
|
|
|
226
|
-
|
|
635
|
+
***
|
|
227
636
|
|
|
228
637
|
## Multi-platform support
|
|
229
638
|
|
|
@@ -232,7 +641,7 @@ Bridgefy SDKs interoperate across platforms so iOS and Android devices can commu
|
|
|
232
641
|
- [Bridgefy iOS](https://github.com/bridgefy/sdk-ios)
|
|
233
642
|
- [Bridgefy Android](https://github.com/bridgefy/sdk-android)
|
|
234
643
|
|
|
235
|
-
|
|
644
|
+
***
|
|
236
645
|
|
|
237
646
|
## Contact & support
|
|
238
647
|
|
|
@@ -241,6 +650,6 @@ For commercial inquiries, technical questions, or integration help, reach out us
|
|
|
241
650
|
- Email: [contact@bridgefy.me](mailto:contact@bridgefy.me)
|
|
242
651
|
- Website: [https://bridgefy.me/sdk](https://bridgefy.me/sdk)
|
|
243
652
|
|
|
244
|
-
|
|
653
|
+
***
|
|
245
654
|
|
|
246
655
|
© 2026 Bridgefy Inc. All rights reserved.
|
package/android/build.gradle
CHANGED
|
@@ -29,6 +29,7 @@ import me.bridgefy.plugin.react_native.util.OperationMode
|
|
|
29
29
|
import me.bridgefy.plugin.react_native.util.Utils.bundleFromTransmissionMode
|
|
30
30
|
import me.bridgefy.plugin.react_native.util.Utils.mapFromTransmissionMode
|
|
31
31
|
import me.bridgefy.plugin.react_native.util.Utils.transmissionModeFromBundle
|
|
32
|
+
import java.util.Date
|
|
32
33
|
import java.util.UUID
|
|
33
34
|
|
|
34
35
|
@ReactModule(name = NativeBridgefySpec.NAME)
|
|
@@ -380,9 +381,9 @@ class BridgefyReactNativeModule(
|
|
|
380
381
|
modeManager.setOperationMode(mode)
|
|
381
382
|
|
|
382
383
|
// Start service if needed
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
384
|
+
if (modeManager.shouldRunInService()) {
|
|
385
|
+
startService()
|
|
386
|
+
}
|
|
386
387
|
|
|
387
388
|
val initIntent =
|
|
388
389
|
Intent(context, BridgefyService::class.java).apply {
|
|
@@ -630,11 +631,30 @@ class BridgefyReactNativeModule(
|
|
|
630
631
|
}
|
|
631
632
|
|
|
632
633
|
override fun licenseExpirationDate(promise: Promise) {
|
|
633
|
-
|
|
634
|
+
runCatching {
|
|
635
|
+
val exp =
|
|
636
|
+
serviceManager
|
|
637
|
+
.getBridgefy()
|
|
638
|
+
?.licenseExpirationDate()
|
|
639
|
+
?.getOrThrow()
|
|
640
|
+
?.time ?: 0L
|
|
641
|
+
Arguments.createMap().apply {
|
|
642
|
+
putDouble("expirationDate", exp.toDouble())
|
|
643
|
+
putBoolean("isValid", exp > System.currentTimeMillis())
|
|
644
|
+
}
|
|
645
|
+
}.fold(
|
|
646
|
+
onSuccess = { promise.resolve(it) },
|
|
647
|
+
onFailure = {
|
|
648
|
+
promise.reject("LICENSE_ERROR", it.message)
|
|
649
|
+
},
|
|
650
|
+
)
|
|
634
651
|
}
|
|
635
652
|
|
|
636
653
|
override fun updateLicense(promise: Promise) {
|
|
637
|
-
promise.reject(
|
|
654
|
+
promise.reject(
|
|
655
|
+
"LICENSE_UPDATE_FAILED",
|
|
656
|
+
"The updateLicense method has been deprecated and will be removed in a future release."
|
|
657
|
+
)
|
|
638
658
|
}
|
|
639
659
|
|
|
640
660
|
override fun isInitialized(promise: Promise) {
|
package/android/src/main/java/me/bridgefy/plugin/react_native/util/BridgefyOperationModeManager.kt
CHANGED
|
@@ -97,7 +97,7 @@ class BridgefyOperationModeManager private constructor(
|
|
|
97
97
|
fun shouldRunInService(): Boolean =
|
|
98
98
|
when (currentOperationMode) {
|
|
99
99
|
OperationMode.BACKGROUND -> true
|
|
100
|
-
OperationMode.HYBRID -> currentActiveMode == OperationMode.
|
|
100
|
+
OperationMode.HYBRID -> currentActiveMode == OperationMode.FOREGROUND
|
|
101
101
|
OperationMode.FOREGROUND -> false
|
|
102
102
|
}
|
|
103
103
|
|
|
@@ -481,7 +481,7 @@ class BridgefyReactNative: RCTEventEmitter, BridgefyDelegate {
|
|
|
481
481
|
}
|
|
482
482
|
let info: ErrorInfo
|
|
483
483
|
switch bridgefyError {
|
|
484
|
-
case .licenseError(let code,
|
|
484
|
+
case .licenseError(let code, _): info = .init(type: "licenseError", details: code)
|
|
485
485
|
case .storageError(let code): info = .init(type: "storageError", details: code)
|
|
486
486
|
case .encodingError(let code): info = .init(type: "encodingError", details: code)
|
|
487
487
|
case .encryptionError(let code): info = .init(type: "encryptionError", details: code)
|
|
@@ -47,9 +47,6 @@ export let BridgefyEvents = /*#__PURE__*/function (BridgefyEvents) {
|
|
|
47
47
|
BridgefyEvents["BRIDGEFY_DID_FAIL_SENDING_MESSAGE"] = "bridgefyDidFailSendingMessage";
|
|
48
48
|
BridgefyEvents["BRIDGEFY_DID_RECEIVE_DATA"] = "bridgefyDidReceiveData";
|
|
49
49
|
BridgefyEvents["BRIDGEFY_MESSAGE_RECEIVED"] = "bridgefyMessageReceived";
|
|
50
|
-
// License Events
|
|
51
|
-
BridgefyEvents["BRIDGEFY_DID_UPDATE_LICENSE"] = "bridgefyDidUpdateLicense";
|
|
52
|
-
BridgefyEvents["BRIDGEFY_DID_FAIL_TO_UPDATE_LICENSE"] = "bridgefyDidFailToUpdateLicense";
|
|
53
50
|
return BridgefyEvents;
|
|
54
51
|
}({});
|
|
55
52
|
export let BridgefyErrorCode = /*#__PURE__*/function (BridgefyErrorCode) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["TurboModuleRegistry","BridgefyPropagationProfile","BridgefyTransmissionModeType","BridgefyEvents","BridgefyErrorCode","BridgefyOperationMode","getEnforcing"],"sourceRoot":"../../src","sources":["NativeBridgefy.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,mBAAmB,QAAQ,cAAc;;AAElD;;AAEA,WAAYC,0BAA0B,0BAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAAA,OAA1BA,0BAA0B;AAAA;AAStC,WAAYC,4BAA4B,0BAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4BAA4B;EAAA,OAA5BA,4BAA4B;AAAA;AAMxC,WAAYC,cAAc,0BAAdA,cAAc;EACxB;EADUA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EASxB;EATUA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAgBxB;EAhBUA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;
|
|
1
|
+
{"version":3,"names":["TurboModuleRegistry","BridgefyPropagationProfile","BridgefyTransmissionModeType","BridgefyEvents","BridgefyErrorCode","BridgefyOperationMode","getEnforcing"],"sourceRoot":"../../src","sources":["NativeBridgefy.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,mBAAmB,QAAQ,cAAc;;AAElD;;AAEA,WAAYC,0BAA0B,0BAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BA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
|
package/lib/module/index.js
CHANGED
|
@@ -124,7 +124,7 @@ export class Bridgefy {
|
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
/**
|
|
127
|
-
*
|
|
127
|
+
* @deprecated since version 2.0
|
|
128
128
|
*/
|
|
129
129
|
async updateLicense() {
|
|
130
130
|
return BridgefyReactNative.updateLicense();
|
|
@@ -226,12 +226,6 @@ export class Bridgefy {
|
|
|
226
226
|
onFailToEstablishSecureConnection(listener) {
|
|
227
227
|
return this.addEventListener(BridgefyEvents.BRIDGEFY_DID_FAIL_TO_ESTABLISH_SECURE_CONNECTION, listener);
|
|
228
228
|
}
|
|
229
|
-
onUpdateLicense(listener) {
|
|
230
|
-
return this.addEventListener(BridgefyEvents.BRIDGEFY_DID_UPDATE_LICENSE, listener);
|
|
231
|
-
}
|
|
232
|
-
onFailToUpdateLicense(listener) {
|
|
233
|
-
return this.addEventListener(BridgefyEvents.BRIDGEFY_DID_FAIL_TO_UPDATE_LICENSE, listener);
|
|
234
|
-
}
|
|
235
229
|
}
|
|
236
230
|
|
|
237
231
|
// Export default instance for convenience
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NativeEventEmitter","NativeModules","BridgefyReactNative","BridgefyPropagationProfile","BridgefyTransmissionModeType","BridgefyEvents","BridgefyErrorCode","BridgefyOperationMode","Bridgefy","constructor","module","eventEmitter","initialize","apiKey","verboseLogging","operationMode","config","start","userId","propagationProfile","REALTIME","stop","destroySession","send","data","transmissionMode","sendBroadcast","currentUserId","type","BROADCAST","uuid","sendP2P","recipientId","P2P","sendMesh","MESH","establishSecureConnection","connectedPeers","licenseExpirationDate","updateLicense","isInitialized","isStarted","setOperationMode","getOperationMode","switchToBackground","switchToForeground","getOperationStatus","addEventListener","eventName","listener","subscription","addListener","remove","removeAllListeners","Object","values","forEach","event","onStart","BRIDGEFY_DID_START","onStop","BRIDGEFY_DID_STOP","onFailToStart","BRIDGEFY_DID_FAIL_TO_START","onFailToStop","BRIDGEFY_DID_FAIL_TO_STOP","onConnect","BRIDGEFY_DID_CONNECT","onConnectedPeers","BRIDGEFY_DID_UPDATE_CONNECTED_PEERS","onDisconnect","BRIDGEFY_DID_DISCONNECT","onSendMessage","BRIDGEFY_DID_SEND_MESSAGE","onSendDataProgress","BRIDGEFY_DID_SEND_DATA_PROGRESS","onFailSendingMessage","BRIDGEFY_DID_FAIL_SENDING_MESSAGE","onReceiveData","BRIDGEFY_DID_RECEIVE_DATA","onEstablishSecureConnection","BRIDGEFY_DID_ESTABLISH_SECURE_CONNECTION","onFailToEstablishSecureConnection","BRIDGEFY_DID_FAIL_TO_ESTABLISH_SECURE_CONNECTION"
|
|
1
|
+
{"version":3,"names":["NativeEventEmitter","NativeModules","BridgefyReactNative","BridgefyPropagationProfile","BridgefyTransmissionModeType","BridgefyEvents","BridgefyErrorCode","BridgefyOperationMode","Bridgefy","constructor","module","eventEmitter","initialize","apiKey","verboseLogging","operationMode","config","start","userId","propagationProfile","REALTIME","stop","destroySession","send","data","transmissionMode","sendBroadcast","currentUserId","type","BROADCAST","uuid","sendP2P","recipientId","P2P","sendMesh","MESH","establishSecureConnection","connectedPeers","licenseExpirationDate","updateLicense","isInitialized","isStarted","setOperationMode","getOperationMode","switchToBackground","switchToForeground","getOperationStatus","addEventListener","eventName","listener","subscription","addListener","remove","removeAllListeners","Object","values","forEach","event","onStart","BRIDGEFY_DID_START","onStop","BRIDGEFY_DID_STOP","onFailToStart","BRIDGEFY_DID_FAIL_TO_START","onFailToStop","BRIDGEFY_DID_FAIL_TO_STOP","onConnect","BRIDGEFY_DID_CONNECT","onConnectedPeers","BRIDGEFY_DID_UPDATE_CONNECTED_PEERS","onDisconnect","BRIDGEFY_DID_DISCONNECT","onSendMessage","BRIDGEFY_DID_SEND_MESSAGE","onSendDataProgress","BRIDGEFY_DID_SEND_DATA_PROGRESS","onFailSendingMessage","BRIDGEFY_DID_FAIL_SENDING_MESSAGE","onReceiveData","BRIDGEFY_DID_RECEIVE_DATA","onEstablishSecureConnection","BRIDGEFY_DID_ESTABLISH_SECURE_CONNECTION","onFailToEstablishSecureConnection","BRIDGEFY_DID_FAIL_TO_ESTABLISH_SECURE_CONNECTION"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAQ,cAAc;AAChE,OAAOC,mBAAmB,IACxBC,0BAA0B,EAC1BC,4BAA4B,EAC5BC,cAAc,EACdC,iBAAiB,EACjBC,qBAAqB,QAgBhB,qBAAkB;;AAEzB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SACEJ,0BAA0B,EAC1BC,4BAA4B,EAC5BC,cAAc,EACdC,iBAAiB,EACjBC,qBAAqB;;AAkBvB;AACA;AACA;AACA;AACA,OAAO,MAAMC,QAAQ,CAAC;EAGpBC,WAAWA,CAAA,EAAG;IACZ;IACA,MAAMC,MAAM,GAAGR,mBAAmB,IAAID,aAAa,CAACC,mBAAmB;IACvE,IAAI,CAACS,YAAY,GAAG,IAAIX,kBAAkB,CAACU,MAAM,CAAC;EACpD;;EAEA;AACF;AACA;EACE,MAAME,UAAUA,CACdC,MAAc,EACdC,cAAuB,GAAG,KAAK,EAC/BC,aAAqC,EACtB;IACf,MAAMC,MAA0B,GAAG;MACjCH,MAAM;MACNC,cAAc;MACdC;IACF,CAAC;IACD,OAAOb,mBAAmB,CAACU,UAAU,CAACI,MAAM,CAAC;EAC/C;;EAEA;AACF;AACA;EACE,MAAMC,KAAKA,CACTC,MAAe,EACfC,kBAA8C,GAAGhB,0BAA0B,CAACiB,QAAQ,EACrE;IACf,OAAOlB,mBAAmB,CAACe,KAAK,CAACC,MAAM,EAAEC,kBAAkB,CAAC;EAC9D;;EAEA;AACF;AACA;EACE,MAAME,IAAIA,CAAA,EAAkB;IAC1B,OAAOnB,mBAAmB,CAACmB,IAAI,CAAC,CAAC;EACnC;;EAEA;AACF;AACA;EACE,MAAMC,cAAcA,CAAA,EAAkB;IACpC,OAA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B,QAAsD,EAAE;IACzE,OAAO,IAAI,CAACF,gBAAgB,CAC1B1C,cAAc,CAACsE,+BAA+B,EAC9C1B,QACF,CAAC;EACH;EAEA2B,oBAAoBA,CAClB3B,QAAgE,EAChE;IACA,OAAO,IAAI,CAACF,gBAAgB,CAC1B1C,cAAc,CAACwE,iCAAiC,EAChD5B,QACF,CAAC;EACH;EAEA6B,aAAaA,CAAC7B,QAAmD,EAAE;IACjE,OAAO,IAAI,CAACF,gBAAgB,CAC1B1C,cAAc,CAAC0E,yBAAyB,EACxC9B,QACF,CAAC;EACH;EAEA+B,2BAA2BA,CACzB/B,QAAwD,EACxD;IACA,OAAO,IAAI,CAACF,gBAAgB,CAC1B1C,cAAc,CAAC4E,wCAAwC,EACvDhC,QACF,CAAC;EACH;EAEAiC,iCAAiCA,CAC/BjC,QAA6D,EAC7D;IACA,OAAO,IAAI,CAACF,gBAAgB,CAC1B1C,cAAc,CAAC8E,gDAAgD,EAC/DlC,QACF,CAAC;EACH;AACF;;AAEA;AACA,eAAe,IAAIzC,QAAQ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -35,9 +35,7 @@ export declare enum BridgefyEvents {
|
|
|
35
35
|
BRIDGEFY_DID_SEND_DATA_PROGRESS = "bridgefyDidSendDataProgress",
|
|
36
36
|
BRIDGEFY_DID_FAIL_SENDING_MESSAGE = "bridgefyDidFailSendingMessage",
|
|
37
37
|
BRIDGEFY_DID_RECEIVE_DATA = "bridgefyDidReceiveData",
|
|
38
|
-
BRIDGEFY_MESSAGE_RECEIVED = "bridgefyMessageReceived"
|
|
39
|
-
BRIDGEFY_DID_UPDATE_LICENSE = "bridgefyDidUpdateLicense",
|
|
40
|
-
BRIDGEFY_DID_FAIL_TO_UPDATE_LICENSE = "bridgefyDidFailToUpdateLicense"
|
|
38
|
+
BRIDGEFY_MESSAGE_RECEIVED = "bridgefyMessageReceived"
|
|
41
39
|
}
|
|
42
40
|
export declare enum BridgefyErrorCode {
|
|
43
41
|
INVALID_API_KEY = "INVALID_API_KEY",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeBridgefy.d.ts","sourceRoot":"","sources":["../../../src/NativeBridgefy.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAKhD,oBAAY,0BAA0B;IACpC,QAAQ,aAAa;IACrB,oBAAoB,uBAAuB;IAC3C,cAAc,kBAAkB;IAChC,UAAU,cAAc;IACxB,WAAW,eAAe;IAC1B,QAAQ,aAAa;CACtB;AAED,oBAAY,4BAA4B;IACtC,SAAS,cAAc;IACvB,GAAG,QAAQ;IACX,IAAI,SAAS;CACd;AAED,oBAAY,cAAc;IAExB,kBAAkB,qBAAqB;IACvC,iBAAiB,oBAAoB;IACrC,0BAA0B,2BAA2B;IACrD,yBAAyB,0BAA0B;IACnD,4BAA4B,8BAA8B;IAC1D,oCAAoC,oCAAoC;IAGxE,oBAAoB,uBAAuB;IAC3C,mCAAmC,oCAAoC;IACvE,uBAAuB,0BAA0B;IACjD,wCAAwC,yCAAyC;IACjF,gDAAgD,+CAA+C;IAG/F,yBAAyB,2BAA2B;IACpD,+BAA+B,gCAAgC;IAC/D,iCAAiC,kCAAkC;IACnE,yBAAyB,2BAA2B;IACpD,yBAAyB,4BAA4B;
|
|
1
|
+
{"version":3,"file":"NativeBridgefy.d.ts","sourceRoot":"","sources":["../../../src/NativeBridgefy.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAKhD,oBAAY,0BAA0B;IACpC,QAAQ,aAAa;IACrB,oBAAoB,uBAAuB;IAC3C,cAAc,kBAAkB;IAChC,UAAU,cAAc;IACxB,WAAW,eAAe;IAC1B,QAAQ,aAAa;CACtB;AAED,oBAAY,4BAA4B;IACtC,SAAS,cAAc;IACvB,GAAG,QAAQ;IACX,IAAI,SAAS;CACd;AAED,oBAAY,cAA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C,OAAO,CAAC,CAAC;IAElC;;;OAGG;IACH,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAE9B;;;OAGG;IACH,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAErC;;;OAGG;IACH,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAErC,gBAAgB,CACd,MAAM,EAAE,2BAA2B,GAClC,OAAO,CAAC,2BAA2B,CAAC,CAAC;IACxC,gBAAgB,IAAI,OAAO,CAAC,2BAA2B,CAAC,CAAC;IACzD,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,kBAAkB,IAAI,OAAO,CAAC,2BAA2B,CAAC,CAAC;CAC5D;;AAED,wBAA6E"}
|
|
@@ -62,7 +62,7 @@ export declare class Bridgefy {
|
|
|
62
62
|
*/
|
|
63
63
|
licenseExpirationDate(): Promise<BridgefyLicenseInfo>;
|
|
64
64
|
/**
|
|
65
|
-
*
|
|
65
|
+
* @deprecated since version 2.0
|
|
66
66
|
*/
|
|
67
67
|
updateLicense(): Promise<void>;
|
|
68
68
|
/**
|
|
@@ -134,12 +134,6 @@ export declare class Bridgefy {
|
|
|
134
134
|
}) => void): {
|
|
135
135
|
remove: () => void;
|
|
136
136
|
};
|
|
137
|
-
onUpdateLicense(listener: () => void): {
|
|
138
|
-
remove: () => void;
|
|
139
|
-
};
|
|
140
|
-
onFailToUpdateLicense(listener: (error: BridgefyError) => void): {
|
|
141
|
-
remove: () => void;
|
|
142
|
-
};
|
|
143
137
|
}
|
|
144
138
|
declare const _default: Bridgefy;
|
|
145
139
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AACA,OAA4B,EAC1B,0BAA0B,EAC1B,4BAA4B,EAC5B,cAAc,EACd,iBAAiB,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AAE,KAAK,IAAI;gBAhFrD,MAAM,IAAI;;IAwFvB,aAAa,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,wBAAwB,KAAK,IAAI;gBAxFpD,MAAM,IAAI;;IA+FvB,2BAA2B,CACzB,QAAQ,EAAE,CAAC,KAAK,EAAE,6BAA6B,KAAK,IAAI;gBAhG7C,MAAM,IAAI;;IAwGvB,iCAAiC,CAC/B,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,GAAG;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI;gBAzGlD,MAAM,IAAI;;CAgHxB;;AAGD,wBAA8B"}
|
package/package.json
CHANGED
package/src/NativeBridgefy.ts
CHANGED
|
@@ -48,10 +48,6 @@ export enum BridgefyEvents {
|
|
|
48
48
|
BRIDGEFY_DID_FAIL_SENDING_MESSAGE = 'bridgefyDidFailSendingMessage',
|
|
49
49
|
BRIDGEFY_DID_RECEIVE_DATA = 'bridgefyDidReceiveData',
|
|
50
50
|
BRIDGEFY_MESSAGE_RECEIVED = 'bridgefyMessageReceived',
|
|
51
|
-
|
|
52
|
-
// License Events
|
|
53
|
-
BRIDGEFY_DID_UPDATE_LICENSE = 'bridgefyDidUpdateLicense',
|
|
54
|
-
BRIDGEFY_DID_FAIL_TO_UPDATE_LICENSE = 'bridgefyDidFailToUpdateLicense',
|
|
55
51
|
}
|
|
56
52
|
|
|
57
53
|
export enum BridgefyErrorCode {
|
package/src/index.tsx
CHANGED
|
@@ -176,7 +176,7 @@ export class Bridgefy {
|
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
/**
|
|
179
|
-
*
|
|
179
|
+
* @deprecated since version 2.0
|
|
180
180
|
*/
|
|
181
181
|
async updateLicense(): Promise<void> {
|
|
182
182
|
return BridgefyReactNative.updateLicense();
|
|
@@ -332,20 +332,6 @@ export class Bridgefy {
|
|
|
332
332
|
listener
|
|
333
333
|
);
|
|
334
334
|
}
|
|
335
|
-
|
|
336
|
-
onUpdateLicense(listener: () => void) {
|
|
337
|
-
return this.addEventListener(
|
|
338
|
-
BridgefyEvents.BRIDGEFY_DID_UPDATE_LICENSE,
|
|
339
|
-
listener
|
|
340
|
-
);
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
onFailToUpdateLicense(listener: (error: BridgefyError) => void) {
|
|
344
|
-
return this.addEventListener(
|
|
345
|
-
BridgefyEvents.BRIDGEFY_DID_FAIL_TO_UPDATE_LICENSE,
|
|
346
|
-
listener
|
|
347
|
-
);
|
|
348
|
-
}
|
|
349
335
|
}
|
|
350
336
|
|
|
351
337
|
// Export default instance for convenience
|