android-app-Test-FileProvider/app/assets/index.html

37 lines
1 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta content="width=device-width,initial-scale=1.0" name="viewport">
</head>
<style>
@keyframes wobble {
0% {
transform: scale(0.1);
opacity:0.0
}
100% {
transform: scale(1.0);
opacity:1.0
}
}
button {
font-size:14mm;
}
</style>
<body>
<h1>Webview</h1>
<h2> clicking those buttons starts <a href="https://developer.android.com/reference/android/content/Intent">intents</a> to open those files</h2>
<button onclick="myJavaScriptInterface.startActivity('foto.jpg')">foto.jpg</button><br>
<button onclick="myJavaScriptInterface.startActivity('test.pdf')">test.pdf</button><br>
<button onclick="myJavaScriptInterface.startActivity('index.html')">index.html</button><br>
<script>
window.addEventListener("error",(error)=>{
document.body.innerHTML = "<h1>error</h1><pre>" +
error.filename +
"\nline:" + error.lineno +
"\n"+error.message +"</pre>";
},false);
</script>
</body>
</html>