@hanwha-ss1/plugin 0.4.4 → 0.4.5

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.
@@ -110,9 +110,10 @@ public class LinkerPlugin extends Plugin{
110
110
  String url = call.getString("url");
111
111
  boolean isExternal = Boolean.TRUE.equals(call.getBoolean("ext"));
112
112
  boolean hasClose = Boolean.TRUE.equals(call.getBoolean("isCloseBtn"));
113
+ boolean clear = Boolean.TRUE.equals(call.getBoolean("clear"));
113
114
  if(openBrowserImplementation == null) {
114
115
  openBrowserImplementation = new OpenBrowser();
115
116
  }
116
- openBrowserImplementation.open(getActivity(), url, isExternal, hasClose);
117
+ openBrowserImplementation.open(getActivity(), url, isExternal, hasClose, clear);
117
118
  }
118
119
  }
@@ -84,7 +84,6 @@ public class WebViewActivity extends AppCompatActivity {
84
84
  webView.getSettings().setDisplayZoomControls(false);
85
85
  webView.getSettings().setLoadWithOverviewMode(true);
86
86
  webView.getSettings().setUseWideViewPort(true);
87
- // webView.setWebChromeClient(new ChromeClient((Activity)this));
88
87
  webView.setWebChromeClient(new ChromeClient(this) {
89
88
  @Override
90
89
  public boolean onShowFileChooser(WebView webView, ValueCallback<Uri[]> filePathCallback, FileChooserParams fileChooserParams) {
@@ -92,9 +91,8 @@ public class WebViewActivity extends AppCompatActivity {
92
91
 
93
92
  Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
94
93
  intent.addCategory(Intent.CATEGORY_OPENABLE);
95
- intent.setType("image/*");
94
+ intent.setType("*/*");
96
95
 
97
- // startActivityForResult(intent, 0);
98
96
  startActivityResult.launch(intent);
99
97
  return true;
100
98
  }
@@ -105,16 +103,20 @@ public class WebViewActivity extends AppCompatActivity {
105
103
  public boolean shouldOverrideUrlLoading(WebView view, String url) {
106
104
  if(url.startsWith("close://")){
107
105
  WebViewActivity.this.finish();
106
+ return true;
108
107
  } else if(url.startsWith("tel:")){
109
108
  Intent intent = new Intent(Intent.ACTION_DIAL);
110
109
  intent.setData(Uri.parse(url));
111
110
  startActivity(intent);
111
+ return true;
112
112
  } else if(url.startsWith("sms:")){
113
113
  Intent intent = new Intent(Intent.ACTION_SENDTO);
114
114
  intent.setData(Uri.parse(url));
115
115
  startActivity(intent);
116
+ return true;
117
+ } else {
118
+ return super.shouldOverrideUrlLoading(view, url);
116
119
  }
117
- return super.shouldOverrideUrlLoading(view, url);
118
120
  }
119
121
  });
120
122
 
@@ -3,7 +3,7 @@ import Capacitor
3
3
  import Contacts
4
4
  /**
5
5
  * Please read the Capacitor iOS Plugin Development Guide
6
- * here: https://capacitorjs.com/docs/plugins/ios dd
6
+ * here: https://capacitorjs.com/docs/plugins/ios
7
7
  */
8
8
 
9
9
  public class AuthPlugin: CAPPlugin {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanwha-ss1/plugin",
3
- "version": "0.4.4",
3
+ "version": "0.4.5",
4
4
  "description": "Plugin",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",