Skip to content

Commit

Permalink
feat(android): enable storage, geolocation, media playback, window.op…
Browse files Browse the repository at this point in the history
…en (#684)
  • Loading branch information
lucasfernog authored Sep 4, 2022
1 parent e66f7bb commit 9dfffcf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changes/enable-android-apis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wry": minor
---

Enable storage, geolocation, media playback, `window.open`.
7 changes: 6 additions & 1 deletion src/webview/android/kotlin/RustWebView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ import android.content.Context

class RustWebView(context: Context): WebView(context) {
init {
this.settings.javaScriptEnabled = true
settings.javaScriptEnabled = true
settings.domStorageEnabled = true
settings.setGeolocationEnabled(true)
settings.databaseEnabled = true
settings.mediaPlaybackRequiresUserGesture = false
settings.javaScriptCanOpenWindowsAutomatically = true
{{class-init}}
}

Expand Down

0 comments on commit 9dfffcf

Please sign in to comment.