@aigens/aigens-sdk-core 0.0.11 → 0.0.12

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.
@@ -48,16 +48,25 @@ public class WebContainerActivity extends BridgeActivity {
48
48
  private Map member;
49
49
  private Map deeplink;
50
50
  private boolean ENVIRONMENT_PRODUCTION = true;
51
+ private String[] shouldRedirectList = new String[] {
52
+ "/scan?",
53
+ "/qr?",
54
+ "//scan",
55
+ "/api/v1/pay",
56
+ "/api/v1/wechat",
57
+ "/api/v1/qfpaywechat"
58
+ };
51
59
  private List<String> externalProtocols = new ArrayList<String>(){{
52
60
  add("octopus://");
53
61
  add("alipay://");
54
62
  add("alipays://");
55
63
  add("alipayhk://");
64
+ add("weixin://");
56
65
  add("tel:");
57
66
  add("mailto:");
58
67
  add("payme://");
59
- add("weixin://");
60
68
  add("https://play.google.com");
69
+ add("hsbcpaymepay://");
61
70
  }};
62
71
 
63
72
  private void debug(Object... msgs){
@@ -311,11 +320,12 @@ public class WebContainerActivity extends BridgeActivity {
311
320
  public WebResourceResponse shouldInterceptRequest(WebResourceRequest request) {
312
321
 
313
322
  // Fixed: Sometimes the plugin cannot be loaded
314
- String currentUrl = request.getUrl().toString();
315
- if (currentUrl.equals(originUrl)) {
316
- return bridge.getLocalServer().shouldInterceptRequest(request);
317
- }
318
- return null;
323
+ // String currentUrl = request.getUrl().toString();
324
+ // if (currentUrl.equals(originUrl)) {
325
+ // return bridge.getLocalServer().shouldInterceptRequest(request);
326
+ // }
327
+ // return null;
328
+ return bridge.getLocalServer().shouldInterceptRequest(request);
319
329
  }
320
330
  });
321
331
  }
@@ -454,17 +464,26 @@ public class WebContainerActivity extends BridgeActivity {
454
464
  String url = request.getUrl().toString();
455
465
  //debug("shouldInterceptRequest", url);
456
466
 
467
+ Log.wtf("shouldInterceptRequestUrl:", url);
468
+
457
469
 
458
470
 
459
471
  //support redirect from /scan
460
- if(url.indexOf("/scan?") > 0 || url.indexOf("/qr?") > 0 || url.indexOf("//scan") > 0){
461
- return null;
462
- }
472
+ // for (String r: shouldRedirectList) {
473
+ // if (url.indexOf(r) > 0) {
474
+ // return null;
475
+ // }
476
+ // }
477
+
478
+ // call super.shouldInterceptRequest(view, request); at: disableServiceWorker method
479
+ return null;
480
+
481
+ // if(url.indexOf("/scan?") > 0 || url.indexOf("/qr?") > 0 || url.indexOf("//scan") > 0){
482
+ // return null;
483
+ // }
463
484
 
464
- return super.shouldInterceptRequest(view, request);
485
+ // return super.shouldInterceptRequest(view, request);
465
486
 
466
- //super.shouldInterceptRequest(view, request);
467
- //return null;
468
487
  }
469
488
 
470
489
 
@@ -15,7 +15,7 @@ import Capacitor
15
15
  public var options: Dictionary<String, Any>?
16
16
 
17
17
  var externalProtocols: [String] = [
18
- "octopus://", "alipay://", "alipays://", "alipayhk://", "https://itunes.apple.com", "tel:", "mailto:", "itms-apps://itunes.apple.com", "https://apps.apple.com", "payme://", "weixin://"
18
+ "octopus://", "alipay://", "alipays://", "alipayhk://", "https://itunes.apple.com", "tel:", "mailto:", "itms-apps://itunes.apple.com", "https://apps.apple.com", "payme://", "weixin://", "hsbcpaymepay://"
19
19
  ]
20
20
  let containerView = WebContainer.webContainer()
21
21
  var webContainerView: WebContainer {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aigens/aigens-sdk-core",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "description": "Aigens Order.Place Core Plugin",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",