react-native-flic2 2.0.0-beta.1 → 2.0.0-beta.10
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 +85 -22
- package/android/build.gradle +1 -1
- package/android/src/main/AndroidManifest.xml +23 -0
- package/android/src/main/java/nl/xguard/flic2/ActivityUtil.kt +29 -0
- package/android/src/main/java/{com → nl/xguard}/flic2/Flic2ButtonListener.kt +19 -3
- package/android/src/main/java/{com → nl/xguard}/flic2/Flic2Converter.kt +2 -3
- package/android/src/main/java/{com → nl/xguard}/flic2/Flic2Module.kt +96 -56
- package/android/src/main/java/{com → nl/xguard}/flic2/Flic2Package.kt +2 -1
- package/android/src/main/java/nl/xguard/flic2/Flic2Service.kt +274 -0
- package/ios/Flic2.mm +12 -12
- package/lib/module/NativeFlic2.js.map +1 -1
- package/lib/module/index.js +6 -14
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/NativeFlic2.d.ts +14 -49
- package/lib/typescript/src/NativeFlic2.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +17 -52
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +23 -23
- package/src/NativeFlic2.ts +30 -28
- package/src/index.ts +18 -40
- package/android/src/main/java/com/flic2/Flic2Service.kt +0 -112
- package/lib/module/index.bak.js +0 -161
- package/lib/module/index.bak.js.map +0 -1
- package/lib/typescript/src/index.bak.d.ts +0 -1
- package/lib/typescript/src/index.bak.d.ts.map +0 -1
- package/src/index.bak.tsx +0 -159
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
package nl.xguard.flic2
|
|
2
|
+
|
|
3
|
+
import android.app.Notification
|
|
4
|
+
import android.app.NotificationChannel
|
|
5
|
+
import android.app.NotificationManager
|
|
6
|
+
import android.app.PendingIntent
|
|
7
|
+
import android.app.Service
|
|
8
|
+
import android.content.BroadcastReceiver
|
|
9
|
+
import android.content.Context
|
|
10
|
+
import android.content.Intent
|
|
11
|
+
import android.content.pm.PackageManager
|
|
12
|
+
import android.os.Binder
|
|
13
|
+
import android.os.Build
|
|
14
|
+
import android.os.Handler
|
|
15
|
+
import android.os.IBinder
|
|
16
|
+
import android.os.Looper
|
|
17
|
+
import android.util.Log
|
|
18
|
+
import androidx.core.app.NotificationCompat
|
|
19
|
+
import io.flic.flic2libandroid.Flic2Manager
|
|
20
|
+
|
|
21
|
+
class Flic2Service : Service() {
|
|
22
|
+
|
|
23
|
+
private val binder = Flic2ServiceBinder()
|
|
24
|
+
private var manager: Flic2Manager? = null
|
|
25
|
+
private var isServiceStarted = false
|
|
26
|
+
private var notification: Notification? = null
|
|
27
|
+
|
|
28
|
+
companion object {
|
|
29
|
+
private const val TAG = "Flic2Service"
|
|
30
|
+
private const val DEFAULT_NOTIFICATION_ID = 123321
|
|
31
|
+
private const val DEFAULT_CHANNEL_ID = "Notification_Channel_Flic2Service"
|
|
32
|
+
|
|
33
|
+
// Metadata keys for notification configuration
|
|
34
|
+
private const val KEY_CHANNEL_NAME = "nl.xguard.flic2.notification_channel_name"
|
|
35
|
+
private const val KEY_CHANNEL_DESCRIPTION = "nl.xguard.flic2.notification_channel_description"
|
|
36
|
+
private const val NOTIFICATION_TITLE_KEY = "nl.xguard.flic2.notification_title"
|
|
37
|
+
private const val NOTIFICATION_TEXT_KEY = "nl.xguard.flic2.notification_text"
|
|
38
|
+
private const val NOTIFICATION_ICON_KEY = "nl.xguard.flic2.notification_icon"
|
|
39
|
+
private const val NOTIFICATION_ID_KEY = "nl.xguard.flic2.notification_id"
|
|
40
|
+
private const val CHANNEL_ID_KEY = "nl.xguard.flic2.notification_channel_id"
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
inner class Flic2ServiceBinder : Binder() {
|
|
44
|
+
fun getService(): Flic2Service = this@Flic2Service
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
override fun onCreate() {
|
|
48
|
+
super.onCreate()
|
|
49
|
+
Log.d(TAG, "Service onCreate")
|
|
50
|
+
|
|
51
|
+
try {
|
|
52
|
+
// Initialize Flic2Manager on main thread with Handler
|
|
53
|
+
// v1.1.0 API: init() returns void, must call getInstance() after
|
|
54
|
+
Flic2Manager.init(
|
|
55
|
+
applicationContext,
|
|
56
|
+
Handler(Looper.getMainLooper())
|
|
57
|
+
)
|
|
58
|
+
manager = Flic2Manager.getInstance()
|
|
59
|
+
Log.d(TAG, "Flic2Manager initialized successfully")
|
|
60
|
+
} catch (e: Exception) {
|
|
61
|
+
Log.e(TAG, "Failed to initialize Flic2Manager", e)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Create notification channel and notification in onCreate
|
|
65
|
+
createNotificationChannel()
|
|
66
|
+
notification = createNotification()
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
|
70
|
+
Log.d(TAG, "Service onStartCommand")
|
|
71
|
+
|
|
72
|
+
if (intent != null) {
|
|
73
|
+
if (Intent.ACTION_BOOT_COMPLETED == intent.action) {
|
|
74
|
+
Log.d(TAG, "onStartCommand: ACTION_BOOT_COMPLETED")
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Start foreground service if notification is ready
|
|
79
|
+
if (notification != null) {
|
|
80
|
+
startForegroundService()
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return START_STICKY
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
override fun onBind(intent: Intent?): IBinder {
|
|
87
|
+
Log.d(TAG, "Service onBind")
|
|
88
|
+
return binder
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
override fun onDestroy() {
|
|
92
|
+
Log.d(TAG, "Service onDestroy")
|
|
93
|
+
super.onDestroy()
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
fun getManager(): Flic2Manager? = manager
|
|
97
|
+
|
|
98
|
+
fun isManagerInitialized(): Boolean = manager != null
|
|
99
|
+
|
|
100
|
+
fun startForegroundService() {
|
|
101
|
+
if (!isServiceStarted && notification != null) {
|
|
102
|
+
isServiceStarted = true
|
|
103
|
+
try {
|
|
104
|
+
startForeground(getNotificationId(), notification)
|
|
105
|
+
} catch (e: Exception) {
|
|
106
|
+
Log.w(TAG, "startForegroundService() exception", e)
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
fun stopForegroundService() {
|
|
112
|
+
if (isServiceStarted) {
|
|
113
|
+
isServiceStarted = false
|
|
114
|
+
stopForeground(true)
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
private fun createNotificationChannel() {
|
|
119
|
+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
|
120
|
+
val channel = NotificationChannel(
|
|
121
|
+
getChannelId(),
|
|
122
|
+
getChannelName(),
|
|
123
|
+
NotificationManager.IMPORTANCE_LOW
|
|
124
|
+
).apply {
|
|
125
|
+
description = getChannelDescription()
|
|
126
|
+
setShowBadge(false)
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
getSystemService(NotificationManager::class.java).createNotificationChannel(channel)
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
private fun createNotification(): Notification {
|
|
134
|
+
val notificationIntent = Intent(this, Flic2Service::class.java)
|
|
135
|
+
val pendingIntent = PendingIntent.getActivity(
|
|
136
|
+
this,
|
|
137
|
+
0,
|
|
138
|
+
notificationIntent,
|
|
139
|
+
PendingIntent.FLAG_IMMUTABLE
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
return NotificationCompat.Builder(this, getChannelId())
|
|
143
|
+
.setContentTitle(getNotificationTitle())
|
|
144
|
+
.setContentText(getNotificationText())
|
|
145
|
+
.setSmallIcon(getNotificationIcon())
|
|
146
|
+
.setContentIntent(pendingIntent)
|
|
147
|
+
.setPriority(NotificationCompat.PRIORITY_LOW)
|
|
148
|
+
.setOngoing(true)
|
|
149
|
+
.build()
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
private fun getNotificationId(): Int {
|
|
153
|
+
return try {
|
|
154
|
+
val metadata = applicationContext.packageManager
|
|
155
|
+
.getApplicationInfo(applicationContext.packageName, PackageManager.GET_META_DATA)
|
|
156
|
+
.metaData
|
|
157
|
+
metadata?.getInt(NOTIFICATION_ID_KEY, DEFAULT_NOTIFICATION_ID) ?: DEFAULT_NOTIFICATION_ID
|
|
158
|
+
} catch (e: PackageManager.NameNotFoundException) {
|
|
159
|
+
Log.w(TAG, "getNotificationId() NameNotFoundException", e)
|
|
160
|
+
DEFAULT_NOTIFICATION_ID
|
|
161
|
+
} catch (e: Exception) {
|
|
162
|
+
Log.w(TAG, "getNotificationId() exception", e)
|
|
163
|
+
DEFAULT_NOTIFICATION_ID
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
private fun getChannelId(): String {
|
|
168
|
+
return try {
|
|
169
|
+
val metadata = applicationContext.packageManager
|
|
170
|
+
.getApplicationInfo(applicationContext.packageName, PackageManager.GET_META_DATA)
|
|
171
|
+
.metaData
|
|
172
|
+
metadata?.getString(CHANNEL_ID_KEY) ?: DEFAULT_CHANNEL_ID
|
|
173
|
+
} catch (e: PackageManager.NameNotFoundException) {
|
|
174
|
+
Log.w(TAG, "getChannelId() NameNotFoundException", e)
|
|
175
|
+
DEFAULT_CHANNEL_ID
|
|
176
|
+
} catch (e: Exception) {
|
|
177
|
+
Log.w(TAG, "getChannelId() exception", e)
|
|
178
|
+
DEFAULT_CHANNEL_ID
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
private fun getChannelName(): String {
|
|
183
|
+
return try {
|
|
184
|
+
val metadata = applicationContext.packageManager
|
|
185
|
+
.getApplicationInfo(applicationContext.packageName, PackageManager.GET_META_DATA)
|
|
186
|
+
.metaData
|
|
187
|
+
metadata?.getString(KEY_CHANNEL_NAME) ?: "Flic2Channel"
|
|
188
|
+
} catch (e: PackageManager.NameNotFoundException) {
|
|
189
|
+
Log.w(TAG, "getChannelName() NameNotFoundException", e)
|
|
190
|
+
"Flic2Channel"
|
|
191
|
+
} catch (e: Exception) {
|
|
192
|
+
Log.w(TAG, "getChannelName() exception", e)
|
|
193
|
+
"Flic2Channel"
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
private fun getChannelDescription(): String {
|
|
198
|
+
return try {
|
|
199
|
+
val metadata = applicationContext.packageManager
|
|
200
|
+
.getApplicationInfo(applicationContext.packageName, PackageManager.GET_META_DATA)
|
|
201
|
+
.metaData
|
|
202
|
+
metadata?.getString(KEY_CHANNEL_DESCRIPTION) ?: "Flic2Channel"
|
|
203
|
+
} catch (e: PackageManager.NameNotFoundException) {
|
|
204
|
+
Log.w(TAG, "getChannelDescription() NameNotFoundException", e)
|
|
205
|
+
"Flic2Channel"
|
|
206
|
+
} catch (e: Exception) {
|
|
207
|
+
Log.w(TAG, "getChannelDescription() exception", e)
|
|
208
|
+
"Flic2Channel"
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
private fun getNotificationTitle(): String {
|
|
213
|
+
return try {
|
|
214
|
+
val metadata = applicationContext.packageManager
|
|
215
|
+
.getApplicationInfo(applicationContext.packageName, PackageManager.GET_META_DATA)
|
|
216
|
+
.metaData
|
|
217
|
+
metadata?.getString(NOTIFICATION_TITLE_KEY) ?: "Flic 2"
|
|
218
|
+
} catch (e: PackageManager.NameNotFoundException) {
|
|
219
|
+
Log.w(TAG, "getNotificationTitle() NameNotFoundException", e)
|
|
220
|
+
"Flic 2"
|
|
221
|
+
} catch (e: Exception) {
|
|
222
|
+
Log.w(TAG, "getNotificationTitle() exception", e)
|
|
223
|
+
"Flic 2"
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
private fun getNotificationText(): String {
|
|
228
|
+
return try {
|
|
229
|
+
val metadata = applicationContext.packageManager
|
|
230
|
+
.getApplicationInfo(applicationContext.packageName, PackageManager.GET_META_DATA)
|
|
231
|
+
.metaData
|
|
232
|
+
metadata?.getString(NOTIFICATION_TEXT_KEY) ?: "Flic 2 service is running"
|
|
233
|
+
} catch (e: PackageManager.NameNotFoundException) {
|
|
234
|
+
Log.w(TAG, "getNotificationText() NameNotFoundException", e)
|
|
235
|
+
"Flic 2 service is running"
|
|
236
|
+
} catch (e: Exception) {
|
|
237
|
+
Log.w(TAG, "getNotificationText() exception", e)
|
|
238
|
+
"Flic 2 service is running"
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
private fun getNotificationIcon(): Int {
|
|
243
|
+
return try {
|
|
244
|
+
val metadata = applicationContext.packageManager
|
|
245
|
+
.getApplicationInfo(applicationContext.packageName, PackageManager.GET_META_DATA)
|
|
246
|
+
.metaData
|
|
247
|
+
val icon = metadata?.getInt(NOTIFICATION_ICON_KEY, 0) ?: 0
|
|
248
|
+
if (icon != 0) icon else android.R.drawable.ic_dialog_info
|
|
249
|
+
} catch (e: PackageManager.NameNotFoundException) {
|
|
250
|
+
Log.w(TAG, "getNotificationIcon() NameNotFoundException", e)
|
|
251
|
+
android.R.drawable.ic_dialog_info
|
|
252
|
+
} catch (e: Exception) {
|
|
253
|
+
Log.w(TAG, "getNotificationIcon() exception", e)
|
|
254
|
+
android.R.drawable.ic_dialog_info
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
// BootUpReceiver for handling device boot
|
|
259
|
+
class BootUpReceiver : BroadcastReceiver() {
|
|
260
|
+
override fun onReceive(context: Context, intent: Intent) {
|
|
261
|
+
Log.d(TAG, "BootUpReceiver()")
|
|
262
|
+
// The Application class's onCreate has already been called at this point, which is what we want
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
// UpdateReceiver for handling app updates
|
|
267
|
+
class UpdateReceiver : BroadcastReceiver() {
|
|
268
|
+
override fun onReceive(context: Context, intent: Intent) {
|
|
269
|
+
Log.d(TAG, "UpdateReceiver()")
|
|
270
|
+
// The Application class's onCreate has already been called at this point, which is what we want
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
package/ios/Flic2.mm
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
FLICManager *manager = [FLICManager configureWithDelegate:self buttonDelegate:self background:background];
|
|
19
19
|
|
|
20
20
|
if (manager) {
|
|
21
|
-
resolve(
|
|
21
|
+
resolve(nil);
|
|
22
22
|
} else {
|
|
23
23
|
reject(@"INIT_ERROR", @"Failed to initialize FLICManager", nil);
|
|
24
24
|
}
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
}];
|
|
115
115
|
|
|
116
116
|
// Return immediately - scan results will come through events
|
|
117
|
-
resolve(
|
|
117
|
+
resolve(nil);
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
- (void)stopScan:(RCTPromiseResolveBlock)resolve
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
NSLog(@"Stopping scan");
|
|
129
129
|
[[FLICManager sharedManager] stopScan];
|
|
130
130
|
|
|
131
|
-
resolve(
|
|
131
|
+
resolve(nil);
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
- (void)forgetButton:(NSString *)uuid
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
if (error) {
|
|
155
155
|
reject(@"FORGET_ERROR", error.localizedDescription, error);
|
|
156
156
|
} else {
|
|
157
|
-
resolve(
|
|
157
|
+
resolve(nil);
|
|
158
158
|
}
|
|
159
159
|
}];
|
|
160
160
|
}
|
|
@@ -173,7 +173,7 @@
|
|
|
173
173
|
}
|
|
174
174
|
|
|
175
175
|
[button connect];
|
|
176
|
-
resolve(
|
|
176
|
+
resolve([self buttonToDictionary:button]);
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
- (void)disconnectButton:(NSString *)uuid
|
|
@@ -188,7 +188,7 @@
|
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
[button disconnect];
|
|
191
|
-
resolve(
|
|
191
|
+
resolve([self buttonToDictionary:button]);
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
- (void)setTriggerMode:(NSString *)uuid mode:(NSInteger)mode
|
|
@@ -203,7 +203,7 @@
|
|
|
203
203
|
}
|
|
204
204
|
|
|
205
205
|
button.triggerMode = (FLICButtonTriggerMode)mode;
|
|
206
|
-
resolve(
|
|
206
|
+
resolve([self buttonToDictionary:button]);
|
|
207
207
|
}
|
|
208
208
|
|
|
209
209
|
- (void)setLatencyMode:(NSString *)uuid mode:(NSInteger)mode
|
|
@@ -218,7 +218,7 @@
|
|
|
218
218
|
}
|
|
219
219
|
|
|
220
220
|
button.latencyMode = (FLICLatencyMode)mode;
|
|
221
|
-
resolve(
|
|
221
|
+
resolve([self buttonToDictionary:button]);
|
|
222
222
|
}
|
|
223
223
|
|
|
224
224
|
- (void)setNickname:(NSString *)uuid nickname:(NSString *)nickname
|
|
@@ -233,7 +233,7 @@
|
|
|
233
233
|
}
|
|
234
234
|
|
|
235
235
|
button.nickname = nickname;
|
|
236
|
-
resolve(
|
|
236
|
+
resolve([self buttonToDictionary:button]);
|
|
237
237
|
}
|
|
238
238
|
|
|
239
239
|
// MARK: - Helper Methods
|
|
@@ -254,7 +254,7 @@
|
|
|
254
254
|
[button connect];
|
|
255
255
|
}
|
|
256
256
|
|
|
257
|
-
resolve(
|
|
257
|
+
resolve(nil);
|
|
258
258
|
}
|
|
259
259
|
|
|
260
260
|
- (void)disconnectAllKnownButtons:(RCTPromiseResolveBlock)resolve
|
|
@@ -272,7 +272,7 @@
|
|
|
272
272
|
[button disconnect];
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
-
resolve(
|
|
275
|
+
resolve(nil);
|
|
276
276
|
}
|
|
277
277
|
|
|
278
278
|
- (void)forgetAllButtons:(RCTPromiseResolveBlock)resolve
|
|
@@ -292,7 +292,7 @@
|
|
|
292
292
|
}];
|
|
293
293
|
}
|
|
294
294
|
|
|
295
|
-
resolve(
|
|
295
|
+
resolve(nil);
|
|
296
296
|
}
|
|
297
297
|
|
|
298
298
|
- (void)isScanning:(RCTPromiseResolveBlock)resolve
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["TurboModuleRegistry","ScanResult","getEnforcing"],"sourceRoot":"../../src","sources":["NativeFlic2.ts"],"mappings":";;AAAA,SACEA,mBAAmB,QAGd,cAAc;;AAErB;;AASA,WAAYC,UAAU,0BAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA;;
|
|
1
|
+
{"version":3,"names":["TurboModuleRegistry","ScanResult","getEnforcing"],"sourceRoot":"../../src","sources":["NativeFlic2.ts"],"mappings":";;AAAA,SACEA,mBAAmB,QAGd,cAAc;;AAErB;;AASA,WAAYC,UAAU,0BAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA;;AA+DtB;;AAgDA;;AAKA;;AAwCA,eAAeD,mBAAmB,CAACE,YAAY,CAAO,OAAO,CAAC","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
|
@@ -11,10 +11,6 @@ class Flic2 {
|
|
|
11
11
|
* @version 2.0.0
|
|
12
12
|
*/
|
|
13
13
|
constructor() {
|
|
14
|
-
// generate a random session ID for the instance
|
|
15
|
-
this.sessionId = Math.random().toString(36).substring(2, 15);
|
|
16
|
-
console.log('Created new Flic2 instance with sessionId', this.sessionId);
|
|
17
|
-
|
|
18
14
|
// create event emitter
|
|
19
15
|
this.eventEmitter = new TypedEmitter();
|
|
20
16
|
|
|
@@ -37,12 +33,8 @@ class Flic2 {
|
|
|
37
33
|
}
|
|
38
34
|
|
|
39
35
|
// initialize the Flic2 manager in background
|
|
40
|
-
|
|
41
|
-
if (!result.success) {
|
|
42
|
-
throw new Error(result.message);
|
|
43
|
-
}
|
|
36
|
+
await NativeFlic2.initialize(true);
|
|
44
37
|
this.onInitialized();
|
|
45
|
-
return true;
|
|
46
38
|
}
|
|
47
39
|
|
|
48
40
|
/**
|
|
@@ -130,7 +122,7 @@ class Flic2 {
|
|
|
130
122
|
* Connect a button.
|
|
131
123
|
*
|
|
132
124
|
* @param uuid - The UUID of the button to connect.
|
|
133
|
-
* @returns A promise that resolves
|
|
125
|
+
* @returns A promise that resolves with the button when the connection is initiated.
|
|
134
126
|
*/
|
|
135
127
|
buttonConnect(uuid) {
|
|
136
128
|
return NativeFlic2.connectButton(uuid);
|
|
@@ -140,7 +132,7 @@ class Flic2 {
|
|
|
140
132
|
* Disconnect a button.
|
|
141
133
|
*
|
|
142
134
|
* @param uuid - The UUID of the button to disconnect.
|
|
143
|
-
* @returns A promise that resolves
|
|
135
|
+
* @returns A promise that resolves with the button when the disconnection is initiated.
|
|
144
136
|
*/
|
|
145
137
|
buttonDisconnect(uuid) {
|
|
146
138
|
return NativeFlic2.disconnectButton(uuid);
|
|
@@ -151,7 +143,7 @@ class Flic2 {
|
|
|
151
143
|
*
|
|
152
144
|
* @param uuid - The UUID of the button to set the trigger mode of.
|
|
153
145
|
* @param mode - The trigger mode to set.
|
|
154
|
-
* @returns A promise that resolves when the trigger mode is set.
|
|
146
|
+
* @returns A promise that resolves with the button when the trigger mode is set.
|
|
155
147
|
*/
|
|
156
148
|
buttonSetTriggerMode(uuid, mode) {
|
|
157
149
|
return NativeFlic2.setTriggerMode(uuid, mode);
|
|
@@ -162,7 +154,7 @@ class Flic2 {
|
|
|
162
154
|
*
|
|
163
155
|
* @param uuid - The UUID of the button to set the latency mode of.
|
|
164
156
|
* @param mode - The latency mode to set.
|
|
165
|
-
* @returns A promise that resolves when the latency mode is set.
|
|
157
|
+
* @returns A promise that resolves with the button when the latency mode is set.
|
|
166
158
|
*/
|
|
167
159
|
buttonSetLatencyMode(uuid, mode) {
|
|
168
160
|
return NativeFlic2.setLatencyMode(uuid, mode);
|
|
@@ -173,7 +165,7 @@ class Flic2 {
|
|
|
173
165
|
*
|
|
174
166
|
* @param uuid - The UUID of the button to set the nickname of.
|
|
175
167
|
* @param nickname - The nickname to set.
|
|
176
|
-
* @returns A promise that resolves when the nickname is set.
|
|
168
|
+
* @returns A promise that resolves with the button when the nickname is set.
|
|
177
169
|
*/
|
|
178
170
|
buttonSetNickname(uuid, nickname) {
|
|
179
171
|
return NativeFlic2.setNickname(uuid, nickname);
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["TypedEmitter","NativeFlic2","Flic2","isFlic2ManagerInitialized","constructor","
|
|
1
|
+
{"version":3,"names":["TypedEmitter","NativeFlic2","Flic2","isFlic2ManagerInitialized","constructor","eventEmitter","onButtonEvent","onNativeButtonEvent","bind","onManagerStateChange","onNativeManagerStateChange","onScanStatusChange","onNativeScanStatusChange","initialize","isInitialized","Error","onInitialized","startScan","scanForButtons","stopScan","connectAllKnownButtons","disconnectAllKnownButtons","forgetAllButtons","isScanning","forgetButton","uuid","buttonConnect","connectButton","buttonDisconnect","disconnectButton","buttonSetTriggerMode","mode","setTriggerMode","buttonSetLatencyMode","setLatencyMode","buttonSetNickname","nickname","setNickname","getButtons","getButton","buttons","button","find","item","getBatteryHealth","isBatteryVoltageOk","batteryVoltage","voltage","event","enrichedEvent","batteryVoltageOk","emit"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,4BAAyB;AACtD,OAAOC,WAAW,MAOX,kBAAe;AAEtB,MAAMC,KAAK,CAAC;EAEFC,yBAAyB,GAAY,KAAK;EAQlD;AACF;AACA;AACA;AACA;AACA;EACEC,WAAWA,CAAA,EAAG;IAEZ;IACA,IAAI,CAACC,YAAY,GAAG,IAAIL,YAAY,CAIjC,CAAC;;IAEJ;IACAC,WAAW,CAACK,aAAa,CAAC,IAAI,CAACC,mBAAmB,CAACC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC9DP,WAAW,CAACQ,oBAAoB,CAC9B,IAAI,CAACC,0BAA0B,CAACF,IAAI,CAAC,IAAI,CAC3C,CAAC;IAEDP,WAAW,CAACU,kBAAkB,CAAC,IAAI,CAACC,wBAAwB,CAACJ,IAAI,CAAC,IAAI,CAAC,CAAC;EAE1E;;EAEA;EACA;AACF;AACA;AACA;AACA;EACE,MAAaK,UAAUA,CAAA,EAAkB;IAEvC;I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|
result?: ScanResult;
|
|
37
37
|
};
|
|
38
|
+
export type ButtonEventName = 'discovered' | 'connected' | 'ready' | 'disconnected' | 'connectionFailed' | 'buttonDown' | 'buttonUp' | 'click' | 'doubleClick' | 'hold' | 'unpaired' | 'batteryUpdate' | 'nicknameUpdate';
|
|
38
39
|
export type ButtonEvent = {
|
|
39
40
|
uuid: string;
|
|
40
|
-
event:
|
|
41
|
+
event: ButtonEventName;
|
|
41
42
|
queued?: boolean;
|
|
42
43
|
age?: number;
|
|
43
44
|
nickname?: string;
|
|
@@ -79,56 +80,20 @@ export type FlicLatencyMode = 'normal' | 'low';
|
|
|
79
80
|
export type TriggerModeType = 0 | 1 | 2 | 3;
|
|
80
81
|
export type LatencyModeType = 0 | 1;
|
|
81
82
|
export interface Spec extends TurboModule {
|
|
82
|
-
initialize(background: boolean): Promise<
|
|
83
|
-
success: boolean;
|
|
84
|
-
message: string;
|
|
85
|
-
}>;
|
|
83
|
+
initialize(background: boolean): Promise<void>;
|
|
86
84
|
getButtons(): Promise<FlicButton[]>;
|
|
87
|
-
scanForButtons(): Promise<
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
message: string;
|
|
94
|
-
}>;
|
|
95
|
-
forgetButton(uuid: string): Promise<{
|
|
96
|
-
success: boolean;
|
|
97
|
-
message: string;
|
|
98
|
-
}>;
|
|
99
|
-
connectAllKnownButtons(): Promise<{
|
|
100
|
-
success: boolean;
|
|
101
|
-
message: string;
|
|
102
|
-
}>;
|
|
103
|
-
disconnectAllKnownButtons(): Promise<{
|
|
104
|
-
success: boolean;
|
|
105
|
-
message: string;
|
|
106
|
-
}>;
|
|
107
|
-
forgetAllButtons(): Promise<{
|
|
108
|
-
success: boolean;
|
|
109
|
-
message: string;
|
|
110
|
-
}>;
|
|
85
|
+
scanForButtons(): Promise<void>;
|
|
86
|
+
stopScan(): Promise<void>;
|
|
87
|
+
forgetButton(uuid: string): Promise<void>;
|
|
88
|
+
connectAllKnownButtons(): Promise<void>;
|
|
89
|
+
disconnectAllKnownButtons(): Promise<void>;
|
|
90
|
+
forgetAllButtons(): Promise<void>;
|
|
111
91
|
isScanning(): Promise<boolean>;
|
|
112
|
-
connectButton(uuid: string): Promise<
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
success: boolean;
|
|
118
|
-
message: string;
|
|
119
|
-
}>;
|
|
120
|
-
setTriggerMode(uuid: string, mode: TriggerModeType): Promise<{
|
|
121
|
-
success: boolean;
|
|
122
|
-
message: string;
|
|
123
|
-
}>;
|
|
124
|
-
setLatencyMode(uuid: string, mode: LatencyModeType): Promise<{
|
|
125
|
-
success: boolean;
|
|
126
|
-
message: string;
|
|
127
|
-
}>;
|
|
128
|
-
setNickname(uuid: string, nickname: string): Promise<{
|
|
129
|
-
success: boolean;
|
|
130
|
-
message: string;
|
|
131
|
-
}>;
|
|
92
|
+
connectButton(uuid: string): Promise<FlicButton>;
|
|
93
|
+
disconnectButton(uuid: string): Promise<FlicButton>;
|
|
94
|
+
setTriggerMode(uuid: string, mode: number): Promise<FlicButton>;
|
|
95
|
+
setLatencyMode(uuid: string, mode: number): Promise<FlicButton>;
|
|
96
|
+
setNickname(uuid: string, nickname: string): Promise<FlicButton>;
|
|
132
97
|
readonly onManagerStateChange: CodegenTypes.EventEmitter<ManagerStateChangeEvent>;
|
|
133
98
|
readonly onScanStatusChange: CodegenTypes.EventEmitter<ScanStatusChangeEvent>;
|
|
134
99
|
readonly onButtonEvent: CodegenTypes.EventEmitter<ButtonEvent>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeFlic2.d.ts","sourceRoot":"","sources":["../../../src/NativeFlic2.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,YAAY,EAClB,MAAM,cAAc,CAAC;AAItB,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,EAAE,UAAU,GAAG,cAAc,CA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