com-easystep2-datawedge-plugin-intent-capacitor 5.1.1 → 5.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/android/build.gradle +1 -0
- package/android/src/main/AndroidManifest.xml +4 -11
- package/android/src/main/java/com/easystep2/datawedge/plugin/intent/IntentShimPlugin.java +36 -19
- package/com-easystep2-datawedge-plugin-intent-capacitor-5.2.0.tgz +0 -0
- package/esm/index.js +4 -2
- package/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/plugin.cjs.js +95 -2
- package/plugin.cjs.js.map +1 -1
- package/plugin.js +120 -27
- package/plugin.js.map +1 -1
- package/com-easystep2-datawedge-plugin-intent-capacitor-5.1.1.tgz +0 -0
package/android/build.gradle
CHANGED
|
@@ -48,6 +48,7 @@ repositories {
|
|
|
48
48
|
|
|
49
49
|
dependencies {
|
|
50
50
|
implementation project(':capacitor-android')
|
|
51
|
+
implementation 'androidx.appcompat:appcompat:1.6.1'
|
|
51
52
|
testImplementation "junit:junit:$junitVersion"
|
|
52
53
|
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
53
54
|
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<manifest
|
|
2
|
+
<manifest
|
|
3
|
+
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
4
|
package="com.easystep2.datawedge.plugin.intent">
|
|
4
5
|
|
|
5
|
-
<application
|
|
6
|
-
|
|
7
|
-
<intent-filter>
|
|
8
|
-
<action android:name="${applicationId}.ACTION" />
|
|
9
|
-
<category android:name="android.intent.category.DEFAULT" />
|
|
10
|
-
</intent-filter>
|
|
11
|
-
</activity>
|
|
12
|
-
</application>
|
|
13
|
-
|
|
14
|
-
</manifest>
|
|
6
|
+
<application />
|
|
7
|
+
</manifest>
|
|
@@ -91,24 +91,26 @@ public class IntentShimPlugin extends Plugin {
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
intentJson.put("requestCode", result.getRequestCode());
|
|
102
|
-
intentJson.put("resultCode", result.getResultCode());
|
|
103
|
-
call.resolve(intentJson);
|
|
104
|
-
}
|
|
94
|
+
@ActivityCallback
|
|
95
|
+
private void activityResult(PluginCall call, int resultCode, Intent data) {
|
|
96
|
+
JSObject intentJson = getIntentJson(data);
|
|
97
|
+
intentJson.put("requestCode", call.getInt("requestCode", 1));
|
|
98
|
+
intentJson.put("resultCode", resultCode);
|
|
99
|
+
call.resolve(intentJson);
|
|
100
|
+
}
|
|
105
101
|
|
|
106
102
|
@PluginMethod(returnType = PluginMethod.RETURN_CALLBACK)
|
|
107
103
|
public void registerBroadcastReceiver(PluginCall call) {
|
|
108
104
|
call.setKeepAlive(true);
|
|
109
105
|
|
|
110
106
|
JSObject filters = call.getData();
|
|
111
|
-
JSONArray filterActions =
|
|
107
|
+
JSONArray filterActions = new JSONArray();
|
|
108
|
+
if (filters.has("filterActions")) {
|
|
109
|
+
Object obj = filters.opt("filterActions");
|
|
110
|
+
if (obj instanceof JSONArray) {
|
|
111
|
+
filterActions = (JSONArray) obj;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
112
114
|
|
|
113
115
|
if (filterActions == null || filterActions.length() == 0) {
|
|
114
116
|
call.reject("filterActions argument is required.");
|
|
@@ -121,14 +123,26 @@ public class IntentShimPlugin extends Plugin {
|
|
|
121
123
|
filter.addAction(filterActions.getString(i));
|
|
122
124
|
}
|
|
123
125
|
|
|
124
|
-
JSONArray filterCategories =
|
|
126
|
+
JSONArray filterCategories = new JSONArray();
|
|
127
|
+
if (filters.has("filterCategories")) {
|
|
128
|
+
Object obj = filters.opt("filterCategories");
|
|
129
|
+
if (obj instanceof JSONArray) {
|
|
130
|
+
filterCategories = (JSONArray) obj;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
125
133
|
if (filterCategories != null) {
|
|
126
134
|
for (int i = 0; i < filterCategories.length(); i++) {
|
|
127
135
|
filter.addCategory(filterCategories.getString(i));
|
|
128
136
|
}
|
|
129
137
|
}
|
|
130
138
|
|
|
131
|
-
JSONArray filterDataSchemes =
|
|
139
|
+
JSONArray filterDataSchemes = new JSONArray();
|
|
140
|
+
if (filters.has("filterDataSchemes")) {
|
|
141
|
+
Object obj = filters.opt("filterDataSchemes");
|
|
142
|
+
if (obj instanceof JSONArray) {
|
|
143
|
+
filterDataSchemes = (JSONArray) obj;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
132
146
|
if (filterDataSchemes != null) {
|
|
133
147
|
for (int i = 0; i < filterDataSchemes.length(); i++) {
|
|
134
148
|
filter.addDataScheme(filterDataSchemes.getString(i));
|
|
@@ -142,15 +156,18 @@ public class IntentShimPlugin extends Plugin {
|
|
|
142
156
|
BroadcastReceiver receiver = new BroadcastReceiver() {
|
|
143
157
|
@Override
|
|
144
158
|
public void onReceive(Context context, Intent intent) {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
savedCall.resolve(getIntentJson(intent));
|
|
148
|
-
}
|
|
159
|
+
JSObject intentJson = getIntentJson(intent);
|
|
160
|
+
notifyListeners("onIntent", intentJson);
|
|
149
161
|
}
|
|
150
162
|
};
|
|
151
163
|
|
|
152
|
-
|
|
164
|
+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
|
165
|
+
getContext().registerReceiver(receiver, filter, Context.RECEIVER_EXPORTED);
|
|
166
|
+
} else {
|
|
167
|
+
getContext().registerReceiver(receiver, filter);
|
|
168
|
+
}
|
|
153
169
|
receiverCalls.put(receiver, call);
|
|
170
|
+
call.resolve();
|
|
154
171
|
}
|
|
155
172
|
|
|
156
173
|
@PluginMethod
|
|
Binary file
|
package/esm/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { registerPlugin } from '@capacitor/core';
|
|
2
|
-
// Register the plugin
|
|
3
|
-
const IntentShim = registerPlugin('IntentShim'
|
|
2
|
+
// Register the plugin with web fallback
|
|
3
|
+
const IntentShim = registerPlugin('IntentShim', {
|
|
4
|
+
web: () => import('./web').then(m => new m.IntentShimWeb()),
|
|
5
|
+
});
|
|
4
6
|
// Export constants for direct usage in client code, matching the Cordova plugin's API
|
|
5
7
|
export const ACTION_SEND = 'android.intent.action.SEND';
|
|
6
8
|
export const ACTION_VIEW = 'android.intent.action.VIEW';
|
package/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/capacitor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGjD,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/capacitor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGjD,wCAAwC;AACxC,MAAM,UAAU,GAAG,cAAc,CAAmB,YAAY,EAAE;IAChE,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;CAC5D,CAAC,CAAC;AAEH,sFAAsF;AACtF,MAAM,CAAC,MAAM,WAAW,GAAG,4BAA4B,CAAC;AACxD,MAAM,CAAC,MAAM,WAAW,GAAG,4BAA4B,CAAC;AACxD,MAAM,CAAC,MAAM,UAAU,GAAG,2BAA2B,CAAC;AACtD,MAAM,CAAC,MAAM,aAAa,GAAG,8BAA8B,CAAC;AAC5D,MAAM,CAAC,MAAM,YAAY,GAAG,6BAA6B,CAAC;AAC1D,MAAM,CAAC,MAAM,WAAW,GAAG,4BAA4B,CAAC;AACxD,MAAM,CAAC,MAAM,WAAW,GAAG,4BAA4B,CAAC;AACxD,MAAM,CAAC,MAAM,aAAa,GAAG,8BAA8B,CAAC;AAC5D,MAAM,CAAC,MAAM,kBAAkB,GAAG,mCAAmC,CAAC;AACtE,MAAM,CAAC,MAAM,WAAW,GAAG,4BAA4B,CAAC;AAExD,iDAAiD;AACjD,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\nimport type { IntentShimPlugin } from './definitions';\n\n// Register the plugin with web fallback\nconst IntentShim = registerPlugin<IntentShimPlugin>('IntentShim', {\n web: () => import('./web').then(m => new m.IntentShimWeb()),\n});\n\n// Export constants for direct usage in client code, matching the Cordova plugin's API\nexport const ACTION_SEND = 'android.intent.action.SEND';\nexport const ACTION_VIEW = 'android.intent.action.VIEW';\nexport const EXTRA_TEXT = 'android.intent.extra.TEXT';\nexport const EXTRA_SUBJECT = 'android.intent.extra.SUBJECT';\nexport const EXTRA_STREAM = 'android.intent.extra.STREAM';\nexport const EXTRA_EMAIL = 'android.intent.extra.EMAIL';\nexport const ACTION_CALL = 'android.intent.action.CALL';\nexport const ACTION_SENDTO = 'android.intent.action.SENDTO';\nexport const ACTION_GET_CONTENT = 'android.intent.action.GET_CONTENT';\nexport const ACTION_PICK = 'android.intent.action.PICK';\n\n// Export the plugin interface and implementation\nexport * from './definitions';\nexport { IntentShim };\n"]}
|
package/package.json
CHANGED
package/plugin.cjs.js
CHANGED
|
@@ -4,8 +4,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var core = require('@capacitor/core');
|
|
6
6
|
|
|
7
|
-
// Register the plugin
|
|
8
|
-
const IntentShim = core.registerPlugin('IntentShim'
|
|
7
|
+
// Register the plugin with web fallback
|
|
8
|
+
const IntentShim = core.registerPlugin('IntentShim', {
|
|
9
|
+
web: () => Promise.resolve().then(function () { return web; }).then(m => new m.IntentShimWeb()),
|
|
10
|
+
});
|
|
9
11
|
// Export constants for direct usage in client code, matching the Cordova plugin's API
|
|
10
12
|
const ACTION_SEND = 'android.intent.action.SEND';
|
|
11
13
|
const ACTION_VIEW = 'android.intent.action.VIEW';
|
|
@@ -18,6 +20,97 @@ const ACTION_SENDTO = 'android.intent.action.SENDTO';
|
|
|
18
20
|
const ACTION_GET_CONTENT = 'android.intent.action.GET_CONTENT';
|
|
19
21
|
const ACTION_PICK = 'android.intent.action.PICK';
|
|
20
22
|
|
|
23
|
+
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
24
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
25
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
26
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
27
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
28
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
29
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
class IntentShimWeb extends core.WebPlugin {
|
|
33
|
+
constructor() {
|
|
34
|
+
super();
|
|
35
|
+
this.intentListeners = [];
|
|
36
|
+
this.debug = false;
|
|
37
|
+
this.log('IntentShim Web: Initialized');
|
|
38
|
+
}
|
|
39
|
+
registerBroadcastReceiver(options) {
|
|
40
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
this.log(`IntentShim Web: registerBroadcastReceiver with filters ${JSON.stringify(options.filterActions)}`);
|
|
42
|
+
throw this.unimplemented('Not available in web environment');
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
unregisterBroadcastReceiver() {
|
|
46
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
this.log('IntentShim Web: unregisterBroadcastReceiver');
|
|
48
|
+
throw this.unimplemented('Not available in web environment');
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
sendBroadcast(options) {
|
|
52
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
this.log(`IntentShim Web: sendBroadcast ${options.action}`);
|
|
54
|
+
throw this.unimplemented('Not available in web environment');
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
startActivity(options) {
|
|
58
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
this.log(`IntentShim Web: startActivity ${options.action}`);
|
|
60
|
+
// For web, we can at least try to open URLs
|
|
61
|
+
if (options.url && options.action === 'android.intent.action.VIEW') {
|
|
62
|
+
window.open(options.url, '_blank');
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
throw this.unimplemented('Full intent functionality not available in web environment');
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
getIntent() {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
this.log('IntentShim Web: getIntent');
|
|
71
|
+
throw this.unimplemented('Not available in web environment');
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
startActivityForResult(options) {
|
|
75
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
+
this.log(`IntentShim Web: startActivityForResult ${options.action}`);
|
|
77
|
+
throw this.unimplemented('Not available in web environment');
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
sendResult(options) {
|
|
81
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
82
|
+
this.log(`IntentShim Web: sendResult with resultCode ${options.resultCode || 'none'} and extras ${JSON.stringify(options.extras || {})}`);
|
|
83
|
+
throw this.unimplemented('Not available in web environment');
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
onIntent(callback) {
|
|
87
|
+
this.log('IntentShim Web: onIntent listener registered');
|
|
88
|
+
this.intentListeners.push(callback);
|
|
89
|
+
}
|
|
90
|
+
packageExists(packageName) {
|
|
91
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
92
|
+
this.log(`IntentShim Web: packageExists ${packageName}`);
|
|
93
|
+
return { exists: false };
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
setDebugMode(options) {
|
|
97
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
98
|
+
this.debug = options.enabled;
|
|
99
|
+
this.log(`IntentShim Web: Debug mode ${options.enabled ? 'enabled' : 'disabled'}`);
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
log(message) {
|
|
103
|
+
if (this.debug) {
|
|
104
|
+
console.log(message);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
var web = /*#__PURE__*/Object.freeze({
|
|
110
|
+
__proto__: null,
|
|
111
|
+
IntentShimWeb: IntentShimWeb
|
|
112
|
+
});
|
|
113
|
+
|
|
21
114
|
exports.ACTION_CALL = ACTION_CALL;
|
|
22
115
|
exports.ACTION_GET_CONTENT = ACTION_GET_CONTENT;
|
|
23
116
|
exports.ACTION_PICK = ACTION_PICK;
|
package/plugin.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\n// Register the plugin\nconst IntentShim = registerPlugin('IntentShim');\n// Export constants for direct usage in client code, matching the Cordova plugin's API\nexport const ACTION_SEND = 'android.intent.action.SEND';\nexport const ACTION_VIEW = 'android.intent.action.VIEW';\nexport const EXTRA_TEXT = 'android.intent.extra.TEXT';\nexport const EXTRA_SUBJECT = 'android.intent.extra.SUBJECT';\nexport const EXTRA_STREAM = 'android.intent.extra.STREAM';\nexport const EXTRA_EMAIL = 'android.intent.extra.EMAIL';\nexport const ACTION_CALL = 'android.intent.action.CALL';\nexport const ACTION_SENDTO = 'android.intent.action.SENDTO';\nexport const ACTION_GET_CONTENT = 'android.intent.action.GET_CONTENT';\nexport const ACTION_PICK = 'android.intent.action.PICK';\n// Export the plugin interface and implementation\nexport * from './definitions';\nexport { IntentShim };\n//# sourceMappingURL=index.js.map"],"names":["registerPlugin"],"mappings":";;;;;;AACA;AACK,MAAC,UAAU,GAAGA,mBAAc,CAAC,YAAY,EAAE;AAChD;AACY,MAAC,WAAW,GAAG,6BAA6B;AAC5C,MAAC,WAAW,GAAG,6BAA6B;AAC5C,MAAC,UAAU,GAAG,4BAA4B;AAC1C,MAAC,aAAa,GAAG,+BAA+B;AAChD,MAAC,YAAY,GAAG,8BAA8B;AAC9C,MAAC,WAAW,GAAG,6BAA6B;AAC5C,MAAC,WAAW,GAAG,6BAA6B;AAC5C,MAAC,aAAa,GAAG,+BAA+B;AAChD,MAAC,kBAAkB,GAAG,oCAAoC;AAC1D,MAAC,WAAW,GAAG
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\n// Register the plugin with web fallback\nconst IntentShim = registerPlugin('IntentShim', {\n web: () => import('./web').then(m => new m.IntentShimWeb()),\n});\n// Export constants for direct usage in client code, matching the Cordova plugin's API\nexport const ACTION_SEND = 'android.intent.action.SEND';\nexport const ACTION_VIEW = 'android.intent.action.VIEW';\nexport const EXTRA_TEXT = 'android.intent.extra.TEXT';\nexport const EXTRA_SUBJECT = 'android.intent.extra.SUBJECT';\nexport const EXTRA_STREAM = 'android.intent.extra.STREAM';\nexport const EXTRA_EMAIL = 'android.intent.extra.EMAIL';\nexport const ACTION_CALL = 'android.intent.action.CALL';\nexport const ACTION_SENDTO = 'android.intent.action.SENDTO';\nexport const ACTION_GET_CONTENT = 'android.intent.action.GET_CONTENT';\nexport const ACTION_PICK = 'android.intent.action.PICK';\n// Export the plugin interface and implementation\nexport * from './definitions';\nexport { IntentShim };\n//# sourceMappingURL=index.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { WebPlugin } from '@capacitor/core';\nexport class IntentShimWeb extends WebPlugin {\n constructor() {\n super();\n this.intentListeners = [];\n this.debug = false;\n this.log('IntentShim Web: Initialized');\n }\n registerBroadcastReceiver(options) {\n return __awaiter(this, void 0, void 0, function* () {\n this.log(`IntentShim Web: registerBroadcastReceiver with filters ${JSON.stringify(options.filterActions)}`);\n throw this.unimplemented('Not available in web environment');\n });\n }\n unregisterBroadcastReceiver() {\n return __awaiter(this, void 0, void 0, function* () {\n this.log('IntentShim Web: unregisterBroadcastReceiver');\n throw this.unimplemented('Not available in web environment');\n });\n }\n sendBroadcast(options) {\n return __awaiter(this, void 0, void 0, function* () {\n this.log(`IntentShim Web: sendBroadcast ${options.action}`);\n throw this.unimplemented('Not available in web environment');\n });\n }\n startActivity(options) {\n return __awaiter(this, void 0, void 0, function* () {\n this.log(`IntentShim Web: startActivity ${options.action}`);\n // For web, we can at least try to open URLs\n if (options.url && options.action === 'android.intent.action.VIEW') {\n window.open(options.url, '_blank');\n return;\n }\n throw this.unimplemented('Full intent functionality not available in web environment');\n });\n }\n getIntent() {\n return __awaiter(this, void 0, void 0, function* () {\n this.log('IntentShim Web: getIntent');\n throw this.unimplemented('Not available in web environment');\n });\n }\n startActivityForResult(options) {\n return __awaiter(this, void 0, void 0, function* () {\n this.log(`IntentShim Web: startActivityForResult ${options.action}`);\n throw this.unimplemented('Not available in web environment');\n });\n }\n sendResult(options) {\n return __awaiter(this, void 0, void 0, function* () {\n this.log(`IntentShim Web: sendResult with resultCode ${options.resultCode || 'none'} and extras ${JSON.stringify(options.extras || {})}`);\n throw this.unimplemented('Not available in web environment');\n });\n }\n onIntent(callback) {\n this.log('IntentShim Web: onIntent listener registered');\n this.intentListeners.push(callback);\n }\n packageExists(packageName) {\n return __awaiter(this, void 0, void 0, function* () {\n this.log(`IntentShim Web: packageExists ${packageName}`);\n return { exists: false };\n });\n }\n setDebugMode(options) {\n return __awaiter(this, void 0, void 0, function* () {\n this.debug = options.enabled;\n this.log(`IntentShim Web: Debug mode ${options.enabled ? 'enabled' : 'disabled'}`);\n });\n }\n log(message) {\n if (this.debug) {\n console.log(message);\n }\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","this","WebPlugin"],"mappings":";;;;;;AACA;AACK,MAAC,UAAU,GAAGA,mBAAc,CAAC,YAAY,EAAE;AAChD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;AAC/D,CAAC,EAAE;AACH;AACY,MAAC,WAAW,GAAG,6BAA6B;AAC5C,MAAC,WAAW,GAAG,6BAA6B;AAC5C,MAAC,UAAU,GAAG,4BAA4B;AAC1C,MAAC,aAAa,GAAG,+BAA+B;AAChD,MAAC,YAAY,GAAG,8BAA8B;AAC9C,MAAC,WAAW,GAAG,6BAA6B;AAC5C,MAAC,WAAW,GAAG,6BAA6B;AAC5C,MAAC,aAAa,GAAG,+BAA+B;AAChD,MAAC,kBAAkB,GAAG,oCAAoC;AAC1D,MAAC,WAAW,GAAG;;ACf3B,IAAI,SAAS,GAAG,CAACC,SAAI,IAAIA,SAAI,CAAC,SAAS,KAAK,UAAU,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE;AACzF,IAAI,SAAS,KAAK,CAAC,KAAK,EAAE,EAAE,OAAO,KAAK,YAAY,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,UAAU,OAAO,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE;AAChH,IAAI,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,EAAE,UAAU,OAAO,EAAE,MAAM,EAA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AC,WAAW,EAAE;AAC/B,QAAQ,OAAO,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,KAAK,CAAC,EAAE,aAAa;AAC5D,YAAY,IAAI,CAAC,GAAG,CAAC,CAAC,8BAA8B,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;AACrE,YAAY,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;AACrC,SAAS,CAAC,CAAC;AACX,KAAK;AACL,IAAI,YAAY,CAAC,OAAO,EAAE;AAC1B,QAAQ,OAAO,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,KAAK,CAAC,EAAE,aAAa;AAC5D,YAAY,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC;AACzC,YAAY,IAAI,CAAC,GAAG,CAAC,CAAC,2BAA2B,EAAE,OAAO,CAAC,OAAO,GAAG,SAAS,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;AAC/F,SAAS,CAAC,CAAC;AACX,KAAK;AACL,IAAI,GAAG,CAAC,OAAO,EAAE;AACjB,QAAQ,IAAI,IAAI,CAAC,KAAK,EAAE;AACxB,YAAY,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACjC,SAAS;AACT,KAAK;AACL;;;;;;;;;;;;;;;;;;;"}
|
package/plugin.js
CHANGED
|
@@ -1,35 +1,128 @@
|
|
|
1
1
|
var capacitorIntentShim = (function (exports, core) {
|
|
2
|
-
|
|
2
|
+
'use strict';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
4
|
+
// Register the plugin with web fallback
|
|
5
|
+
const IntentShim = core.registerPlugin('IntentShim', {
|
|
6
|
+
web: () => Promise.resolve().then(function () { return web; }).then(m => new m.IntentShimWeb()),
|
|
7
|
+
});
|
|
8
|
+
// Export constants for direct usage in client code, matching the Cordova plugin's API
|
|
9
|
+
const ACTION_SEND = 'android.intent.action.SEND';
|
|
10
|
+
const ACTION_VIEW = 'android.intent.action.VIEW';
|
|
11
|
+
const EXTRA_TEXT = 'android.intent.extra.TEXT';
|
|
12
|
+
const EXTRA_SUBJECT = 'android.intent.extra.SUBJECT';
|
|
13
|
+
const EXTRA_STREAM = 'android.intent.extra.STREAM';
|
|
14
|
+
const EXTRA_EMAIL = 'android.intent.extra.EMAIL';
|
|
15
|
+
const ACTION_CALL = 'android.intent.action.CALL';
|
|
16
|
+
const ACTION_SENDTO = 'android.intent.action.SENDTO';
|
|
17
|
+
const ACTION_GET_CONTENT = 'android.intent.action.GET_CONTENT';
|
|
18
|
+
const ACTION_PICK = 'android.intent.action.PICK';
|
|
17
19
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
21
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
22
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
23
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
24
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
25
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
26
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
class IntentShimWeb extends core.WebPlugin {
|
|
30
|
+
constructor() {
|
|
31
|
+
super();
|
|
32
|
+
this.intentListeners = [];
|
|
33
|
+
this.debug = false;
|
|
34
|
+
this.log('IntentShim Web: Initialized');
|
|
35
|
+
}
|
|
36
|
+
registerBroadcastReceiver(options) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
this.log(`IntentShim Web: registerBroadcastReceiver with filters ${JSON.stringify(options.filterActions)}`);
|
|
39
|
+
throw this.unimplemented('Not available in web environment');
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
unregisterBroadcastReceiver() {
|
|
43
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
+
this.log('IntentShim Web: unregisterBroadcastReceiver');
|
|
45
|
+
throw this.unimplemented('Not available in web environment');
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
sendBroadcast(options) {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
this.log(`IntentShim Web: sendBroadcast ${options.action}`);
|
|
51
|
+
throw this.unimplemented('Not available in web environment');
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
startActivity(options) {
|
|
55
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
this.log(`IntentShim Web: startActivity ${options.action}`);
|
|
57
|
+
// For web, we can at least try to open URLs
|
|
58
|
+
if (options.url && options.action === 'android.intent.action.VIEW') {
|
|
59
|
+
window.open(options.url, '_blank');
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
throw this.unimplemented('Full intent functionality not available in web environment');
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
getIntent() {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
this.log('IntentShim Web: getIntent');
|
|
68
|
+
throw this.unimplemented('Not available in web environment');
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
startActivityForResult(options) {
|
|
72
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
73
|
+
this.log(`IntentShim Web: startActivityForResult ${options.action}`);
|
|
74
|
+
throw this.unimplemented('Not available in web environment');
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
sendResult(options) {
|
|
78
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
+
this.log(`IntentShim Web: sendResult with resultCode ${options.resultCode || 'none'} and extras ${JSON.stringify(options.extras || {})}`);
|
|
80
|
+
throw this.unimplemented('Not available in web environment');
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
onIntent(callback) {
|
|
84
|
+
this.log('IntentShim Web: onIntent listener registered');
|
|
85
|
+
this.intentListeners.push(callback);
|
|
86
|
+
}
|
|
87
|
+
packageExists(packageName) {
|
|
88
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
89
|
+
this.log(`IntentShim Web: packageExists ${packageName}`);
|
|
90
|
+
return { exists: false };
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
setDebugMode(options) {
|
|
94
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
95
|
+
this.debug = options.enabled;
|
|
96
|
+
this.log(`IntentShim Web: Debug mode ${options.enabled ? 'enabled' : 'disabled'}`);
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
log(message) {
|
|
100
|
+
if (this.debug) {
|
|
101
|
+
console.log(message);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
29
105
|
|
|
30
|
-
|
|
106
|
+
var web = /*#__PURE__*/Object.freeze({
|
|
107
|
+
__proto__: null,
|
|
108
|
+
IntentShimWeb: IntentShimWeb
|
|
109
|
+
});
|
|
31
110
|
|
|
32
|
-
|
|
111
|
+
exports.ACTION_CALL = ACTION_CALL;
|
|
112
|
+
exports.ACTION_GET_CONTENT = ACTION_GET_CONTENT;
|
|
113
|
+
exports.ACTION_PICK = ACTION_PICK;
|
|
114
|
+
exports.ACTION_SEND = ACTION_SEND;
|
|
115
|
+
exports.ACTION_SENDTO = ACTION_SENDTO;
|
|
116
|
+
exports.ACTION_VIEW = ACTION_VIEW;
|
|
117
|
+
exports.EXTRA_EMAIL = EXTRA_EMAIL;
|
|
118
|
+
exports.EXTRA_STREAM = EXTRA_STREAM;
|
|
119
|
+
exports.EXTRA_SUBJECT = EXTRA_SUBJECT;
|
|
120
|
+
exports.EXTRA_TEXT = EXTRA_TEXT;
|
|
121
|
+
exports.IntentShim = IntentShim;
|
|
122
|
+
|
|
123
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
124
|
+
|
|
125
|
+
return exports;
|
|
33
126
|
|
|
34
127
|
})({}, capacitorExports);
|
|
35
128
|
//# sourceMappingURL=plugin.js.map
|
package/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/index.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\n// Register the plugin\nconst IntentShim = registerPlugin('IntentShim');\n// Export constants for direct usage in client code, matching the Cordova plugin's API\nexport const ACTION_SEND = 'android.intent.action.SEND';\nexport const ACTION_VIEW = 'android.intent.action.VIEW';\nexport const EXTRA_TEXT = 'android.intent.extra.TEXT';\nexport const EXTRA_SUBJECT = 'android.intent.extra.SUBJECT';\nexport const EXTRA_STREAM = 'android.intent.extra.STREAM';\nexport const EXTRA_EMAIL = 'android.intent.extra.EMAIL';\nexport const ACTION_CALL = 'android.intent.action.CALL';\nexport const ACTION_SENDTO = 'android.intent.action.SENDTO';\nexport const ACTION_GET_CONTENT = 'android.intent.action.GET_CONTENT';\nexport const ACTION_PICK = 'android.intent.action.PICK';\n// Export the plugin interface and implementation\nexport * from './definitions';\nexport { IntentShim };\n//# sourceMappingURL=index.js.map"],"names":["registerPlugin"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\n// Register the plugin with web fallback\nconst IntentShim = registerPlugin('IntentShim', {\n web: () => import('./web').then(m => new m.IntentShimWeb()),\n});\n// Export constants for direct usage in client code, matching the Cordova plugin's API\nexport const ACTION_SEND = 'android.intent.action.SEND';\nexport const ACTION_VIEW = 'android.intent.action.VIEW';\nexport const EXTRA_TEXT = 'android.intent.extra.TEXT';\nexport const EXTRA_SUBJECT = 'android.intent.extra.SUBJECT';\nexport const EXTRA_STREAM = 'android.intent.extra.STREAM';\nexport const EXTRA_EMAIL = 'android.intent.extra.EMAIL';\nexport const ACTION_CALL = 'android.intent.action.CALL';\nexport const ACTION_SENDTO = 'android.intent.action.SENDTO';\nexport const ACTION_GET_CONTENT = 'android.intent.action.GET_CONTENT';\nexport const ACTION_PICK = 'android.intent.action.PICK';\n// Export the plugin interface and implementation\nexport * from './definitions';\nexport { IntentShim };\n//# sourceMappingURL=index.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { WebPlugin } from '@capacitor/core';\nexport class IntentShimWeb extends WebPlugin {\n constructor() {\n super();\n this.intentListeners = [];\n this.debug = false;\n this.log('IntentShim Web: Initialized');\n }\n registerBroadcastReceiver(options) {\n return __awaiter(this, void 0, void 0, function* () {\n this.log(`IntentShim Web: registerBroadcastReceiver with filters ${JSON.stringify(options.filterActions)}`);\n throw this.unimplemented('Not available in web environment');\n });\n }\n unregisterBroadcastReceiver() {\n return __awaiter(this, void 0, void 0, function* () {\n this.log('IntentShim Web: unregisterBroadcastReceiver');\n throw this.unimplemented('Not available in web environment');\n });\n }\n sendBroadcast(options) {\n return __awaiter(this, void 0, void 0, function* () {\n this.log(`IntentShim Web: sendBroadcast ${options.action}`);\n throw this.unimplemented('Not available in web environment');\n });\n }\n startActivity(options) {\n return __awaiter(this, void 0, void 0, function* () {\n this.log(`IntentShim Web: startActivity ${options.action}`);\n // For web, we can at least try to open URLs\n if (options.url && options.action === 'android.intent.action.VIEW') {\n window.open(options.url, '_blank');\n return;\n }\n throw this.unimplemented('Full intent functionality not available in web environment');\n });\n }\n getIntent() {\n return __awaiter(this, void 0, void 0, function* () {\n this.log('IntentShim Web: getIntent');\n throw this.unimplemented('Not available in web environment');\n });\n }\n startActivityForResult(options) {\n return __awaiter(this, void 0, void 0, function* () {\n this.log(`IntentShim Web: startActivityForResult ${options.action}`);\n throw this.unimplemented('Not available in web environment');\n });\n }\n sendResult(options) {\n return __awaiter(this, void 0, void 0, function* () {\n this.log(`IntentShim Web: sendResult with resultCode ${options.resultCode || 'none'} and extras ${JSON.stringify(options.extras || {})}`);\n throw this.unimplemented('Not available in web environment');\n });\n }\n onIntent(callback) {\n this.log('IntentShim Web: onIntent listener registered');\n this.intentListeners.push(callback);\n }\n packageExists(packageName) {\n return __awaiter(this, void 0, void 0, function* () {\n this.log(`IntentShim Web: packageExists ${packageName}`);\n return { exists: false };\n });\n }\n setDebugMode(options) {\n return __awaiter(this, void 0, void 0, function* () {\n this.debug = options.enabled;\n this.log(`IntentShim Web: Debug mode ${options.enabled ? 'enabled' : 'disabled'}`);\n });\n }\n log(message) {\n if (this.debug) {\n console.log(message);\n }\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","this","WebPlugin"],"mappings":";;;IACA;AACK,UAAC,UAAU,GAAGA,mBAAc,CAAC,YAAY,EAAE;IAChD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;IAC/D,CAAC,EAAE;IACH;AACY,UAAC,WAAW,GAAG,6BAA6B;AAC5C,UAAC,WAAW,GAAG,6BAA6B;AAC5C,UAAC,UAAU,GAAG,4BAA4B;AAC1C,UAAC,aAAa,GAAG,+BAA+B;AAChD,UAAC,YAAY,GAAG,8BAA8B;AAC9C,UAAC,WAAW,GAAG,6BAA6B;AAC5C,UAAC,WAAW,GAAG,6BAA6B;AAC5C,UAAC,aAAa,GAAG,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