Comments (5)
webview callback this method onPageError(int errorCode, String description, String failingUrl)
the failingUrl is custom://showImage?image=http://www.pic.com/pic1.jpeg&image=http://www.pic1.com/pic2.jpeg
but i how can i tell the webview i had handled this url ???
from android-advancedwebview.
Thanks for your feedback!
Can you please log the values for all three of errorCode
, description
and failingUrl
from onPageError
? Thanks!
Why do you need the custom URL scheme at all? How do you load the page? How does the app transition to the gallery app? Can you show some more code excerpts?
Apart from that, can you please try if your custom URLs work with the original WebView
from the Android SDK instead of the enhanced version from this library?
from android-advancedwebview.
@mwaclawek Helllo,man~ Thanks for your help
The issue have already been solved. i use the original WebView,the code
`
@OverRide
public boolean shouldOverrideUrlLoading(WebView view, final String url) {
if (url.startsWith("custom://")) {
// This is my web site, so do not override; let my WebView load the page
if(mAdvanceListener!=null){
mAdvanceListener.onExternalPageRequest(url);
}
if(mWebView!=null){
mWebView.stopLoading();
}
return false;
}else{
view.loadUrl(url);
return true;
}
// return super.shouldOverrideUrlLoading(view, url);
}`
*why do you need the custom URL scheme at all? *
Because Server has a communicate protocol with Client
How do you load the page?
Please see the code
How does the app transition to the gallery app?
I am sorry that I didn't say it clearly. When the user clicks on the picture on the HTML,WebView will call the method "shouldOverrideUrlLoading(WebView view, final String ur)" the url like custom://showImage?image=http://www.pic.com/pic1.jpeg&image=http://www.pic1.com/pic2.jpeg
I analysis the url ,get the image's address and show in GalleryActivity(For browsing pictures)
from android-advancedwebview.
@tikkat3 Thanks for letting us now!
The issue have already been solved. i use the original WebView
Glad that it's working now. But does it work with this library, i.e. the AdvancedWebView
class, or only with the original WebView
class? Which component do you have in your layout?
from android-advancedwebview.
@mwaclawek use original WebView class , I suggest that ,AdvancedWebView add a method addScheme(String scheme) to handle custom url . We know that the structure of URI is scheme://host:port/path Thank you once again
from android-advancedwebview.
Related Issues (20)
- (Fullscreen) videos not working HOT 1
- Loading iframe inside webpage
- Is the XSS vulnerability fixed here? HOT 3
- Migrate to mavenCentral HOT 1
- Unable to view PDF From Amazon Service Url in AdvanceWebview. HOT 2
- Update AdvancedWebView and increase performance HOT 1
- Help to make downloads work in Jasonette-Android Advanced Webview Branch HOT 6
- Allow fullscreen mode ? HOT 1
- There is no loadHtml() command.
- Support to open google maps link with the google maps app HOT 1
- Datatables export buttons not working.
- Cannot cast my MainActivity into Advanced Webview Listener HOT 2
- Hide header and footer HOT 1
- Camera and audio permission issue
- Unresolved reference: im HOT 1
- Ask for photo on picture upload
- ANR HOT 1
- im.delight.android.webview.AdvancedWebView, was not found in the project or the libraries HOT 1
- How to disable webview navigate to another page?
- PDF URL does not get open
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-advancedwebview.