diff options
Diffstat (limited to 'android/app/src/debug/kotlin')
| -rw-r--r-- | android/app/src/debug/kotlin/net.mullvad.mullvadvpn/TestActivity.kt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/android/app/src/debug/kotlin/net.mullvad.mullvadvpn/TestActivity.kt b/android/app/src/debug/kotlin/net.mullvad.mullvadvpn/TestActivity.kt new file mode 100644 index 0000000000..df36947eab --- /dev/null +++ b/android/app/src/debug/kotlin/net.mullvad.mullvadvpn/TestActivity.kt @@ -0,0 +1,23 @@ +package net.mullvad.mullvadvpn + +import android.annotation.SuppressLint +import android.app.Activity +import android.os.Bundle +import android.webkit.WebView +import android.widget.Toast + +class TestActivity : Activity() { + @SuppressLint("SetJavaScriptEnabled") + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_test) + val testWebView: WebView = findViewById(R.id.webview) + testWebView.settings.javaScriptEnabled = true + val url = intent.getStringExtra("url") + if (url != null) { + testWebView.loadUrl(url) + } else { + Toast.makeText(applicationContext, "No url specified!", Toast.LENGTH_SHORT).show() + } + } +} |
