修复: 恢复WebView跨域设置(本设备必需) + 工作版index.html
This commit is contained in:
@@ -1 +1 @@
|
|||||||
0.1.0-dav-android-6|https://git.childish-ghost.com/LukeMackin/Yuzu-GCA/raw/branch/main/ota/h5/index-v6.html|79a254cfce0a44a33cc0e56a5beb167d68fc30205d5055c7be6e21f96753dff2
|
0.1.0-dav-android-6|https://git.childish-ghost.com/LukeMackin/Yuzu-GCA/raw/branch/main/ota/h5/index-v6.html
|
||||||
Binary file not shown.
@@ -1,2 +1,2 @@
|
|||||||
#Tue Jul 21 19:20:43 CST 2026
|
#Tue Jul 21 20:14:20 CST 2026
|
||||||
gradle.version=8.13
|
gradle.version=8.13
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -14,12 +14,15 @@ class MainActivity : AppCompatActivity() {
|
|||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
val wv = WebView(this).apply {
|
val wv = WebView(this).apply {
|
||||||
if (BuildConfig.DEBUG) {
|
if (0 != (applicationInfo.flags and android.content.pm.ApplicationInfo.FLAG_DEBUGGABLE)) {
|
||||||
WebView.setWebContentsDebuggingEnabled(true)
|
WebView.setWebContentsDebuggingEnabled(true)
|
||||||
}
|
}
|
||||||
settings.javaScriptEnabled = true
|
settings.javaScriptEnabled = true
|
||||||
settings.domStorageEnabled = true
|
settings.domStorageEnabled = true
|
||||||
settings.allowFileAccess = true
|
settings.allowFileAccess = true
|
||||||
|
settings.allowFileAccessFromFileURLs = true
|
||||||
|
settings.allowUniversalAccessFromFileURLs = true
|
||||||
|
settings.mixedContentMode = android.webkit.WebSettings.MIXED_CONTENT_ALWAYS_ALLOW
|
||||||
addJavascriptInterface(Bridge(this@MainActivity), "Android")
|
addJavascriptInterface(Bridge(this@MainActivity), "Android")
|
||||||
|
|
||||||
if (cacheFile.exists()) {
|
if (cacheFile.exists()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user