@@ -36,7 +36,6 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
3636 setContentView (R .layout .activity_webapp );
3737 webview = findViewById (R .id .webview );
3838 webview .setWebViewClient (new BWebviewClient ());
39- webview .getSettings ().setUserAgentString ("HINTER/Android" );
4039
4140 webview .setWebChromeClient (new BChromeClient ());
4241 webview .addJavascriptInterface (new WebAppBridge (this ), "Android" );
@@ -140,11 +139,22 @@ public boolean shouldOverrideUrlLoading(WebView view, String url) {
140139 else
141140 return true ;
142141 } else if (isSpecialCase (url )) {
143- return start (intent , view .getContext ());
142+ if (isExistInfo (intent , view .getContext ()) || isExistPackage (intent , view .getContext ()))
143+ return start (intent , view .getContext ());
144+ else
145+ return gotoMarket (intent , view .getContext ());
144146 }
145147 return url .contains ("https://bootpaymark" );
146148 }
147149
150+ private Boolean isSpecialCase (String url ) {
151+ return url .matches ("^shinhan\\ S+$" )
152+ || url .startsWith ("kftc-bankpay://" )
153+ || url .startsWith ("v3mobileplusweb://" )
154+ || url .startsWith ("hdcardappcardansimclick://" )
155+ || url .startsWith ("mpocket.online.ansimclick://" );
156+ }
157+
148158 private Intent parse (String url ) {
149159 try {
150160 return Intent .parseUri (url , Intent .URI_INTENT_SCHEME );
@@ -162,9 +172,7 @@ private Boolean isMarket(String url) {
162172 return url .matches ("^market://\\ S+$" );
163173 }
164174
165- private Boolean isSpecialCase (String url ) {
166- return url .matches ("^shinhan\\ S+$" ) || url .startsWith ("kftc-bankpay://" ) || url .startsWith ("v3mobileplusweb://" );
167- }
175+
168176
169177 private Boolean isExistInfo (Intent intent , Context context ) {
170178 try {
0 commit comments