diff options
Diffstat (limited to 'android/app/src/debug')
| -rw-r--r-- | android/app/src/debug/AndroidManifest.xml | 22 | ||||
| -rw-r--r-- | android/app/src/debug/kotlin/net.mullvad.mullvadvpn/TestActivity.kt | 23 | ||||
| -rw-r--r-- | android/app/src/debug/res/layout/activity_test.xml | 13 |
3 files changed, 58 insertions, 0 deletions
diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000000..0eee767e98 --- /dev/null +++ b/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,22 @@ +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + package="net.mullvad.mullvadvpn"> + <application android:label="@string/app_name" + android:icon="@mipmap/ic_launcher" + android:roundIcon="@mipmap/ic_launcher" + android:theme="@style/AppTheme" + android:extractNativeLibs="true" + android:allowBackup="false" + android:banner="@drawable/banner" + android:name=".MullvadApplication" + tools:ignore="GoogleAppIndexingWarning"> + <activity android:name="net.mullvad.mullvadvpn.TestActivity" + android:label="@string/app_name" + android:launchMode="singleTask" + android:configChanges="orientation|screenSize|screenLayout" + android:screenOrientation="locked" + android:windowSoftInputMode="adjustPan" + android:exported="true"> + </activity> + </application> +</manifest> 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() + } + } +} diff --git a/android/app/src/debug/res/layout/activity_test.xml b/android/app/src/debug/res/layout/activity_test.xml new file mode 100644 index 0000000000..18f7eafef6 --- /dev/null +++ b/android/app/src/debug/res/layout/activity_test.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.constraintlayout.widget.ConstraintLayout + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context=".TestActivity"> + <WebView + android:id="@+id/webview" + android:layout_width="match_parent" + android:layout_height="match_parent" /> +</androidx.constraintlayout.widget.ConstraintLayout> |
