vknow360 / customwebview Goto Github PK
View Code? Open in Web Editor NEWAn extended form of WebViewer with more customization and flexibility (For MIT AI2 and its distros)
Home Page: https://vknow360.github.io/CustomWebView/
License: MIT License
An extended form of WebViewer with more customization and flexibility (For MIT AI2 and its distros)
Home Page: https://vknow360.github.io/CustomWebView/
License: MIT License
Hello! First of all, I would like to express my sincere gratitude for this project, as it has provided me with significant convenience and serves as an excellent extension.
However, the current API required for this extension is 21, which is somewhat outdated for the latest Android version. I was wondering if there is any plan to create a higher version? I'm not sure if this would be a lot of trouble, But I still want to ask.Thank you.
Could support be added to download blob:
URLs? I have done some research on how this could be done. I found this issue which sounds like the current problem with downloading blob URLs. I made the following code to take care of a few concerns I had about the examples' code.
(async function() {
const blobUrl = null; // Some blob URL from App Inventor.
const { revokeObjectURL } = URL; // Backup the original URL.revokeObjectURL method
const restoreRevokeObjectURL = () => URL.revokeObjectURL = revokeObjectURL; // Restore the URL.revokeObjectURL method
let Blob2Base64Finished = false;
// Temporarily make the blob URL being downloaded not revocable.
(function(url) {
url.revokeObjectURL = objectUrl => {
// Incase a different blob URL needs to be revoked
if(objectUrl != blobUrl) {
revokeObjectURL(objectUrl);
}
// Skip the interval check if it already completed
if(Blob2Base64Finished === true) {
revokeObjectURL(objectUrl);
restoreRevokeObjectURL();
} else {
const interval = setInterval(() => {
if(Blob2Base64Finished === true) {
clearInterval(interval);
revokeObjectURL(objectUrl);
restoreRevokeObjectURL();
}
}, 100);
}
}
})(URL)
// Convert a blob to a data URL
function Base64PromiseFileReader(blob) {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.addEventListener("loadend", () => resolve(reader.result));
reader.addEventListener("onerror", e => reject(e));
reader.readAsDataURL(blob);
});
}
function readBlobUrl(blobUrl) {
return new Promise(async (resolve, reject) => {
try {
// Convert the blob URL to a blob
const blob = await (await fetch(blobUrl)).blob();
// Convert the blob to a data URL
resolve(await Base64PromiseFileReader(blob));
} catch(e) {
reject(e.message == "Failed to fetch" ? "Blob Revoked" : e);
}
});
}
const result = await readBlobUrl(blobUrl); // Get the data URL form the blob URL
Blob2Base64Finished = true; // Tell the modified URL.revokeObjectURL that converting the blob to a data URL was completed
// Gives the modified URL.revokeObjectURL a chance to run before replacing it with the original
setTimeout(() => restoreRevokeObjectURL(), 150);
// Return `result` to the app to be downloaded
})();
I don't know how hard it would be to actually implement the java part of this, but it looks like it would be pretty simple.
Thanks for this amazing extension @vknow360!
SetDarkMode in the beta version is using the setForceDark
function of Webview which isn't supported as of Android 13. Looks like we should be using setAlgorithmicDarkeningAllowed
instead.
See the note below:
The deprecated [setForceDark](https://developer.android.com/reference/androidx/webkit/WebSettingsCompat#setForceDark(android.webkit.WebSettings,int)) and related API are no-ops in apps with targetSdkVersion ≥ [TIRAMISU](https://developer.android.com/reference/android/os/Build.VERSION_CODES.html#TIRAMISU()), but they still apply to apps with targetSdkVersion<[TIRAMISU](https://developer.android.com/reference/android/os/Build.VERSION_CODES.html#TIRAMISU()).
More available here.
com.sunny.CustomWebView-modified.aix ( the smaller one)
or
com.sunny.CustomWebView.aix
?
Hello, first of all, thanks for this wonderful extension.
i am experiencing a problem, that whenever my web application calls an JS Alert, the WebView completely freezes.
Even when using the function blocks OnJsAlert & DismissJsAlert like in the screenshot below, i need to completely close the app to continue using the browser.
According to https://community.appinventor.mit.edu/t/alert-function-custom-webview/61882/10 and other forum posts, i am not the only one with this issue.
ADB is not very helpful (i think):
Would be great if this issue could easily be fixed. Thanks!
What and Where?
I encountered this problem after verifying that I was doing right according to the source code.
Error: in title.
I can't login to facebook even though I use "useragent". It gives a warning that you cannot log in from an embedded browser. How can I solve this problem?
the web site OK but when I click on select file form not work. I remember that this worked without problems since I developed an app before and if it worked. Could it be that we have to use another extension? Help please (urgent!!)
Hola!!, necesito ayuda. Uso la extensión CustomWebView en inventor, veo el sitio web bien, pero cuando hago clic en el formulario de selección de archivo no funciona. Recuerdo que esto funcionó sin problemas ya que desarrollé una aplicación antes y si funcionó. ¿Será que tengo que usar otra extensión? Ayuda por favor (¡urgente!!)
There is a payment option in my page which is loading inside CustomWebView. I used Chrome Custom Tab in Kodular which opens UPI apps like PhonePe, gpay, paytm etc if user selects them. Now i want to implement your CustomWebView. everything works well but UPI apps not opening/working as expected if user selects any of them inside CustomWebView. It opens Playstore Page of the app of user select anyone of them. For ex: if user selects Gpay then browser goes to playstore page of Gpay.
Note: i tested and found that, everything works good in companion. But in live app, playstore page opening.
would you like to fix the issue ?
I am using version 12,when i click Whatsapp button in my website through app it is not opening anything. The block diagram is as follows.
https://i.imgur.com/I15Z7qa.png
It is urgent so I would appreciate any help that I can get.
Thanks
Application keeps stopping for devices under API version 25 because of CustomWebView.
Here is topic
Exporting was always fine until I added this extension. Now the app is detected as a Trojan by Windows.
If a website requires access to camera or microfone this two permissions are needed,
android.webkit.resource.VIDEO_CAPTURE
android.webkit.resource.AUDIO_CAPTURE
webview raise the PermissionRequest but cant grant this two "missing grant permision blocks from version 4
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.