@capgo/capacitor-intent-launcher 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.
- package/LICENSE +373 -0
- package/README.md +214 -0
- package/android/build.gradle +58 -0
- package/android/src/main/java/app/capgo/capacitor/intentlauncher/IntentLauncherPlugin.java +284 -0
- package/dist/docs.json +455 -0
- package/dist/esm/definitions.d.ts +609 -0
- package/dist/esm/definitions.js +415 -0
- package/dist/esm/definitions.js.map +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/web.d.ts +10 -0
- package/dist/esm/web.js +16 -0
- package/dist/esm/web.js.map +1 -0
- package/dist/plugin.cjs.js +445 -0
- package/dist/plugin.cjs.js.map +1 -0
- package/dist/plugin.js +448 -0
- package/dist/plugin.js.map +1 -0
- package/package.json +77 -0
package/dist/docs.json
ADDED
|
@@ -0,0 +1,455 @@
|
|
|
1
|
+
{
|
|
2
|
+
"api": {
|
|
3
|
+
"name": "IntentLauncherPlugin",
|
|
4
|
+
"slug": "intentlauncherplugin",
|
|
5
|
+
"docs": "Capacitor Intent Launcher Plugin for launching Android intents and opening system settings.",
|
|
6
|
+
"tags": [
|
|
7
|
+
{
|
|
8
|
+
"text": "1.0.0",
|
|
9
|
+
"name": "since"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"methods": [
|
|
13
|
+
{
|
|
14
|
+
"name": "startActivityAsync",
|
|
15
|
+
"signature": "(options: IntentLauncherParams) => Promise<IntentLauncherResult>",
|
|
16
|
+
"parameters": [
|
|
17
|
+
{
|
|
18
|
+
"name": "options",
|
|
19
|
+
"docs": "- The intent launch options including action and optional parameters",
|
|
20
|
+
"type": "IntentLauncherParams"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"returns": "Promise<IntentLauncherResult>",
|
|
24
|
+
"tags": [
|
|
25
|
+
{
|
|
26
|
+
"name": "param",
|
|
27
|
+
"text": "options - The intent launch options including action and optional parameters"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "returns",
|
|
31
|
+
"text": "Promise that resolves with the result from the activity"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "throws",
|
|
35
|
+
"text": "Error if the activity cannot be started or is not available"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "platform",
|
|
39
|
+
"text": "Android"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"name": "since",
|
|
43
|
+
"text": "1.0.0"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "example",
|
|
47
|
+
"text": "```typescript\n// Open location settings\nconst result = await IntentLauncher.startActivityAsync({\n action: ActivityAction.LOCATION_SOURCE_SETTINGS\n});\n\n// Open a specific app settings\nconst result = await IntentLauncher.startActivityAsync({\n action: ActivityAction.APPLICATION_DETAILS_SETTINGS,\n data: 'package:com.example.app'\n});\n```"
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"docs": "Starts an Android activity for the given action.",
|
|
51
|
+
"complexTypes": [
|
|
52
|
+
"IntentLauncherResult",
|
|
53
|
+
"IntentLauncherParams"
|
|
54
|
+
],
|
|
55
|
+
"slug": "startactivityasync"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "openApplication",
|
|
59
|
+
"signature": "(options: OpenApplicationOptions) => Promise<void>",
|
|
60
|
+
"parameters": [
|
|
61
|
+
{
|
|
62
|
+
"name": "options",
|
|
63
|
+
"docs": "- The package name of the application to open",
|
|
64
|
+
"type": "OpenApplicationOptions"
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
"returns": "Promise<void>",
|
|
68
|
+
"tags": [
|
|
69
|
+
{
|
|
70
|
+
"name": "param",
|
|
71
|
+
"text": "options - The package name of the application to open"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "throws",
|
|
75
|
+
"text": "Error if the application is not installed or cannot be opened"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "platform",
|
|
79
|
+
"text": "Android"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"name": "since",
|
|
83
|
+
"text": "1.0.0"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": "example",
|
|
87
|
+
"text": "```typescript\n// Open Gmail app\nawait IntentLauncher.openApplication({ packageName: 'com.google.android.gm' });\n```"
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"docs": "Opens an application by its package name.",
|
|
91
|
+
"complexTypes": [
|
|
92
|
+
"OpenApplicationOptions"
|
|
93
|
+
],
|
|
94
|
+
"slug": "openapplication"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "getApplicationIconAsync",
|
|
98
|
+
"signature": "(options: GetApplicationIconOptions) => Promise<GetApplicationIconResult>",
|
|
99
|
+
"parameters": [
|
|
100
|
+
{
|
|
101
|
+
"name": "options",
|
|
102
|
+
"docs": "- The package name of the application",
|
|
103
|
+
"type": "GetApplicationIconOptions"
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"returns": "Promise<GetApplicationIconResult>",
|
|
107
|
+
"tags": [
|
|
108
|
+
{
|
|
109
|
+
"name": "param",
|
|
110
|
+
"text": "options - The package name of the application"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"name": "returns",
|
|
114
|
+
"text": "Promise that resolves with the base64 icon data or empty string if unavailable"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"name": "platform",
|
|
118
|
+
"text": "Android"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"name": "since",
|
|
122
|
+
"text": "1.0.0"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"name": "example",
|
|
126
|
+
"text": "```typescript\nconst { icon } = await IntentLauncher.getApplicationIconAsync({\n packageName: 'com.google.android.gm'\n});\nif (icon) {\n const img = document.createElement('img');\n img.src = icon;\n}\n```"
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
"docs": "Gets the application icon as a base64-encoded PNG string.",
|
|
130
|
+
"complexTypes": [
|
|
131
|
+
"GetApplicationIconResult",
|
|
132
|
+
"GetApplicationIconOptions"
|
|
133
|
+
],
|
|
134
|
+
"slug": "getapplicationiconasync"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"name": "getPluginVersion",
|
|
138
|
+
"signature": "() => Promise<{ version: string; }>",
|
|
139
|
+
"parameters": [],
|
|
140
|
+
"returns": "Promise<{ version: string; }>",
|
|
141
|
+
"tags": [
|
|
142
|
+
{
|
|
143
|
+
"name": "returns",
|
|
144
|
+
"text": "Promise that resolves with the plugin version"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"name": "throws",
|
|
148
|
+
"text": "Error if getting the version fails"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"name": "since",
|
|
152
|
+
"text": "1.0.0"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"name": "example",
|
|
156
|
+
"text": "```typescript\nconst { version } = await IntentLauncher.getPluginVersion();\nconsole.log('Plugin version:', version);\n```"
|
|
157
|
+
}
|
|
158
|
+
],
|
|
159
|
+
"docs": "Get the native Capacitor plugin version.",
|
|
160
|
+
"complexTypes": [],
|
|
161
|
+
"slug": "getpluginversion"
|
|
162
|
+
}
|
|
163
|
+
],
|
|
164
|
+
"properties": []
|
|
165
|
+
},
|
|
166
|
+
"interfaces": [
|
|
167
|
+
{
|
|
168
|
+
"name": "IntentLauncherResult",
|
|
169
|
+
"slug": "intentlauncherresult",
|
|
170
|
+
"docs": "Result from starting an activity.",
|
|
171
|
+
"tags": [
|
|
172
|
+
{
|
|
173
|
+
"text": "1.0.0",
|
|
174
|
+
"name": "since"
|
|
175
|
+
}
|
|
176
|
+
],
|
|
177
|
+
"methods": [],
|
|
178
|
+
"properties": [
|
|
179
|
+
{
|
|
180
|
+
"name": "resultCode",
|
|
181
|
+
"tags": [
|
|
182
|
+
{
|
|
183
|
+
"text": "1.0.0",
|
|
184
|
+
"name": "since"
|
|
185
|
+
}
|
|
186
|
+
],
|
|
187
|
+
"docs": "The result code returned by the activity.",
|
|
188
|
+
"complexTypes": [
|
|
189
|
+
"ResultCode"
|
|
190
|
+
],
|
|
191
|
+
"type": "ResultCode"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"name": "data",
|
|
195
|
+
"tags": [
|
|
196
|
+
{
|
|
197
|
+
"text": "1.0.0",
|
|
198
|
+
"name": "since"
|
|
199
|
+
}
|
|
200
|
+
],
|
|
201
|
+
"docs": "Optional data URI returned by the activity.",
|
|
202
|
+
"complexTypes": [],
|
|
203
|
+
"type": "string | undefined"
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"name": "extra",
|
|
207
|
+
"tags": [
|
|
208
|
+
{
|
|
209
|
+
"text": "1.0.0",
|
|
210
|
+
"name": "since"
|
|
211
|
+
}
|
|
212
|
+
],
|
|
213
|
+
"docs": "Optional extra data returned by the activity.",
|
|
214
|
+
"complexTypes": [
|
|
215
|
+
"Record"
|
|
216
|
+
],
|
|
217
|
+
"type": "Record<string, unknown>"
|
|
218
|
+
}
|
|
219
|
+
]
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"name": "IntentLauncherParams",
|
|
223
|
+
"slug": "intentlauncherparams",
|
|
224
|
+
"docs": "Options for starting an activity.",
|
|
225
|
+
"tags": [
|
|
226
|
+
{
|
|
227
|
+
"text": "1.0.0",
|
|
228
|
+
"name": "since"
|
|
229
|
+
}
|
|
230
|
+
],
|
|
231
|
+
"methods": [],
|
|
232
|
+
"properties": [
|
|
233
|
+
{
|
|
234
|
+
"name": "action",
|
|
235
|
+
"tags": [
|
|
236
|
+
{
|
|
237
|
+
"text": "1.0.0",
|
|
238
|
+
"name": "since"
|
|
239
|
+
}
|
|
240
|
+
],
|
|
241
|
+
"docs": "The action to perform. Use values from `ActivityAction` enum.",
|
|
242
|
+
"complexTypes": [],
|
|
243
|
+
"type": "string"
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"name": "category",
|
|
247
|
+
"tags": [
|
|
248
|
+
{
|
|
249
|
+
"text": "1.0.0",
|
|
250
|
+
"name": "since"
|
|
251
|
+
}
|
|
252
|
+
],
|
|
253
|
+
"docs": "Optional category to add to the intent.",
|
|
254
|
+
"complexTypes": [],
|
|
255
|
+
"type": "string | undefined"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"name": "className",
|
|
259
|
+
"tags": [
|
|
260
|
+
{
|
|
261
|
+
"text": "1.0.0",
|
|
262
|
+
"name": "since"
|
|
263
|
+
}
|
|
264
|
+
],
|
|
265
|
+
"docs": "Optional class name for the component to launch.",
|
|
266
|
+
"complexTypes": [],
|
|
267
|
+
"type": "string | undefined"
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"name": "data",
|
|
271
|
+
"tags": [
|
|
272
|
+
{
|
|
273
|
+
"text": "1.0.0",
|
|
274
|
+
"name": "since"
|
|
275
|
+
}
|
|
276
|
+
],
|
|
277
|
+
"docs": "Optional URI data for the intent. Must be a valid URI.",
|
|
278
|
+
"complexTypes": [],
|
|
279
|
+
"type": "string | undefined"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"name": "extra",
|
|
283
|
+
"tags": [
|
|
284
|
+
{
|
|
285
|
+
"text": "1.0.0",
|
|
286
|
+
"name": "since"
|
|
287
|
+
}
|
|
288
|
+
],
|
|
289
|
+
"docs": "Optional extra data to pass to the intent as key-value pairs.",
|
|
290
|
+
"complexTypes": [
|
|
291
|
+
"Record"
|
|
292
|
+
],
|
|
293
|
+
"type": "Record<string, unknown>"
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"name": "flags",
|
|
297
|
+
"tags": [
|
|
298
|
+
{
|
|
299
|
+
"text": "1.0.0",
|
|
300
|
+
"name": "since"
|
|
301
|
+
}
|
|
302
|
+
],
|
|
303
|
+
"docs": "Optional intent flags as a bitmask.",
|
|
304
|
+
"complexTypes": [],
|
|
305
|
+
"type": "number | undefined"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"name": "packageName",
|
|
309
|
+
"tags": [
|
|
310
|
+
{
|
|
311
|
+
"text": "1.0.0",
|
|
312
|
+
"name": "since"
|
|
313
|
+
}
|
|
314
|
+
],
|
|
315
|
+
"docs": "Optional package name for the component.",
|
|
316
|
+
"complexTypes": [],
|
|
317
|
+
"type": "string | undefined"
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"name": "type",
|
|
321
|
+
"tags": [
|
|
322
|
+
{
|
|
323
|
+
"text": "1.0.0",
|
|
324
|
+
"name": "since"
|
|
325
|
+
}
|
|
326
|
+
],
|
|
327
|
+
"docs": "Optional MIME type for the intent data.",
|
|
328
|
+
"complexTypes": [],
|
|
329
|
+
"type": "string | undefined"
|
|
330
|
+
}
|
|
331
|
+
]
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"name": "OpenApplicationOptions",
|
|
335
|
+
"slug": "openapplicationoptions",
|
|
336
|
+
"docs": "Options for opening an application.",
|
|
337
|
+
"tags": [
|
|
338
|
+
{
|
|
339
|
+
"text": "1.0.0",
|
|
340
|
+
"name": "since"
|
|
341
|
+
}
|
|
342
|
+
],
|
|
343
|
+
"methods": [],
|
|
344
|
+
"properties": [
|
|
345
|
+
{
|
|
346
|
+
"name": "packageName",
|
|
347
|
+
"tags": [
|
|
348
|
+
{
|
|
349
|
+
"text": "1.0.0",
|
|
350
|
+
"name": "since"
|
|
351
|
+
}
|
|
352
|
+
],
|
|
353
|
+
"docs": "The package name of the application to open.",
|
|
354
|
+
"complexTypes": [],
|
|
355
|
+
"type": "string"
|
|
356
|
+
}
|
|
357
|
+
]
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"name": "GetApplicationIconResult",
|
|
361
|
+
"slug": "getapplicationiconresult",
|
|
362
|
+
"docs": "Result from getting an application icon.",
|
|
363
|
+
"tags": [
|
|
364
|
+
{
|
|
365
|
+
"text": "1.0.0",
|
|
366
|
+
"name": "since"
|
|
367
|
+
}
|
|
368
|
+
],
|
|
369
|
+
"methods": [],
|
|
370
|
+
"properties": [
|
|
371
|
+
{
|
|
372
|
+
"name": "icon",
|
|
373
|
+
"tags": [
|
|
374
|
+
{
|
|
375
|
+
"text": "1.0.0",
|
|
376
|
+
"name": "since"
|
|
377
|
+
}
|
|
378
|
+
],
|
|
379
|
+
"docs": "The application icon as a base64-encoded PNG string prefixed with 'data:image/png;base64,'.\nEmpty string if the icon is not available.",
|
|
380
|
+
"complexTypes": [],
|
|
381
|
+
"type": "string"
|
|
382
|
+
}
|
|
383
|
+
]
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
"name": "GetApplicationIconOptions",
|
|
387
|
+
"slug": "getapplicationiconoptions",
|
|
388
|
+
"docs": "Options for getting an application icon.",
|
|
389
|
+
"tags": [
|
|
390
|
+
{
|
|
391
|
+
"text": "1.0.0",
|
|
392
|
+
"name": "since"
|
|
393
|
+
}
|
|
394
|
+
],
|
|
395
|
+
"methods": [],
|
|
396
|
+
"properties": [
|
|
397
|
+
{
|
|
398
|
+
"name": "packageName",
|
|
399
|
+
"tags": [
|
|
400
|
+
{
|
|
401
|
+
"text": "1.0.0",
|
|
402
|
+
"name": "since"
|
|
403
|
+
}
|
|
404
|
+
],
|
|
405
|
+
"docs": "The package name of the application.",
|
|
406
|
+
"complexTypes": [],
|
|
407
|
+
"type": "string"
|
|
408
|
+
}
|
|
409
|
+
]
|
|
410
|
+
}
|
|
411
|
+
],
|
|
412
|
+
"enums": [
|
|
413
|
+
{
|
|
414
|
+
"name": "ResultCode",
|
|
415
|
+
"slug": "resultcode",
|
|
416
|
+
"members": [
|
|
417
|
+
{
|
|
418
|
+
"name": "Success",
|
|
419
|
+
"value": "-1",
|
|
420
|
+
"tags": [],
|
|
421
|
+
"docs": "The activity completed successfully."
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
"name": "Canceled",
|
|
425
|
+
"value": "0",
|
|
426
|
+
"tags": [],
|
|
427
|
+
"docs": "The activity was canceled by the user."
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
"name": "FirstUser",
|
|
431
|
+
"value": "1",
|
|
432
|
+
"tags": [],
|
|
433
|
+
"docs": "First custom user-defined result code."
|
|
434
|
+
}
|
|
435
|
+
]
|
|
436
|
+
}
|
|
437
|
+
],
|
|
438
|
+
"typeAliases": [
|
|
439
|
+
{
|
|
440
|
+
"name": "Record",
|
|
441
|
+
"slug": "record",
|
|
442
|
+
"docs": "Construct a type with a set of properties K of type T",
|
|
443
|
+
"types": [
|
|
444
|
+
{
|
|
445
|
+
"text": "{\r\n [P in K]: T;\r\n}",
|
|
446
|
+
"complexTypes": [
|
|
447
|
+
"K",
|
|
448
|
+
"T"
|
|
449
|
+
]
|
|
450
|
+
}
|
|
451
|
+
]
|
|
452
|
+
}
|
|
453
|
+
],
|
|
454
|
+
"pluginConfigs": []
|
|
455
|
+
}
|