Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shouldOverrideUrlLoading not Working in realse #237

Closed
amrdesign opened this issue Dec 27, 2019 · 5 comments
Closed

shouldOverrideUrlLoading not Working in realse #237

amrdesign opened this issue Dec 27, 2019 · 5 comments

Comments

@amrdesign
Copy link

Hello shouldOverrideUrlLoading work on debug mode only , but in release not working

crossPlatform: InAppWebViewOptions( // useShouldOverrideUrlLoading: true,

`shouldOverrideUrlLoading: (InAppWebViewController controller, ShouldOverrideUrlLoadingRequest shouldOverrideUrlLoadingRequest){
print(shouldOverrideUrlLoadingRequest.url);

                         if (shouldOverrideUrlLoadingRequest.url.startsWith("tel:")) {
                           // launch myapp here
                           print('tel=>>>>>>>>>>>>>>');
                          launch(shouldOverrideUrlLoadingRequest.url);
                           return null;
                         }else if(shouldOverrideUrlLoadingRequest.url.startsWith("https://api.whatsapp.com")){
                           launch(shouldOverrideUrlLoadingRequest.url);
                           return null;
                          }else if(shouldOverrideUrlLoadingRequest.url.startsWith("mailto:")){
                           launch(shouldOverrideUrlLoadingRequest.url);
                           return null;
                         }else {
                           return webView.loadUrl(url: shouldOverrideUrlLoadingRequest.url);
                         }


                       },`
@amrdesign
Copy link
Author

i use

flutter_inappwebview: git: url: https://github.com/pichillilorenzo/flutter_inappwebview.git ref: master

@wj1234
Copy link

wj1234 commented Dec 31, 2019

在Android插件源码中将useShouldOverrideUrlLoading属性默认设置为true

@amrdesign
Copy link
Author

@wj1234 i use it but same

@wwwdata
Copy link
Contributor

wwwdata commented Feb 24, 2020

Can confirm this as well for Android production builds with the latest code from the master branch of this repo. Did you already identify the cause of the problem?

Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants