@capawesome/capacitor-pixlive 0.0.1

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 (80) hide show
  1. package/CapawesomeCapacitorPixlive.podspec +30 -0
  2. package/Package.swift +28 -0
  3. package/README.md +1012 -0
  4. package/android/build.gradle +64 -0
  5. package/android/src/main/AndroidManifest.xml +8 -0
  6. package/android/src/main/java/io/capawesome/capacitorjs/plugins/pixlive/Pixlive.java +704 -0
  7. package/android/src/main/java/io/capawesome/capacitorjs/plugins/pixlive/PixliveHelper.java +112 -0
  8. package/android/src/main/java/io/capawesome/capacitorjs/plugins/pixlive/PixlivePlugin.java +691 -0
  9. package/android/src/main/java/io/capawesome/capacitorjs/plugins/pixlive/TouchInterceptorView.java +94 -0
  10. package/android/src/main/java/io/capawesome/capacitorjs/plugins/pixlive/classes/CustomException.java +20 -0
  11. package/android/src/main/java/io/capawesome/capacitorjs/plugins/pixlive/classes/CustomExceptions.java +29 -0
  12. package/android/src/main/java/io/capawesome/capacitorjs/plugins/pixlive/classes/options/ActivateContextOptions.java +29 -0
  13. package/android/src/main/java/io/capawesome/capacitorjs/plugins/pixlive/classes/options/CreateARViewOptions.java +68 -0
  14. package/android/src/main/java/io/capawesome/capacitorjs/plugins/pixlive/classes/options/EnableContextsWithTagsOptions.java +30 -0
  15. package/android/src/main/java/io/capawesome/capacitorjs/plugins/pixlive/classes/options/GetContextOptions.java +29 -0
  16. package/android/src/main/java/io/capawesome/capacitorjs/plugins/pixlive/classes/options/GetGPSPointsInBoundingBoxOptions.java +68 -0
  17. package/android/src/main/java/io/capawesome/capacitorjs/plugins/pixlive/classes/options/GetNearbyGPSPointsOptions.java +40 -0
  18. package/android/src/main/java/io/capawesome/capacitorjs/plugins/pixlive/classes/options/ResizeARViewOptions.java +68 -0
  19. package/android/src/main/java/io/capawesome/capacitorjs/plugins/pixlive/classes/options/SetARViewTouchEnabledOptions.java +26 -0
  20. package/android/src/main/java/io/capawesome/capacitorjs/plugins/pixlive/classes/options/SetARViewTouchHoleOptions.java +68 -0
  21. package/android/src/main/java/io/capawesome/capacitorjs/plugins/pixlive/classes/options/SetInterfaceLanguageOptions.java +29 -0
  22. package/android/src/main/java/io/capawesome/capacitorjs/plugins/pixlive/classes/options/SetNotificationsSupportOptions.java +26 -0
  23. package/android/src/main/java/io/capawesome/capacitorjs/plugins/pixlive/classes/options/SynchronizeOptions.java +30 -0
  24. package/android/src/main/java/io/capawesome/capacitorjs/plugins/pixlive/classes/options/SynchronizeWithToursAndContextsOptions.java +66 -0
  25. package/android/src/main/java/io/capawesome/capacitorjs/plugins/pixlive/classes/options/UpdateTagMappingOptions.java +30 -0
  26. package/android/src/main/java/io/capawesome/capacitorjs/plugins/pixlive/classes/results/GetContextResult.java +23 -0
  27. package/android/src/main/java/io/capawesome/capacitorjs/plugins/pixlive/classes/results/GetContextsResult.java +24 -0
  28. package/android/src/main/java/io/capawesome/capacitorjs/plugins/pixlive/classes/results/GetGPSPointsInBoundingBoxResult.java +24 -0
  29. package/android/src/main/java/io/capawesome/capacitorjs/plugins/pixlive/classes/results/GetNearbyBeaconsResult.java +24 -0
  30. package/android/src/main/java/io/capawesome/capacitorjs/plugins/pixlive/classes/results/GetNearbyGPSPointsResult.java +24 -0
  31. package/android/src/main/java/io/capawesome/capacitorjs/plugins/pixlive/classes/results/GetVersionResult.java +24 -0
  32. package/android/src/main/java/io/capawesome/capacitorjs/plugins/pixlive/interfaces/Callback.java +5 -0
  33. package/android/src/main/java/io/capawesome/capacitorjs/plugins/pixlive/interfaces/EmptyCallback.java +5 -0
  34. package/android/src/main/java/io/capawesome/capacitorjs/plugins/pixlive/interfaces/NonEmptyCallback.java +7 -0
  35. package/android/src/main/java/io/capawesome/capacitorjs/plugins/pixlive/interfaces/NonEmptyResultCallback.java +7 -0
  36. package/android/src/main/java/io/capawesome/capacitorjs/plugins/pixlive/interfaces/Result.java +7 -0
  37. package/android/src/main/res/.gitkeep +0 -0
  38. package/dist/docs.json +2107 -0
  39. package/dist/esm/definitions.d.ts +825 -0
  40. package/dist/esm/definitions.js +2 -0
  41. package/dist/esm/definitions.js.map +1 -0
  42. package/dist/esm/index.d.ts +4 -0
  43. package/dist/esm/index.js +7 -0
  44. package/dist/esm/index.js.map +1 -0
  45. package/dist/esm/web.d.ts +31 -0
  46. package/dist/esm/web.js +85 -0
  47. package/dist/esm/web.js.map +1 -0
  48. package/dist/plugin.cjs.js +99 -0
  49. package/dist/plugin.cjs.js.map +1 -0
  50. package/dist/plugin.js +102 -0
  51. package/dist/plugin.js.map +1 -0
  52. package/ios/Plugin/CapacitorARViewController.swift +17 -0
  53. package/ios/Plugin/Classes/Options/ActivateContextOptions.swift +16 -0
  54. package/ios/Plugin/Classes/Options/CreateARViewOptions.swift +47 -0
  55. package/ios/Plugin/Classes/Options/EnableContextsWithTagsOptions.swift +16 -0
  56. package/ios/Plugin/Classes/Options/GetContextOptions.swift +16 -0
  57. package/ios/Plugin/Classes/Options/GetGPSPointsInBoundingBoxOptions.swift +43 -0
  58. package/ios/Plugin/Classes/Options/GetNearbyGPSPointsOptions.swift +25 -0
  59. package/ios/Plugin/Classes/Options/ResizeARViewOptions.swift +47 -0
  60. package/ios/Plugin/Classes/Options/SetARViewTouchEnabledOptions.swift +16 -0
  61. package/ios/Plugin/Classes/Options/SetARViewTouchHoleOptions.swift +43 -0
  62. package/ios/Plugin/Classes/Options/SetInterfaceLanguageOptions.swift +16 -0
  63. package/ios/Plugin/Classes/Options/SetNotificationsSupportOptions.swift +16 -0
  64. package/ios/Plugin/Classes/Options/SynchronizeOptions.swift +16 -0
  65. package/ios/Plugin/Classes/Options/SynchronizeWithToursAndContextsOptions.swift +34 -0
  66. package/ios/Plugin/Classes/Options/UpdateTagMappingOptions.swift +16 -0
  67. package/ios/Plugin/Classes/Results/GetContextResult.swift +16 -0
  68. package/ios/Plugin/Classes/Results/GetContextsResult.swift +16 -0
  69. package/ios/Plugin/Classes/Results/GetGPSPointsInBoundingBoxResult.swift +16 -0
  70. package/ios/Plugin/Classes/Results/GetNearbyBeaconsResult.swift +16 -0
  71. package/ios/Plugin/Classes/Results/GetNearbyGPSPointsResult.swift +16 -0
  72. package/ios/Plugin/Classes/Results/GetVersionResult.swift +16 -0
  73. package/ios/Plugin/Enums/CustomError.swift +86 -0
  74. package/ios/Plugin/Info.plist +24 -0
  75. package/ios/Plugin/Pixlive.swift +495 -0
  76. package/ios/Plugin/PixliveHelper.swift +91 -0
  77. package/ios/Plugin/PixlivePlugin.swift +503 -0
  78. package/ios/Plugin/Protocols/Result.swift +6 -0
  79. package/ios/Plugin/TouchForwarderView.swift +24 -0
  80. package/package.json +93 -0
package/README.md ADDED
@@ -0,0 +1,1012 @@
1
+ # @capawesome/capacitor-pixlive
2
+
3
+ Unofficial Capacitor plugin for [PixLive SDK](https://www.vidinoti.com/) by Vidinoti.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @capawesome/capacitor-pixlive
9
+ npx cap sync
10
+ ```
11
+
12
+ ### Android
13
+
14
+ #### SDK Setup
15
+
16
+ Copy the `vdarsdk-release.aar` file into your app's `android/app/libs/` directory.
17
+
18
+ ### iOS
19
+
20
+ Please note, that this plugin does not support SPM but only Cocoapods as iOS dependency manager.
21
+
22
+ #### SDK Setup
23
+
24
+ The PixLive iOS SDK (`VDARSDK.xcframework`) must be manually added by copying `VDARSDK.xcframework` into `ios/App/Frameworks/` in your Capacitor project.
25
+
26
+ ## Configuration
27
+
28
+ Configure the plugin in your `capacitor.config.ts`:
29
+
30
+ ```typescript
31
+ const config: CapacitorConfig = {
32
+ plugins: {
33
+ Pixlive: {
34
+ licenseKey: 'YOUR_LICENSE_KEY',
35
+ apiUrl: 'https://ar.vidinoti.com/api/api.php', // optional
36
+ sdkUrl: 'https://sdk.vidinoti.com', // optional
37
+ },
38
+ },
39
+ };
40
+ ```
41
+
42
+ | Prop | Type | Description | Default |
43
+ | ---------------- | ------------------- | -------------------------------- | ------------------------------------------ |
44
+ | **`licenseKey`** | <code>string</code> | The PixLive Maker license key. | |
45
+ | **`apiUrl`** | <code>string</code> | The PixLive Maker API endpoint. | `https://ar.vidinoti.com/api/api.php` |
46
+ | **`sdkUrl`** | <code>string</code> | The PixLive SDK resource server. | `https://sdk.vidinoti.com` |
47
+
48
+ ## Usage
49
+
50
+ ```typescript
51
+ import { Pixlive } from '@capawesome/capacitor-pixlive';
52
+
53
+ const synchronize = async () => {
54
+ await Pixlive.synchronize({ tags: [['my-tag']] });
55
+ };
56
+
57
+ const createARView = async () => {
58
+ await Pixlive.createARView({ x: 0, y: 0, width: 300, height: 400 });
59
+ };
60
+ ```
61
+
62
+ ## API
63
+
64
+ <docgen-index>
65
+
66
+ * [`initialize()`](#initialize)
67
+ * [`checkPermissions()`](#checkpermissions)
68
+ * [`requestPermissions(...)`](#requestpermissions)
69
+ * [`synchronize(...)`](#synchronize)
70
+ * [`synchronizeWithToursAndContexts(...)`](#synchronizewithtoursandcontexts)
71
+ * [`updateTagMapping(...)`](#updatetagmapping)
72
+ * [`enableContextsWithTags(...)`](#enablecontextswithtags)
73
+ * [`getContexts()`](#getcontexts)
74
+ * [`getContext(...)`](#getcontext)
75
+ * [`activateContext(...)`](#activatecontext)
76
+ * [`stopContext()`](#stopcontext)
77
+ * [`getNearbyGPSPoints(...)`](#getnearbygpspoints)
78
+ * [`getGPSPointsInBoundingBox(...)`](#getgpspointsinboundingbox)
79
+ * [`getNearbyBeacons()`](#getnearbybeacons)
80
+ * [`startNearbyGPSDetection()`](#startnearbygpsdetection)
81
+ * [`stopNearbyGPSDetection()`](#stopnearbygpsdetection)
82
+ * [`startGPSNotifications()`](#startgpsnotifications)
83
+ * [`stopGPSNotifications()`](#stopgpsnotifications)
84
+ * [`setNotificationsSupport(...)`](#setnotificationssupport)
85
+ * [`setInterfaceLanguage(...)`](#setinterfacelanguage)
86
+ * [`createARView(...)`](#createarview)
87
+ * [`destroyARView()`](#destroyarview)
88
+ * [`resizeARView(...)`](#resizearview)
89
+ * [`setARViewTouchEnabled(...)`](#setarviewtouchenabled)
90
+ * [`setARViewTouchHole(...)`](#setarviewtouchhole)
91
+ * [`getVersion()`](#getversion)
92
+ * [`addListener('codeRecognize', ...)`](#addlistenercoderecognize-)
93
+ * [`addListener('enterContext', ...)`](#addlistenerentercontext-)
94
+ * [`addListener('exitContext', ...)`](#addlistenerexitcontext-)
95
+ * [`addListener('presentAnnotations', ...)`](#addlistenerpresentannotations-)
96
+ * [`addListener('hideAnnotations', ...)`](#addlistenerhideannotations-)
97
+ * [`addListener('eventFromContent', ...)`](#addlistenereventfromcontent-)
98
+ * [`addListener('syncProgress', ...)`](#addlistenersyncprogress-)
99
+ * [`addListener('requireSync', ...)`](#addlistenerrequiresync-)
100
+ * [`removeAllListeners()`](#removealllisteners)
101
+ * [Interfaces](#interfaces)
102
+ * [Type Aliases](#type-aliases)
103
+
104
+ </docgen-index>
105
+
106
+ <docgen-api>
107
+ <!--Update the source file JSDoc comments and rerun docgen to update the docs below-->
108
+
109
+ ### initialize()
110
+
111
+ ```typescript
112
+ initialize() => Promise<void>
113
+ ```
114
+
115
+ Initialize the PixLive SDK.
116
+
117
+ This must be called before any other method.
118
+
119
+ Only available on Android and iOS.
120
+
121
+ **Since:** 8.0.0
122
+
123
+ --------------------
124
+
125
+
126
+ ### checkPermissions()
127
+
128
+ ```typescript
129
+ checkPermissions() => Promise<PermissionStatus>
130
+ ```
131
+
132
+ Check the status of permissions.
133
+
134
+ **Returns:** <code>Promise&lt;<a href="#permissionstatus">PermissionStatus</a>&gt;</code>
135
+
136
+ **Since:** 8.0.0
137
+
138
+ --------------------
139
+
140
+
141
+ ### requestPermissions(...)
142
+
143
+ ```typescript
144
+ requestPermissions(options?: PixlivePluginPermission | undefined) => Promise<PermissionStatus>
145
+ ```
146
+
147
+ Request permissions.
148
+
149
+ | Param | Type |
150
+ | ------------- | --------------------------------------------------------------------------- |
151
+ | **`options`** | <code><a href="#pixlivepluginpermission">PixlivePluginPermission</a></code> |
152
+
153
+ **Returns:** <code>Promise&lt;<a href="#permissionstatus">PermissionStatus</a>&gt;</code>
154
+
155
+ **Since:** 8.0.0
156
+
157
+ --------------------
158
+
159
+
160
+ ### synchronize(...)
161
+
162
+ ```typescript
163
+ synchronize(options: SynchronizeOptions) => Promise<void>
164
+ ```
165
+
166
+ Sync content from PixLive Maker filtered by tags.
167
+
168
+ Only available on Android and iOS.
169
+
170
+ | Param | Type |
171
+ | ------------- | ----------------------------------------------------------------- |
172
+ | **`options`** | <code><a href="#synchronizeoptions">SynchronizeOptions</a></code> |
173
+
174
+ **Since:** 8.0.0
175
+
176
+ --------------------
177
+
178
+
179
+ ### synchronizeWithToursAndContexts(...)
180
+
181
+ ```typescript
182
+ synchronizeWithToursAndContexts(options: SynchronizeWithToursAndContextsOptions) => Promise<void>
183
+ ```
184
+
185
+ Sync content filtered by tags, tour IDs, and context IDs.
186
+
187
+ Only available on Android and iOS.
188
+
189
+ | Param | Type |
190
+ | ------------- | --------------------------------------------------------------------------------------------------------- |
191
+ | **`options`** | <code><a href="#synchronizewithtoursandcontextsoptions">SynchronizeWithToursAndContextsOptions</a></code> |
192
+
193
+ **Since:** 8.0.0
194
+
195
+ --------------------
196
+
197
+
198
+ ### updateTagMapping(...)
199
+
200
+ ```typescript
201
+ updateTagMapping(options: UpdateTagMappingOptions) => Promise<void>
202
+ ```
203
+
204
+ Update tag-to-context mappings for language filtering.
205
+
206
+ Only available on Android and iOS.
207
+
208
+ | Param | Type |
209
+ | ------------- | --------------------------------------------------------------------------- |
210
+ | **`options`** | <code><a href="#updatetagmappingoptions">UpdateTagMappingOptions</a></code> |
211
+
212
+ **Since:** 8.0.0
213
+
214
+ --------------------
215
+
216
+
217
+ ### enableContextsWithTags(...)
218
+
219
+ ```typescript
220
+ enableContextsWithTags(options: EnableContextsWithTagsOptions) => Promise<void>
221
+ ```
222
+
223
+ Enable only contexts matching specific tags.
224
+
225
+ Only available on Android and iOS.
226
+
227
+ | Param | Type |
228
+ | ------------- | --------------------------------------------------------------------------------------- |
229
+ | **`options`** | <code><a href="#enablecontextswithtagsoptions">EnableContextsWithTagsOptions</a></code> |
230
+
231
+ **Since:** 8.0.0
232
+
233
+ --------------------
234
+
235
+
236
+ ### getContexts()
237
+
238
+ ```typescript
239
+ getContexts() => Promise<GetContextsResult>
240
+ ```
241
+
242
+ Get all synchronized contexts.
243
+
244
+ Only available on Android and iOS.
245
+
246
+ **Returns:** <code>Promise&lt;<a href="#getcontextsresult">GetContextsResult</a>&gt;</code>
247
+
248
+ **Since:** 8.0.0
249
+
250
+ --------------------
251
+
252
+
253
+ ### getContext(...)
254
+
255
+ ```typescript
256
+ getContext(options: GetContextOptions) => Promise<GetContextResult>
257
+ ```
258
+
259
+ Get a single context by ID.
260
+
261
+ Only available on Android and iOS.
262
+
263
+ | Param | Type |
264
+ | ------------- | --------------------------------------------------------------- |
265
+ | **`options`** | <code><a href="#getcontextoptions">GetContextOptions</a></code> |
266
+
267
+ **Returns:** <code>Promise&lt;<a href="#getcontextresult">GetContextResult</a>&gt;</code>
268
+
269
+ **Since:** 8.0.0
270
+
271
+ --------------------
272
+
273
+
274
+ ### activateContext(...)
275
+
276
+ ```typescript
277
+ activateContext(options: ActivateContextOptions) => Promise<void>
278
+ ```
279
+
280
+ Programmatically trigger/activate a context.
281
+
282
+ Only available on Android and iOS.
283
+
284
+ | Param | Type |
285
+ | ------------- | ------------------------------------------------------------------------- |
286
+ | **`options`** | <code><a href="#activatecontextoptions">ActivateContextOptions</a></code> |
287
+
288
+ **Since:** 8.0.0
289
+
290
+ --------------------
291
+
292
+
293
+ ### stopContext()
294
+
295
+ ```typescript
296
+ stopContext() => Promise<void>
297
+ ```
298
+
299
+ Stop the currently playing/active context.
300
+
301
+ Only available on Android and iOS.
302
+
303
+ **Since:** 8.0.0
304
+
305
+ --------------------
306
+
307
+
308
+ ### getNearbyGPSPoints(...)
309
+
310
+ ```typescript
311
+ getNearbyGPSPoints(options: GetNearbyGPSPointsOptions) => Promise<GetNearbyGPSPointsResult>
312
+ ```
313
+
314
+ Get GPS points near a given location, sorted by distance.
315
+
316
+ Only available on Android and iOS.
317
+
318
+ | Param | Type |
319
+ | ------------- | ------------------------------------------------------------------------------- |
320
+ | **`options`** | <code><a href="#getnearbygpspointsoptions">GetNearbyGPSPointsOptions</a></code> |
321
+
322
+ **Returns:** <code>Promise&lt;<a href="#getnearbygpspointsresult">GetNearbyGPSPointsResult</a>&gt;</code>
323
+
324
+ **Since:** 8.0.0
325
+
326
+ --------------------
327
+
328
+
329
+ ### getGPSPointsInBoundingBox(...)
330
+
331
+ ```typescript
332
+ getGPSPointsInBoundingBox(options: GetGPSPointsInBoundingBoxOptions) => Promise<GetGPSPointsInBoundingBoxResult>
333
+ ```
334
+
335
+ Get all GPS points within a geographic bounding box.
336
+
337
+ Only available on Android and iOS.
338
+
339
+ | Param | Type |
340
+ | ------------- | --------------------------------------------------------------------------------------------- |
341
+ | **`options`** | <code><a href="#getgpspointsinboundingboxoptions">GetGPSPointsInBoundingBoxOptions</a></code> |
342
+
343
+ **Returns:** <code>Promise&lt;<a href="#getgpspointsinboundingboxresult">GetGPSPointsInBoundingBoxResult</a>&gt;</code>
344
+
345
+ **Since:** 8.0.0
346
+
347
+ --------------------
348
+
349
+
350
+ ### getNearbyBeacons()
351
+
352
+ ```typescript
353
+ getNearbyBeacons() => Promise<GetNearbyBeaconsResult>
354
+ ```
355
+
356
+ Get contexts associated with nearby detected beacons.
357
+
358
+ Only available on Android and iOS.
359
+
360
+ **Returns:** <code>Promise&lt;<a href="#getnearbybeaconsresult">GetNearbyBeaconsResult</a>&gt;</code>
361
+
362
+ **Since:** 8.0.0
363
+
364
+ --------------------
365
+
366
+
367
+ ### startNearbyGPSDetection()
368
+
369
+ ```typescript
370
+ startNearbyGPSDetection() => Promise<void>
371
+ ```
372
+
373
+ Start background GPS proximity detection.
374
+
375
+ Only available on Android and iOS.
376
+
377
+ **Since:** 8.0.0
378
+
379
+ --------------------
380
+
381
+
382
+ ### stopNearbyGPSDetection()
383
+
384
+ ```typescript
385
+ stopNearbyGPSDetection() => Promise<void>
386
+ ```
387
+
388
+ Stop background GPS proximity detection.
389
+
390
+ Only available on Android and iOS.
391
+
392
+ **Since:** 8.0.0
393
+
394
+ --------------------
395
+
396
+
397
+ ### startGPSNotifications()
398
+
399
+ ```typescript
400
+ startGPSNotifications() => Promise<void>
401
+ ```
402
+
403
+ Enable GPS-triggered local notifications.
404
+
405
+ Only available on Android and iOS.
406
+
407
+ **Since:** 8.0.0
408
+
409
+ --------------------
410
+
411
+
412
+ ### stopGPSNotifications()
413
+
414
+ ```typescript
415
+ stopGPSNotifications() => Promise<void>
416
+ ```
417
+
418
+ Disable GPS-triggered local notifications.
419
+
420
+ Only available on Android and iOS.
421
+
422
+ **Since:** 8.0.0
423
+
424
+ --------------------
425
+
426
+
427
+ ### setNotificationsSupport(...)
428
+
429
+ ```typescript
430
+ setNotificationsSupport(options: SetNotificationsSupportOptions) => Promise<void>
431
+ ```
432
+
433
+ Enable or disable notification support.
434
+
435
+ Only available on Android and iOS.
436
+
437
+ | Param | Type |
438
+ | ------------- | ----------------------------------------------------------------------------------------- |
439
+ | **`options`** | <code><a href="#setnotificationssupportoptions">SetNotificationsSupportOptions</a></code> |
440
+
441
+ **Since:** 8.0.0
442
+
443
+ --------------------
444
+
445
+
446
+ ### setInterfaceLanguage(...)
447
+
448
+ ```typescript
449
+ setInterfaceLanguage(options: SetInterfaceLanguageOptions) => Promise<void>
450
+ ```
451
+
452
+ Set the language for SDK UI elements.
453
+
454
+ Only available on Android and iOS.
455
+
456
+ | Param | Type |
457
+ | ------------- | ----------------------------------------------------------------------------------- |
458
+ | **`options`** | <code><a href="#setinterfacelanguageoptions">SetInterfaceLanguageOptions</a></code> |
459
+
460
+ **Since:** 8.0.0
461
+
462
+ --------------------
463
+
464
+
465
+ ### createARView(...)
466
+
467
+ ```typescript
468
+ createARView(options: CreateARViewOptions) => Promise<void>
469
+ ```
470
+
471
+ Create the native AR camera view at specified screen coordinates.
472
+
473
+ Only available on Android and iOS.
474
+
475
+ | Param | Type |
476
+ | ------------- | ------------------------------------------------------------------- |
477
+ | **`options`** | <code><a href="#createarviewoptions">CreateARViewOptions</a></code> |
478
+
479
+ **Since:** 8.0.0
480
+
481
+ --------------------
482
+
483
+
484
+ ### destroyARView()
485
+
486
+ ```typescript
487
+ destroyARView() => Promise<void>
488
+ ```
489
+
490
+ Destroy the AR camera view.
491
+
492
+ Only available on Android and iOS.
493
+
494
+ **Since:** 8.0.0
495
+
496
+ --------------------
497
+
498
+
499
+ ### resizeARView(...)
500
+
501
+ ```typescript
502
+ resizeARView(options: ResizeARViewOptions) => Promise<void>
503
+ ```
504
+
505
+ Resize the AR view.
506
+
507
+ Only available on Android and iOS.
508
+
509
+ | Param | Type |
510
+ | ------------- | ------------------------------------------------------------------- |
511
+ | **`options`** | <code><a href="#resizearviewoptions">ResizeARViewOptions</a></code> |
512
+
513
+ **Since:** 8.0.0
514
+
515
+ --------------------
516
+
517
+
518
+ ### setARViewTouchEnabled(...)
519
+
520
+ ```typescript
521
+ setARViewTouchEnabled(options: SetARViewTouchEnabledOptions) => Promise<void>
522
+ ```
523
+
524
+ Enable or disable touch event interception on the AR view.
525
+
526
+ Only available on Android and iOS.
527
+
528
+ | Param | Type |
529
+ | ------------- | ------------------------------------------------------------------------------------- |
530
+ | **`options`** | <code><a href="#setarviewtouchenabledoptions">SetARViewTouchEnabledOptions</a></code> |
531
+
532
+ **Since:** 8.0.0
533
+
534
+ --------------------
535
+
536
+
537
+ ### setARViewTouchHole(...)
538
+
539
+ ```typescript
540
+ setARViewTouchHole(options: SetARViewTouchHoleOptions) => Promise<void>
541
+ ```
542
+
543
+ Define a rectangular region where touches pass through the AR view to the web layer.
544
+
545
+ Only available on Android and iOS.
546
+
547
+ | Param | Type |
548
+ | ------------- | ------------------------------------------------------------------------------- |
549
+ | **`options`** | <code><a href="#setarviewtouchholeoptions">SetARViewTouchHoleOptions</a></code> |
550
+
551
+ **Since:** 8.0.0
552
+
553
+ --------------------
554
+
555
+
556
+ ### getVersion()
557
+
558
+ ```typescript
559
+ getVersion() => Promise<GetVersionResult>
560
+ ```
561
+
562
+ Get the version of the sdk.
563
+
564
+ **Returns:** <code>Promise&lt;<a href="#getversionresult">GetVersionResult</a>&gt;</code>
565
+
566
+ **Since:** 8.0.0
567
+
568
+ --------------------
569
+
570
+
571
+ ### addListener('codeRecognize', ...)
572
+
573
+ ```typescript
574
+ addListener(eventName: 'codeRecognize', listenerFunc: (event: CodeRecognizeEvent) => void) => Promise<PluginListenerHandle>
575
+ ```
576
+
577
+ Called when a QR code or barcode is scanned by the AR camera.
578
+
579
+ | Param | Type |
580
+ | ------------------ | ------------------------------------------------------------------------------------- |
581
+ | **`eventName`** | <code>'codeRecognize'</code> |
582
+ | **`listenerFunc`** | <code>(event: <a href="#coderecognizeevent">CodeRecognizeEvent</a>) =&gt; void</code> |
583
+
584
+ **Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
585
+
586
+ **Since:** 8.0.0
587
+
588
+ --------------------
589
+
590
+
591
+ ### addListener('enterContext', ...)
592
+
593
+ ```typescript
594
+ addListener(eventName: 'enterContext', listenerFunc: (event: EnterContextEvent) => void) => Promise<PluginListenerHandle>
595
+ ```
596
+
597
+ Called when an AR context is detected/entered.
598
+
599
+ | Param | Type |
600
+ | ------------------ | ----------------------------------------------------------------------------------- |
601
+ | **`eventName`** | <code>'enterContext'</code> |
602
+ | **`listenerFunc`** | <code>(event: <a href="#entercontextevent">EnterContextEvent</a>) =&gt; void</code> |
603
+
604
+ **Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
605
+
606
+ **Since:** 8.0.0
607
+
608
+ --------------------
609
+
610
+
611
+ ### addListener('exitContext', ...)
612
+
613
+ ```typescript
614
+ addListener(eventName: 'exitContext', listenerFunc: (event: ExitContextEvent) => void) => Promise<PluginListenerHandle>
615
+ ```
616
+
617
+ Called when an AR context is lost/exited.
618
+
619
+ | Param | Type |
620
+ | ------------------ | --------------------------------------------------------------------------------- |
621
+ | **`eventName`** | <code>'exitContext'</code> |
622
+ | **`listenerFunc`** | <code>(event: <a href="#exitcontextevent">ExitContextEvent</a>) =&gt; void</code> |
623
+
624
+ **Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
625
+
626
+ **Since:** 8.0.0
627
+
628
+ --------------------
629
+
630
+
631
+ ### addListener('presentAnnotations', ...)
632
+
633
+ ```typescript
634
+ addListener(eventName: 'presentAnnotations', listenerFunc: () => void) => Promise<PluginListenerHandle>
635
+ ```
636
+
637
+ Called when AR content/annotations become visible on screen.
638
+
639
+ | Param | Type |
640
+ | ------------------ | --------------------------------- |
641
+ | **`eventName`** | <code>'presentAnnotations'</code> |
642
+ | **`listenerFunc`** | <code>() =&gt; void</code> |
643
+
644
+ **Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
645
+
646
+ **Since:** 8.0.0
647
+
648
+ --------------------
649
+
650
+
651
+ ### addListener('hideAnnotations', ...)
652
+
653
+ ```typescript
654
+ addListener(eventName: 'hideAnnotations', listenerFunc: () => void) => Promise<PluginListenerHandle>
655
+ ```
656
+
657
+ Called when AR content/annotations are hidden.
658
+
659
+ | Param | Type |
660
+ | ------------------ | ------------------------------ |
661
+ | **`eventName`** | <code>'hideAnnotations'</code> |
662
+ | **`listenerFunc`** | <code>() =&gt; void</code> |
663
+
664
+ **Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
665
+
666
+ **Since:** 8.0.0
667
+
668
+ --------------------
669
+
670
+
671
+ ### addListener('eventFromContent', ...)
672
+
673
+ ```typescript
674
+ addListener(eventName: 'eventFromContent', listenerFunc: (event: EventFromContentEvent) => void) => Promise<PluginListenerHandle>
675
+ ```
676
+
677
+ Called when AR content dispatches a custom event.
678
+
679
+ | Param | Type |
680
+ | ------------------ | ------------------------------------------------------------------------------------------- |
681
+ | **`eventName`** | <code>'eventFromContent'</code> |
682
+ | **`listenerFunc`** | <code>(event: <a href="#eventfromcontentevent">EventFromContentEvent</a>) =&gt; void</code> |
683
+
684
+ **Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
685
+
686
+ **Since:** 8.0.0
687
+
688
+ --------------------
689
+
690
+
691
+ ### addListener('syncProgress', ...)
692
+
693
+ ```typescript
694
+ addListener(eventName: 'syncProgress', listenerFunc: (event: SyncProgressEvent) => void) => Promise<PluginListenerHandle>
695
+ ```
696
+
697
+ Called during synchronization with progress updates.
698
+
699
+ | Param | Type |
700
+ | ------------------ | ----------------------------------------------------------------------------------- |
701
+ | **`eventName`** | <code>'syncProgress'</code> |
702
+ | **`listenerFunc`** | <code>(event: <a href="#syncprogressevent">SyncProgressEvent</a>) =&gt; void</code> |
703
+
704
+ **Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
705
+
706
+ **Since:** 8.0.0
707
+
708
+ --------------------
709
+
710
+
711
+ ### addListener('requireSync', ...)
712
+
713
+ ```typescript
714
+ addListener(eventName: 'requireSync', listenerFunc: (event: RequireSyncEvent) => void) => Promise<PluginListenerHandle>
715
+ ```
716
+
717
+ Called when the SDK requires synchronization with specific tags.
718
+
719
+ | Param | Type |
720
+ | ------------------ | --------------------------------------------------------------------------------- |
721
+ | **`eventName`** | <code>'requireSync'</code> |
722
+ | **`listenerFunc`** | <code>(event: <a href="#requiresyncevent">RequireSyncEvent</a>) =&gt; void</code> |
723
+
724
+ **Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
725
+
726
+ **Since:** 8.0.0
727
+
728
+ --------------------
729
+
730
+
731
+ ### removeAllListeners()
732
+
733
+ ```typescript
734
+ removeAllListeners() => Promise<void>
735
+ ```
736
+
737
+ Remove all listeners for this plugin.
738
+
739
+ **Since:** 8.0.0
740
+
741
+ --------------------
742
+
743
+
744
+ ### Interfaces
745
+
746
+
747
+ #### PermissionStatus
748
+
749
+ | Prop | Type | Description | Since |
750
+ | ---------------------- | ----------------------------------------------------------- | -------------------------------------------------------------------------------- | ----- |
751
+ | **`bluetooth`** | <code><a href="#permissionstate">PermissionState</a></code> | Permission state of the Bluetooth permission. Only available on iOS. | 8.0.0 |
752
+ | **`bluetoothConnect`** | <code><a href="#permissionstate">PermissionState</a></code> | Permission state of the Bluetooth Connect permission. Only available on Android. | 8.0.0 |
753
+ | **`bluetoothScan`** | <code><a href="#permissionstate">PermissionState</a></code> | Permission state of the Bluetooth Scan permission. Only available on Android. | 8.0.0 |
754
+ | **`camera`** | <code><a href="#permissionstate">PermissionState</a></code> | Permission state of the Camera permission. | 8.0.0 |
755
+ | **`location`** | <code><a href="#permissionstate">PermissionState</a></code> | Permission state of the Location permission. Only available on Android and iOS. | 8.0.0 |
756
+ | **`notifications`** | <code><a href="#permissionstate">PermissionState</a></code> | Permission state of the Notifications permission. | 8.0.0 |
757
+
758
+
759
+ #### PixlivePluginPermission
760
+
761
+ | Prop | Type | Description | Since |
762
+ | ----------------- | ------------------------------------ | --------------------------- | ----- |
763
+ | **`permissions`** | <code>PixlivePermissionType[]</code> | The permissions to request. | 8.0.0 |
764
+
765
+
766
+ #### SynchronizeOptions
767
+
768
+ | Prop | Type | Description | Since |
769
+ | ---------- | ----------------------- | ------------------------------ | ----- |
770
+ | **`tags`** | <code>string[][]</code> | The tags to filter content by. | 8.0.0 |
771
+
772
+
773
+ #### SynchronizeWithToursAndContextsOptions
774
+
775
+ | Prop | Type | Description | Since |
776
+ | ---------------- | ----------------------- | ------------------------------ | ----- |
777
+ | **`tags`** | <code>string[][]</code> | The tags to filter content by. | 8.0.0 |
778
+ | **`tourIds`** | <code>number[]</code> | The tour IDs to sync. | 8.0.0 |
779
+ | **`contextIds`** | <code>string[]</code> | The context IDs to sync. | 8.0.0 |
780
+
781
+
782
+ #### UpdateTagMappingOptions
783
+
784
+ | Prop | Type | Description | Since |
785
+ | ---------- | --------------------- | ---------------- | ----- |
786
+ | **`tags`** | <code>string[]</code> | The tags to map. | 8.0.0 |
787
+
788
+
789
+ #### EnableContextsWithTagsOptions
790
+
791
+ | Prop | Type | Description | Since |
792
+ | ---------- | --------------------- | -------------------------------- | ----- |
793
+ | **`tags`** | <code>string[]</code> | The tags to enable contexts for. | 8.0.0 |
794
+
795
+
796
+ #### GetContextsResult
797
+
798
+ | Prop | Type | Description | Since |
799
+ | -------------- | ---------------------- | ---------------------------------- | ----- |
800
+ | **`contexts`** | <code>Context[]</code> | The list of synchronized contexts. | 8.0.0 |
801
+
802
+
803
+ #### Context
804
+
805
+ | Prop | Type | Description | Since |
806
+ | ------------------------- | --------------------------- | ------------------------------------- | ----- |
807
+ | **`contextId`** | <code>string</code> | The unique identifier of the context. | 8.0.0 |
808
+ | **`name`** | <code>string</code> | The name of the context. | 8.0.0 |
809
+ | **`description`** | <code>string \| null</code> | The description of the context. | 8.0.0 |
810
+ | **`lastUpdate`** | <code>string</code> | The last update timestamp. | 8.0.0 |
811
+ | **`imageThumbnailURL`** | <code>string \| null</code> | The URL of the thumbnail image. | 8.0.0 |
812
+ | **`imageHiResURL`** | <code>string \| null</code> | The URL of the high-resolution image. | 8.0.0 |
813
+ | **`notificationTitle`** | <code>string \| null</code> | The notification title. | 8.0.0 |
814
+ | **`notificationMessage`** | <code>string \| null</code> | The notification message. | 8.0.0 |
815
+ | **`tags`** | <code>string[]</code> | The tags associated with the context. | 8.0.0 |
816
+
817
+
818
+ #### GetContextResult
819
+
820
+ | Prop | Type | Description | Since |
821
+ | ------------- | ------------------------------------------- | ------------ | ----- |
822
+ | **`context`** | <code><a href="#context">Context</a></code> | The context. | 8.0.0 |
823
+
824
+
825
+ #### GetContextOptions
826
+
827
+ | Prop | Type | Description | Since |
828
+ | --------------- | ------------------- | ---------------------------------- | ----- |
829
+ | **`contextId`** | <code>string</code> | The ID of the context to retrieve. | 8.0.0 |
830
+
831
+
832
+ #### ActivateContextOptions
833
+
834
+ | Prop | Type | Description | Since |
835
+ | --------------- | ------------------- | ---------------------------------- | ----- |
836
+ | **`contextId`** | <code>string</code> | The ID of the context to activate. | 8.0.0 |
837
+
838
+
839
+ #### GetNearbyGPSPointsResult
840
+
841
+ | Prop | Type | Description | Since |
842
+ | ------------ | ----------------------- | ----------------------------------------- | ----- |
843
+ | **`points`** | <code>GPSPoint[]</code> | The nearby GPS points sorted by distance. | 8.0.0 |
844
+
845
+
846
+ #### GPSPoint
847
+
848
+ | Prop | Type | Description | Since |
849
+ | --------------------------------- | --------------------------- | ------------------------------------------------- | ----- |
850
+ | **`contextId`** | <code>string</code> | The ID of the associated context. | 8.0.0 |
851
+ | **`category`** | <code>string</code> | The category of the GPS point. | 8.0.0 |
852
+ | **`label`** | <code>string</code> | The label of the GPS point. | 8.0.0 |
853
+ | **`latitude`** | <code>number</code> | The latitude of the GPS point. | 8.0.0 |
854
+ | **`longitude`** | <code>number</code> | The longitude of the GPS point. | 8.0.0 |
855
+ | **`detectionRadius`** | <code>number \| null</code> | The detection radius in meters. | 8.0.0 |
856
+ | **`distanceFromCurrentPosition`** | <code>number</code> | The distance from the current position in meters. | 8.0.0 |
857
+
858
+
859
+ #### GetNearbyGPSPointsOptions
860
+
861
+ | Prop | Type | Description | Since |
862
+ | --------------- | ------------------- | ---------------------------------------- | ----- |
863
+ | **`latitude`** | <code>number</code> | The latitude of the reference location. | 8.0.0 |
864
+ | **`longitude`** | <code>number</code> | The longitude of the reference location. | 8.0.0 |
865
+
866
+
867
+ #### GetGPSPointsInBoundingBoxResult
868
+
869
+ | Prop | Type | Description | Since |
870
+ | ------------ | ----------------------- | --------------------------------------- | ----- |
871
+ | **`points`** | <code>GPSPoint[]</code> | The GPS points within the bounding box. | 8.0.0 |
872
+
873
+
874
+ #### GetGPSPointsInBoundingBoxOptions
875
+
876
+ | Prop | Type | Description | Since |
877
+ | ------------------ | ------------------- | ------------------------------------------ | ----- |
878
+ | **`minLatitude`** | <code>number</code> | The minimum latitude of the bounding box. | 8.0.0 |
879
+ | **`minLongitude`** | <code>number</code> | The minimum longitude of the bounding box. | 8.0.0 |
880
+ | **`maxLatitude`** | <code>number</code> | The maximum latitude of the bounding box. | 8.0.0 |
881
+ | **`maxLongitude`** | <code>number</code> | The maximum longitude of the bounding box. | 8.0.0 |
882
+
883
+
884
+ #### GetNearbyBeaconsResult
885
+
886
+ | Prop | Type | Description | Since |
887
+ | -------------- | ---------------------- | -------------------------------------------- | ----- |
888
+ | **`contexts`** | <code>Context[]</code> | The contexts associated with nearby beacons. | 8.0.0 |
889
+
890
+
891
+ #### SetNotificationsSupportOptions
892
+
893
+ | Prop | Type | Description | Since |
894
+ | ------------- | -------------------- | ------------------------------------------------ | ----- |
895
+ | **`enabled`** | <code>boolean</code> | Whether notifications support should be enabled. | 8.0.0 |
896
+
897
+
898
+ #### SetInterfaceLanguageOptions
899
+
900
+ | Prop | Type | Description | Since |
901
+ | -------------- | ------------------- | ------------------------- | ----- |
902
+ | **`language`** | <code>string</code> | The language code to set. | 8.0.0 |
903
+
904
+
905
+ #### CreateARViewOptions
906
+
907
+ | Prop | Type | Description | Since |
908
+ | ------------ | ------------------- | ------------------------------ | ----- |
909
+ | **`x`** | <code>number</code> | The x position of the AR view. | 8.0.0 |
910
+ | **`y`** | <code>number</code> | The y position of the AR view. | 8.0.0 |
911
+ | **`width`** | <code>number</code> | The width of the AR view. | 8.0.0 |
912
+ | **`height`** | <code>number</code> | The height of the AR view. | 8.0.0 |
913
+
914
+
915
+ #### ResizeARViewOptions
916
+
917
+ | Prop | Type | Description | Since |
918
+ | ------------ | ------------------- | ---------------------------------- | ----- |
919
+ | **`x`** | <code>number</code> | The new x position of the AR view. | 8.0.0 |
920
+ | **`y`** | <code>number</code> | The new y position of the AR view. | 8.0.0 |
921
+ | **`width`** | <code>number</code> | The new width of the AR view. | 8.0.0 |
922
+ | **`height`** | <code>number</code> | The new height of the AR view. | 8.0.0 |
923
+
924
+
925
+ #### SetARViewTouchEnabledOptions
926
+
927
+ | Prop | Type | Description | Since |
928
+ | ------------- | -------------------- | ---------------------------------------------------------- | ----- |
929
+ | **`enabled`** | <code>boolean</code> | Whether touch events should be intercepted by the AR view. | 8.0.0 |
930
+
931
+
932
+ #### SetARViewTouchHoleOptions
933
+
934
+ | Prop | Type | Description | Since |
935
+ | ------------ | ------------------- | ----------------------------------------------- | ----- |
936
+ | **`top`** | <code>number</code> | The top coordinate of the touch hole region. | 8.0.0 |
937
+ | **`bottom`** | <code>number</code> | The bottom coordinate of the touch hole region. | 8.0.0 |
938
+ | **`left`** | <code>number</code> | The left coordinate of the touch hole region. | 8.0.0 |
939
+ | **`right`** | <code>number</code> | The right coordinate of the touch hole region. | 8.0.0 |
940
+
941
+
942
+ #### GetVersionResult
943
+
944
+ | Prop | Type | Description | Since |
945
+ | ------------- | ------------------- | ----------------------- | ----- |
946
+ | **`version`** | <code>string</code> | The version of the sdk. | 8.0.0 |
947
+
948
+
949
+ #### PluginListenerHandle
950
+
951
+ | Prop | Type |
952
+ | ------------ | ----------------------------------------- |
953
+ | **`remove`** | <code>() =&gt; Promise&lt;void&gt;</code> |
954
+
955
+
956
+ #### CodeRecognizeEvent
957
+
958
+ | Prop | Type | Description | Since |
959
+ | ---------- | ------------------- | ----------------------------- | ----- |
960
+ | **`code`** | <code>string</code> | The scanned code value. | 8.0.0 |
961
+ | **`type`** | <code>string</code> | The type of the scanned code. | 8.0.0 |
962
+
963
+
964
+ #### EnterContextEvent
965
+
966
+ | Prop | Type | Description | Since |
967
+ | --------------- | ------------------- | ------------------------------ | ----- |
968
+ | **`contextId`** | <code>string</code> | The ID of the entered context. | 8.0.0 |
969
+
970
+
971
+ #### ExitContextEvent
972
+
973
+ | Prop | Type | Description | Since |
974
+ | --------------- | ------------------- | ----------------------------- | ----- |
975
+ | **`contextId`** | <code>string</code> | The ID of the exited context. | 8.0.0 |
976
+
977
+
978
+ #### EventFromContentEvent
979
+
980
+ | Prop | Type | Description | Since |
981
+ | ------------ | ------------------- | ----------------------------------- | ----- |
982
+ | **`name`** | <code>string</code> | The name of the custom event. | 8.0.0 |
983
+ | **`params`** | <code>string</code> | The parameters of the custom event. | 8.0.0 |
984
+
985
+
986
+ #### SyncProgressEvent
987
+
988
+ | Prop | Type | Description | Since |
989
+ | -------------- | ------------------- | -------------------------------------------- | ----- |
990
+ | **`progress`** | <code>number</code> | The sync progress value between 0.0 and 1.0. | 8.0.0 |
991
+
992
+
993
+ #### RequireSyncEvent
994
+
995
+ | Prop | Type | Description | Since |
996
+ | ---------- | --------------------- | -------------------------------------- | ----- |
997
+ | **`tags`** | <code>string[]</code> | The tags that require synchronization. | 8.0.0 |
998
+
999
+
1000
+ ### Type Aliases
1001
+
1002
+
1003
+ #### PermissionState
1004
+
1005
+ <code>'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'</code>
1006
+
1007
+
1008
+ #### PixlivePermissionType
1009
+
1010
+ <code>'bluetooth' | 'bluetoothConnect' | 'bluetoothScan' | 'camera' | 'location' | 'notifications'</code>
1011
+
1012
+ </docgen-api>