summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorRaindropsSys <contact@minteck.org>2023-08-14 21:26:07 +0200
committerRaindropsSys <contact@minteck.org>2023-08-14 21:26:07 +0200
commit04c6aef158f46f7aac3e71c7100cea952fed87e6 (patch)
tree478d3738ef56cba622041dd97f4f445068e57dff /android
downloadponyplay-04c6aef158f46f7aac3e71c7100cea952fed87e6.tar.gz
ponyplay-04c6aef158f46f7aac3e71c7100cea952fed87e6.tar.bz2
ponyplay-04c6aef158f46f7aac3e71c7100cea952fed87e6.zip
Initial commit
Diffstat (limited to 'android')
-rw-r--r--android/.gitignore15
-rw-r--r--android/.idea/.gitignore3
-rw-r--r--android/.idea/.name1
-rw-r--r--android/.idea/compiler.xml6
-rw-r--r--android/.idea/deploymentTargetDropDown.xml10
-rw-r--r--android/.idea/discord.xml7
-rw-r--r--android/.idea/gradle.xml19
-rw-r--r--android/.idea/kotlinc.xml6
-rw-r--r--android/.idea/migrations.xml10
-rw-r--r--android/.idea/misc.xml9
-rw-r--r--android/app/.gitignore1
-rw-r--r--android/app/build.gradle.kts52
-rw-r--r--android/app/proguard-rules.pro21
-rw-r--r--android/app/release/app-release.apkbin0 -> 10367217 bytes
-rw-r--r--android/app/release/output-metadata.json20
-rw-r--r--android/app/src/main/AndroidManifest.xml42
-rw-r--r--android/app/src/main/ic_app-playstore.pngbin0 -> 299685 bytes
-rw-r--r--android/app/src/main/ic_launcher-playstore.pngbin0 -> 12412 bytes
-rw-r--r--android/app/src/main/java/dev/equestria/ponyplay/JavaScriptExtensions.kt63
-rw-r--r--android/app/src/main/java/dev/equestria/ponyplay/MainActivity.kt237
-rw-r--r--android/app/src/main/res/drawable/ic_launcher_foreground.xml15
-rw-r--r--android/app/src/main/res/layout/activity_main.xml36
-rw-r--r--android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml5
-rw-r--r--android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml5
-rw-r--r--android/app/src/main/res/mipmap-hdpi/ic_launcher.webpbin0 -> 1990 bytes
-rw-r--r--android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webpbin0 -> 7200 bytes
-rw-r--r--android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webpbin0 -> 1990 bytes
-rw-r--r--android/app/src/main/res/mipmap-mdpi/ic_launcher.webpbin0 -> 1254 bytes
-rw-r--r--android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webpbin0 -> 4284 bytes
-rw-r--r--android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webpbin0 -> 1254 bytes
-rw-r--r--android/app/src/main/res/mipmap-xhdpi/ic_launcher.webpbin0 -> 2870 bytes
-rw-r--r--android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webpbin0 -> 10682 bytes
-rw-r--r--android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webpbin0 -> 2870 bytes
-rw-r--r--android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webpbin0 -> 4464 bytes
-rw-r--r--android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webpbin0 -> 19274 bytes
-rw-r--r--android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webpbin0 -> 4464 bytes
-rw-r--r--android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webpbin0 -> 6432 bytes
-rw-r--r--android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webpbin0 -> 30736 bytes
-rw-r--r--android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webpbin0 -> 6432 bytes
-rw-r--r--android/app/src/main/res/values/colors.xml5
-rw-r--r--android/app/src/main/res/values/ic_launcher_background.xml4
-rw-r--r--android/app/src/main/res/values/strings.xml3
-rw-r--r--android/app/src/main/res/values/themes.xml10
-rw-r--r--android/app/src/main/res/xml/backup_rules.xml13
-rw-r--r--android/app/src/main/res/xml/data_extraction_rules.xml19
-rw-r--r--android/build.gradle.kts7
-rw-r--r--android/gradle.properties23
-rw-r--r--android/gradle/libs.versions.toml28
-rw-r--r--android/gradle/wrapper/gradle-wrapper.jarbin0 -> 59203 bytes
-rw-r--r--android/gradle/wrapper/gradle-wrapper.properties6
-rwxr-xr-xandroid/gradlew185
-rw-r--r--android/gradlew.bat89
-rw-r--r--android/logo.pngbin0 -> 101290 bytes
-rw-r--r--android/settings.gradle.kts19
-rw-r--r--android/themed.svg30
55 files changed, 1024 insertions, 0 deletions
diff --git a/android/.gitignore b/android/.gitignore
new file mode 100644
index 0000000..aa724b7
--- /dev/null
+++ b/android/.gitignore
@@ -0,0 +1,15 @@
+*.iml
+.gradle
+/local.properties
+/.idea/caches
+/.idea/libraries
+/.idea/modules.xml
+/.idea/workspace.xml
+/.idea/navEditor.xml
+/.idea/assetWizardSettings.xml
+.DS_Store
+/build
+/captures
+.externalNativeBuild
+.cxx
+local.properties
diff --git a/android/.idea/.gitignore b/android/.idea/.gitignore
new file mode 100644
index 0000000..26d3352
--- /dev/null
+++ b/android/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/android/.idea/.name b/android/.idea/.name
new file mode 100644
index 0000000..b778484
--- /dev/null
+++ b/android/.idea/.name
@@ -0,0 +1 @@
+App Additions \ No newline at end of file
diff --git a/android/.idea/compiler.xml b/android/.idea/compiler.xml
new file mode 100644
index 0000000..b589d56
--- /dev/null
+++ b/android/.idea/compiler.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="CompilerConfiguration">
+ <bytecodeTargetLevel target="17" />
+ </component>
+</project> \ No newline at end of file
diff --git a/android/.idea/deploymentTargetDropDown.xml b/android/.idea/deploymentTargetDropDown.xml
new file mode 100644
index 0000000..0c0c338
--- /dev/null
+++ b/android/.idea/deploymentTargetDropDown.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="deploymentTargetDropDown">
+ <value>
+ <entry key="app">
+ <State />
+ </entry>
+ </value>
+ </component>
+</project> \ No newline at end of file
diff --git a/android/.idea/discord.xml b/android/.idea/discord.xml
new file mode 100644
index 0000000..cf77f1e
--- /dev/null
+++ b/android/.idea/discord.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="DiscordProjectSettings">
+ <option name="show" value="DISABLE" />
+ <option name="description" value="" />
+ </component>
+</project> \ No newline at end of file
diff --git a/android/.idea/gradle.xml b/android/.idea/gradle.xml
new file mode 100644
index 0000000..0897082
--- /dev/null
+++ b/android/.idea/gradle.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="GradleMigrationSettings" migrationVersion="1" />
+ <component name="GradleSettings">
+ <option name="linkedExternalProjectsSettings">
+ <GradleProjectSettings>
+ <option name="externalProjectPath" value="$PROJECT_DIR$" />
+ <option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
+ <option name="modules">
+ <set>
+ <option value="$PROJECT_DIR$" />
+ <option value="$PROJECT_DIR$/app" />
+ </set>
+ </option>
+ <option name="resolveExternalAnnotations" value="false" />
+ </GradleProjectSettings>
+ </option>
+ </component>
+</project> \ No newline at end of file
diff --git a/android/.idea/kotlinc.xml b/android/.idea/kotlinc.xml
new file mode 100644
index 0000000..217e5c5
--- /dev/null
+++ b/android/.idea/kotlinc.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="KotlinJpsPluginSettings">
+ <option name="version" value="1.8.21" />
+ </component>
+</project> \ No newline at end of file
diff --git a/android/.idea/migrations.xml b/android/.idea/migrations.xml
new file mode 100644
index 0000000..f8051a6
--- /dev/null
+++ b/android/.idea/migrations.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="ProjectMigrations">
+ <option name="MigrateToGradleLocalJavaHome">
+ <set>
+ <option value="$PROJECT_DIR$" />
+ </set>
+ </option>
+ </component>
+</project> \ No newline at end of file
diff --git a/android/.idea/misc.xml b/android/.idea/misc.xml
new file mode 100644
index 0000000..8978d23
--- /dev/null
+++ b/android/.idea/misc.xml
@@ -0,0 +1,9 @@
+<project version="4">
+ <component name="ExternalStorageConfigurationManager" enabled="true" />
+ <component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
+ <output url="file://$PROJECT_DIR$/build/classes" />
+ </component>
+ <component name="ProjectType">
+ <option name="id" value="Android" />
+ </component>
+</project> \ No newline at end of file
diff --git a/android/app/.gitignore b/android/app/.gitignore
new file mode 100644
index 0000000..42afabf
--- /dev/null
+++ b/android/app/.gitignore
@@ -0,0 +1 @@
+/build \ No newline at end of file
diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts
new file mode 100644
index 0000000..ab64399
--- /dev/null
+++ b/android/app/build.gradle.kts
@@ -0,0 +1,52 @@
+@Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed
+plugins {
+ alias(libs.plugins.androidApplication)
+ alias(libs.plugins.kotlinAndroid)
+}
+
+android {
+ namespace = "dev.equestria.ponyplay"
+ compileSdk = 33
+
+ defaultConfig {
+ applicationId = "dev.equestria.ponyplay"
+ minSdk = 33
+ targetSdk = 33
+ versionCode = 1
+ versionName = "1.0.0"
+
+ testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
+ }
+
+ buildTypes {
+ release {
+ isMinifyEnabled = false
+ proguardFiles(
+ getDefaultProguardFile("proguard-android-optimize.txt"),
+ "proguard-rules.pro"
+ )
+ }
+ }
+ buildFeatures {
+ buildConfig = true
+ }
+ compileOptions {
+ sourceCompatibility = JavaVersion.VERSION_1_8
+ targetCompatibility = JavaVersion.VERSION_1_8
+ }
+ kotlinOptions {
+ jvmTarget = "1.8"
+ }
+}
+
+dependencies {
+ implementation(libs.okhttp)
+ implementation(libs.volley)
+ implementation(libs.core.ktx)
+ implementation(libs.appcompat)
+ implementation(libs.material)
+ implementation(libs.constraintlayout)
+ testImplementation(libs.junit)
+ androidTestImplementation(libs.androidx.test.ext.junit)
+ androidTestImplementation(libs.espresso.core)
+} \ No newline at end of file
diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro
new file mode 100644
index 0000000..481bb43
--- /dev/null
+++ b/android/app/proguard-rules.pro
@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile \ No newline at end of file
diff --git a/android/app/release/app-release.apk b/android/app/release/app-release.apk
new file mode 100644
index 0000000..9a04caf
--- /dev/null
+++ b/android/app/release/app-release.apk
Binary files differ
diff --git a/android/app/release/output-metadata.json b/android/app/release/output-metadata.json
new file mode 100644
index 0000000..8f082d7
--- /dev/null
+++ b/android/app/release/output-metadata.json
@@ -0,0 +1,20 @@
+{
+ "version": 3,
+ "artifactType": {
+ "type": "APK",
+ "kind": "Directory"
+ },
+ "applicationId": "dev.equestria.phoneadditions",
+ "variantName": "release",
+ "elements": [
+ {
+ "type": "SINGLE",
+ "filters": [],
+ "attributes": [],
+ "versionCode": 5,
+ "versionName": "2.1.0-phone",
+ "outputFile": "app-release.apk"
+ }
+ ],
+ "elementType": "File"
+} \ No newline at end of file
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..26dc29c
--- /dev/null
+++ b/android/app/src/main/AndroidManifest.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools">
+
+ <uses-feature
+ android:name="android.hardware.camera"
+ android:required="false" />
+
+ <uses-permission android:name="android.permission.WAKE_LOCK" />
+ <uses-permission android:name="android.permission.INTERNET" />
+ <uses-permission android:name="android.permission.RECORD_AUDIO" />
+ <uses-permission android:name="android.permission.CAMERA" />
+ <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
+ <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
+ <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
+ <uses-permission android:name="android.permission.WRITE_SETTINGS"
+ tools:ignore="ProtectedPermissions" />
+
+ <application
+ android:allowBackup="true"
+ android:dataExtractionRules="@xml/data_extraction_rules"
+ android:fullBackupContent="@xml/backup_rules"
+ android:icon="@mipmap/ic_launcher"
+ android:hardwareAccelerated="true"
+ android:label="@string/app_name"
+ android:supportsRtl="false"
+ android:theme="@style/Theme.Ponyplay"
+ tools:targetApi="31">
+ <activity
+ android:name=".MainActivity"
+ android:label="Ponyplay"
+ android:icon="@mipmap/ic_launcher"
+ android:exported="true">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
+ </application>
+
+</manifest> \ No newline at end of file
diff --git a/android/app/src/main/ic_app-playstore.png b/android/app/src/main/ic_app-playstore.png
new file mode 100644
index 0000000..395a1d5
--- /dev/null
+++ b/android/app/src/main/ic_app-playstore.png
Binary files differ
diff --git a/android/app/src/main/ic_launcher-playstore.png b/android/app/src/main/ic_launcher-playstore.png
new file mode 100644
index 0000000..476b975
--- /dev/null
+++ b/android/app/src/main/ic_launcher-playstore.png
Binary files differ
diff --git a/android/app/src/main/java/dev/equestria/ponyplay/JavaScriptExtensions.kt b/android/app/src/main/java/dev/equestria/ponyplay/JavaScriptExtensions.kt
new file mode 100644
index 0000000..4ea2d95
--- /dev/null
+++ b/android/app/src/main/java/dev/equestria/ponyplay/JavaScriptExtensions.kt
@@ -0,0 +1,63 @@
+package dev.equestria.ponyplay
+
+import android.content.Intent
+import android.provider.Settings
+import android.webkit.JavascriptInterface
+import android.webkit.WebView
+
+
+class JavaScriptExtensions(originalActivity: MainActivity) {
+ private val activity: MainActivity = originalActivity
+ private var lightSensorValue: Int = 0
+
+ @JavascriptInterface
+ fun getSystemBrightness(): Int {
+ return Settings.System.getInt(
+ activity.baseContext.contentResolver,
+ Settings.System.SCREEN_BRIGHTNESS)
+ }
+
+ @JavascriptInterface
+ fun getBrightness(): Float {
+ return activity.lightSensorValue
+ }
+
+ @JavascriptInterface
+ fun setBrightness(brightness: Int): Int {
+ Settings.System.putInt(
+ activity.baseContext.contentResolver,
+ Settings.System.SCREEN_BRIGHTNESS_MODE,
+ Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL
+ )
+
+ Settings.System.putInt(
+ activity.baseContext.contentResolver, Settings.System.SCREEN_BRIGHTNESS, brightness
+ )
+
+ return Settings.System.getInt(
+ activity.baseContext.contentResolver, Settings.System.SCREEN_BRIGHTNESS
+ )
+ }
+
+ @JavascriptInterface
+ fun reloadWebView() {
+ val wv = activity.findViewById<WebView>(R.id.webview)
+ wv.reload()
+ }
+
+ @JavascriptInterface
+ fun startApp(url: String) {
+ val i = Intent()
+ i.setAction("startApp")
+ i.putExtra("url", url)
+ activity.sendBroadcast(i)
+ }
+
+ @JavascriptInterface
+ fun closeApp() {
+ val i = Intent()
+ i.setAction("closeApp")
+ activity.sendBroadcast(i)
+ }
+}
+
diff --git a/android/app/src/main/java/dev/equestria/ponyplay/MainActivity.kt b/android/app/src/main/java/dev/equestria/ponyplay/MainActivity.kt
new file mode 100644
index 0000000..9d7b663
--- /dev/null
+++ b/android/app/src/main/java/dev/equestria/ponyplay/MainActivity.kt
@@ -0,0 +1,237 @@
+package dev.equestria.ponyplay
+
+import android.annotation.SuppressLint
+import android.app.Activity
+import android.content.BroadcastReceiver
+import android.content.Context
+import android.content.Intent
+import android.content.IntentFilter
+import android.content.pm.ActivityInfo
+import android.graphics.Color
+import android.hardware.Sensor
+import android.hardware.SensorEvent
+import android.hardware.SensorEventListener
+import android.hardware.SensorManager
+import android.os.Bundle
+import android.util.Log
+import android.view.Display
+import android.view.View
+import android.view.WindowManager
+import android.webkit.GeolocationPermissions
+import android.webkit.PermissionRequest
+import android.webkit.WebChromeClient
+import android.webkit.WebSettings
+import android.webkit.WebView
+import android.webkit.WebViewClient
+import com.android.volley.Request
+import com.android.volley.toolbox.JsonObjectRequest
+import com.android.volley.toolbox.Volley
+import com.google.android.material.dialog.MaterialAlertDialogBuilder
+import okhttp3.*
+import kotlin.system.exitProcess
+
+
+class MainActivity : SensorEventListener, Activity() {
+ private lateinit var mSensorManager: SensorManager
+ private lateinit var mLightSensor: Sensor
+ private lateinit var broadcastReceiver: BroadcastReceiver
+ var lightSensorValue: Float = 0f
+ val mainAppURL: String = "https://ponyplay-raindrops.equestria.dev:20443/app.html"
+
+ override fun onSensorChanged(sensorEvent: SensorEvent) {
+ if (sensorEvent.sensor.type == Sensor.TYPE_LIGHT) {
+ Log.d("SensorTest", "" + sensorEvent.values[0])
+ lightSensorValue = sensorEvent.values[0]
+ }
+ }
+
+ @Deprecated("Deprecated in Java")
+ override fun onBackPressed() {
+ window.decorView.systemUiVisibility = (View.SYSTEM_UI_FLAG_IMMERSIVE
+ or View.SYSTEM_UI_FLAG_LAYOUT_STABLE
+ or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
+ or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
+ or View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
+ or View.SYSTEM_UI_FLAG_FULLSCREEN)
+ }
+
+ override fun onAccuracyChanged(sensor: Sensor?, i: Int) {}
+
+ fun showError() {
+ MaterialAlertDialogBuilder(this).setCancelable(false)
+ .setTitle("Error")
+ .setMessage("Unable to communicate with your local Ponyplay Station.")
+ .setNegativeButton("Quit") { _, _ ->
+ this.moveTaskToBack(true)
+ exitProcess(0)
+ }.show()
+ }
+
+ override fun onDestroy() {
+ unregisterReceiver(broadcastReceiver)
+ super.onDestroy()
+ }
+
+ override fun onResume() {
+ window.decorView.systemUiVisibility = (View.SYSTEM_UI_FLAG_IMMERSIVE
+ or View.SYSTEM_UI_FLAG_LAYOUT_STABLE
+ or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
+ or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
+ or View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
+ or View.SYSTEM_UI_FLAG_FULLSCREEN)
+
+ super.onResume()
+
+ mSensorManager.registerListener(this, mLightSensor, SensorManager.SENSOR_DELAY_NORMAL)
+ }
+
+ override fun onWindowFocusChanged(hasFocus: Boolean) {
+ window.decorView.systemUiVisibility = (View.SYSTEM_UI_FLAG_IMMERSIVE
+ or View.SYSTEM_UI_FLAG_LAYOUT_STABLE
+ or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
+ or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
+ or View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
+ or View.SYSTEM_UI_FLAG_FULLSCREEN)
+
+ super.onWindowFocusChanged(hasFocus)
+ }
+
+ @SuppressLint("SetJavaScriptEnabled")
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ //
+ // getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE)
+ setContentView(R.layout.activity_main)
+
+ val intentFilter = IntentFilter()
+ intentFilter.addAction("startApp")
+ intentFilter.addAction("closeApp")
+
+ broadcastReceiver = object : BroadcastReceiver() {
+ override fun onReceive(context: Context, intent: Intent) {
+ if (intent.action == "startApp") {
+ val av = findViewById<WebView>(R.id.appview)
+ av.visibility = View.VISIBLE
+
+ val webSettings = av.settings
+ webSettings.javaScriptEnabled = true
+ webSettings.cacheMode = WebSettings.LOAD_NO_CACHE
+ webSettings.domStorageEnabled = true
+ webSettings.allowFileAccess = true
+ webSettings.allowContentAccess = true
+ webSettings.safeBrowsingEnabled = false
+
+ webSettings.allowUniversalAccessFromFileURLs = true
+ webSettings.allowFileAccessFromFileURLs = true
+
+ webSettings.mediaPlaybackRequiresUserGesture = false
+ webSettings.userAgentString = "Mozilla/5.0 (Linux; Ponyplay; main) AppleWebKit/" + webSettings.userAgentString.split("AppleWebKit/")[1]
+
+ av.webViewClient = object : WebViewClient() {
+ @Deprecated("Deprecated in Java")
+ override fun shouldOverrideUrlLoading(view: WebView, url: String): Boolean {
+ av.loadUrl(url)
+ return true
+ }
+ }
+
+ av.setLayerType(View.LAYER_TYPE_HARDWARE, null)
+
+ intent.getStringExtra("url")?.let { av.loadUrl(it) }
+ } else if (intent.action == "closeApp") {
+ val av = findViewById<WebView>(R.id.appview)
+ av.visibility = View.GONE
+ av.loadUrl("about:blank")
+ }
+ }
+ }
+
+ registerReceiver(broadcastReceiver, intentFilter, RECEIVER_NOT_EXPORTED)
+
+ mSensorManager = getSystemService(SENSOR_SERVICE) as SensorManager
+ mLightSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_LIGHT)
+
+ window.statusBarColor = Color.TRANSPARENT
+ window.navigationBarColor = Color.TRANSPARENT
+
+ window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
+ window.decorView.systemUiVisibility = (View.SYSTEM_UI_FLAG_IMMERSIVE
+ or View.SYSTEM_UI_FLAG_LAYOUT_STABLE
+ or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
+ or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
+ or View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
+ or View.SYSTEM_UI_FLAG_FULLSCREEN)
+ this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE)
+
+ val wv = findViewById<WebView>(R.id.webview)
+
+ val volleyQueue = Volley.newRequestQueue(baseContext)
+
+ val jsonObjectRequest = JsonObjectRequest(
+ Request.Method.GET, "https://ponyplay-raindrops.equestria.dev:20443/availabilitycheck.txt", null,
+
+ { response ->
+ Log.i("HTTPRequest", response.toString())
+
+ if (response.getString("status") == "OK") {
+ wv.clearCache(true)
+ wv.clearHistory()
+
+ val webSettings = wv.settings
+ webSettings.javaScriptEnabled = true
+ webSettings.cacheMode = WebSettings.LOAD_NO_CACHE
+ webSettings.domStorageEnabled = true
+ webSettings.allowFileAccess = true
+ webSettings.allowContentAccess = true
+ webSettings.safeBrowsingEnabled = false
+
+ webSettings.allowUniversalAccessFromFileURLs = true
+ webSettings.allowFileAccessFromFileURLs = true
+
+ webSettings.mediaPlaybackRequiresUserGesture = false
+ webSettings.userAgentString = "Mozilla/5.0 (Linux; Ponyplay; main) AppleWebKit/" + webSettings.userAgentString.split("AppleWebKit/")[1]
+
+ wv.loadUrl(mainAppURL)
+ wv.addJavascriptInterface(JavaScriptExtensions(this), "engine")
+ wv.setLayerType(View.LAYER_TYPE_HARDWARE, null)
+
+ wv.webViewClient = object : WebViewClient() {
+ @Deprecated("Deprecated in Java")
+ override fun shouldOverrideUrlLoading(view: WebView, url: String): Boolean {
+ wv.loadUrl(url)
+ return true
+ }
+ }
+
+ wv.webChromeClient = object : WebChromeClient() {
+ override fun onPermissionRequest(request: PermissionRequest) {
+ Log.d("WebView", "onPermissionRequest")
+ runOnUiThread {
+ Log.d("WebView", request.origin.toString())
+ Log.d("WebView", "GRANTED")
+ request.grant(request.resources)
+ }
+ }
+
+ override fun onGeolocationPermissionsShowPrompt(
+ origin: String?,
+ callback: GeolocationPermissions.Callback
+ ) {
+ callback.invoke(origin, true, false)
+ }
+ }
+
+ WebView.setWebContentsDebuggingEnabled(false)
+ } else {
+ showError()
+ }
+ },
+
+ { error ->
+ showError()
+ Log.e("HTTPRequest", "Request error: ${error.localizedMessage}")
+ })
+
+ volleyQueue.add(jsonObjectRequest)
+ }
+} \ No newline at end of file
diff --git a/android/app/src/main/res/drawable/ic_launcher_foreground.xml b/android/app/src/main/res/drawable/ic_launcher_foreground.xml
new file mode 100644
index 0000000..9ea0ceb
--- /dev/null
+++ b/android/app/src/main/res/drawable/ic_launcher_foreground.xml
@@ -0,0 +1,15 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="108dp"
+ android:height="108dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24"
+ android:tint="#000000">
+ <group android:scaleX="0.58"
+ android:scaleY="0.58"
+ android:translateX="5.04"
+ android:translateY="5.04">
+ <path
+ android:pathData="M17.6,11.48 L19.44,8.3a0.63,0.63 0,0 0,-1.09 -0.63l-1.88,3.24a11.43,11.43 0,0 0,-8.94 0L5.65,7.67a0.63,0.63 0,0 0,-1.09 0.63L6.4,11.48A10.81,10.81 0,0 0,1 20L23,20A10.81,10.81 0,0 0,17.6 11.48ZM7,17.25A1.25,1.25 0,1 1,8.25 16,1.25 1.25,0 0,1 7,17.25ZM17,17.25A1.25,1.25 0,1 1,18.25 16,1.25 1.25,0 0,1 17,17.25Z"
+ android:fillColor="#FF000000"/>
+ </group>
+</vector> \ No newline at end of file
diff --git a/android/app/src/main/res/layout/activity_main.xml b/android/app/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..32c5989
--- /dev/null
+++ b/android/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,36 @@
+<?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"
+ android:theme="@style/Base.Theme.Ponyplay"
+ android:configChanges="orientation"
+ android:screenOrientation="landscape"
+ tools:context=".MainActivity">
+
+ <LinearLayout
+ android:id="@+id/linearLayout"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical">
+
+ <WebView
+ android:id="@+id/webview"
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="10"
+ android:hardwareAccelerated="true">
+
+ </WebView>
+
+ <WebView
+ android:id="@+id/appview"
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="90"
+ android:visibility="gone" />
+
+ </LinearLayout>
+
+</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file
diff --git a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 0000000..7353dbd
--- /dev/null
+++ b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
+ <background android:drawable="@color/ic_launcher_background"/>
+ <foreground android:drawable="@drawable/ic_launcher_foreground"/>
+</adaptive-icon> \ No newline at end of file
diff --git a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
new file mode 100644
index 0000000..7353dbd
--- /dev/null
+++ b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
+ <background android:drawable="@color/ic_launcher_background"/>
+ <foreground android:drawable="@drawable/ic_launcher_foreground"/>
+</adaptive-icon> \ No newline at end of file
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp
new file mode 100644
index 0000000..b30f614
--- /dev/null
+++ b/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp
Binary files differ
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp b/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp
new file mode 100644
index 0000000..fbfe3aa
--- /dev/null
+++ b/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp
Binary files differ
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
new file mode 100644
index 0000000..b30f614
--- /dev/null
+++ b/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
Binary files differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp
new file mode 100644
index 0000000..ec87dd6
--- /dev/null
+++ b/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp
Binary files differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp b/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp
new file mode 100644
index 0000000..9668e99
--- /dev/null
+++ b/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp
Binary files differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
new file mode 100644
index 0000000..ec87dd6
--- /dev/null
+++ b/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
Binary files differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
new file mode 100644
index 0000000..9b84016
--- /dev/null
+++ b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
Binary files differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp
new file mode 100644
index 0000000..edc6bd5
--- /dev/null
+++ b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp
Binary files differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
new file mode 100644
index 0000000..9b84016
--- /dev/null
+++ b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
Binary files differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
new file mode 100644
index 0000000..737647c
--- /dev/null
+++ b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
Binary files differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp
new file mode 100644
index 0000000..d4a60ea
--- /dev/null
+++ b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp
Binary files differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
new file mode 100644
index 0000000..737647c
--- /dev/null
+++ b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
Binary files differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
new file mode 100644
index 0000000..5c74df5
--- /dev/null
+++ b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
Binary files differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp
new file mode 100644
index 0000000..71545d9
--- /dev/null
+++ b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp
Binary files differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
new file mode 100644
index 0000000..5c74df5
--- /dev/null
+++ b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
Binary files differ
diff --git a/android/app/src/main/res/values/colors.xml b/android/app/src/main/res/values/colors.xml
new file mode 100644
index 0000000..c8524cd
--- /dev/null
+++ b/android/app/src/main/res/values/colors.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <color name="black">#FF000000</color>
+ <color name="white">#FFFFFFFF</color>
+</resources> \ No newline at end of file
diff --git a/android/app/src/main/res/values/ic_launcher_background.xml b/android/app/src/main/res/values/ic_launcher_background.xml
new file mode 100644
index 0000000..c5d5899
--- /dev/null
+++ b/android/app/src/main/res/values/ic_launcher_background.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <color name="ic_launcher_background">#FFFFFF</color>
+</resources> \ No newline at end of file
diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000..69a66f4
--- /dev/null
+++ b/android/app/src/main/res/values/strings.xml
@@ -0,0 +1,3 @@
+<resources>
+ <string name="app_name">Equestria.dev Ponyplay</string>
+</resources> \ No newline at end of file
diff --git a/android/app/src/main/res/values/themes.xml b/android/app/src/main/res/values/themes.xml
new file mode 100644
index 0000000..12e97e4
--- /dev/null
+++ b/android/app/src/main/res/values/themes.xml
@@ -0,0 +1,10 @@
+<resources xmlns:tools="http://schemas.android.com/tools">
+ <!-- Base application theme. -->
+ <style name="Base.Theme.Ponyplay" parent="Theme.Material3.Dark.NoActionBar">
+ <!-- Customize your light theme here. -->
+ <!-- <item name="colorPrimary">@color/my_light_primary</item> -->
+ <item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
+ </style>
+
+ <style name="Theme.Ponyplay" parent="Base.Theme.Ponyplay" />
+</resources> \ No newline at end of file
diff --git a/android/app/src/main/res/xml/backup_rules.xml b/android/app/src/main/res/xml/backup_rules.xml
new file mode 100644
index 0000000..fa0f996
--- /dev/null
+++ b/android/app/src/main/res/xml/backup_rules.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+ Sample backup rules file; uncomment and customize as necessary.
+ See https://developer.android.com/guide/topics/data/autobackup
+ for details.
+ Note: This file is ignored for devices older that API 31
+ See https://developer.android.com/about/versions/12/backup-restore
+-->
+<full-backup-content>
+ <!--
+ <include domain="sharedpref" path="."/>
+ <exclude domain="sharedpref" path="device.xml"/>
+-->
+</full-backup-content> \ No newline at end of file
diff --git a/android/app/src/main/res/xml/data_extraction_rules.xml b/android/app/src/main/res/xml/data_extraction_rules.xml
new file mode 100644
index 0000000..9ee9997
--- /dev/null
+++ b/android/app/src/main/res/xml/data_extraction_rules.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+ Sample data extraction rules file; uncomment and customize as necessary.
+ See https://developer.android.com/about/versions/12/backup-restore#xml-changes
+ for details.
+-->
+<data-extraction-rules>
+ <cloud-backup>
+ <!-- TODO: Use <include> and <exclude> to control what is backed up.
+ <include .../>
+ <exclude .../>
+ -->
+ </cloud-backup>
+ <!--
+ <device-transfer>
+ <include .../>
+ <exclude .../>
+ </device-transfer>
+ -->
+</data-extraction-rules> \ No newline at end of file
diff --git a/android/build.gradle.kts b/android/build.gradle.kts
new file mode 100644
index 0000000..20d87a7
--- /dev/null
+++ b/android/build.gradle.kts
@@ -0,0 +1,7 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+@Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed
+plugins {
+ alias(libs.plugins.androidApplication) apply false
+ alias(libs.plugins.kotlinAndroid) apply false
+}
+true // Needed to make the Suppress annotation work for the plugins block \ No newline at end of file
diff --git a/android/gradle.properties b/android/gradle.properties
new file mode 100644
index 0000000..3c5031e
--- /dev/null
+++ b/android/gradle.properties
@@ -0,0 +1,23 @@
+# Project-wide Gradle settings.
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true
+# AndroidX package structure to make it clearer which packages are bundled with the
+# Android operating system, and which are packaged with your app's APK
+# https://developer.android.com/topic/libraries/support-library/androidx-rn
+android.useAndroidX=true
+# Kotlin code style for this project: "official" or "obsolete":
+kotlin.code.style=official
+# Enables namespacing of each library's R class so that its R class includes only the
+# resources declared in the library itself and none from the library's dependencies,
+# thereby reducing the size of the R class for that library
+android.nonTransitiveRClass=true \ No newline at end of file
diff --git a/android/gradle/libs.versions.toml b/android/gradle/libs.versions.toml
new file mode 100644
index 0000000..0235b33
--- /dev/null
+++ b/android/gradle/libs.versions.toml
@@ -0,0 +1,28 @@
+[versions]
+agp = "8.2.0-alpha14"
+kotlin = "1.8.21"
+core-ktx = "1.10.1"
+junit = "4.13.2"
+androidx-test-ext-junit = "1.1.5"
+espresso-core = "3.5.1"
+appcompat = "1.6.1"
+material = "1.9.0"
+constraintlayout = "2.1.4"
+okhttp = "4.10.0"
+volley = "1.2.1"
+
+[libraries]
+core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "core-ktx" }
+junit = { group = "junit", name = "junit", version.ref = "junit" }
+androidx-test-ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "androidx-test-ext-junit" }
+espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espresso-core" }
+appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
+material = { group = "com.google.android.material", name = "material", version.ref = "material" }
+constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
+okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp" }
+volley = { module = "com.android.volley:volley", version.ref = "volley" }
+
+[plugins]
+androidApplication = { id = "com.android.application", version.ref = "agp" }
+kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
+
diff --git a/android/gradle/wrapper/gradle-wrapper.jar b/android/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..e708b1c
--- /dev/null
+++ b/android/gradle/wrapper/gradle-wrapper.jar
Binary files differ
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..da3c56c
--- /dev/null
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Wed Aug 09 22:22:46 CEST 2023
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/android/gradlew b/android/gradlew
new file mode 100755
index 0000000..4f906e0
--- /dev/null
+++ b/android/gradlew
@@ -0,0 +1,185 @@
+#!/usr/bin/env sh
+
+#
+# Copyright 2015 the original author or authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=`expr $i + 1`
+ done
+ case $i in
+ 0) set -- ;;
+ 1) set -- "$args0" ;;
+ 2) set -- "$args0" "$args1" ;;
+ 3) set -- "$args0" "$args1" "$args2" ;;
+ 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=`save "$@"`
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+exec "$JAVACMD" "$@"
diff --git a/android/gradlew.bat b/android/gradlew.bat
new file mode 100644
index 0000000..ac1b06f
--- /dev/null
+++ b/android/gradlew.bat
@@ -0,0 +1,89 @@
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/android/logo.png b/android/logo.png
new file mode 100644
index 0000000..81a5e45
--- /dev/null
+++ b/android/logo.png
Binary files differ
diff --git a/android/settings.gradle.kts b/android/settings.gradle.kts
new file mode 100644
index 0000000..bb6fd36
--- /dev/null
+++ b/android/settings.gradle.kts
@@ -0,0 +1,19 @@
+import java.net.URI
+
+pluginManagement {
+ repositories {
+ google()
+ mavenCentral()
+ gradlePluginPortal()
+ }
+}
+dependencyResolutionManagement {
+ repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
+ repositories {
+ google()
+ mavenCentral()
+ }
+}
+
+rootProject.name = "App Additions"
+include(":app")
diff --git a/android/themed.svg b/android/themed.svg
new file mode 100644
index 0000000..f7a7634
--- /dev/null
+++ b/android/themed.svg
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 27.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ viewBox="0 0 139.7 139.7" style="enable-background:new 0 0 139.7 139.7;" xml:space="preserve">
+<style type="text/css">
+ .st0{opacity:0.25;enable-background:new ;}
+ .st1{opacity:0.5;enable-background:new ;}
+</style>
+<path class="st0" d="M85.9,29.8C78.5,30.6,71.8,34,71.1,40c-0.2,2-1.5,10.8-3.6,11.6c-10.6,3.8-19.8,20-19.9,26.8
+ c-2,15.3-3.6,20.9,1.2,31L68.9,79c2.2-5.6,5.3-10.6,7-16.5c0.5-1.9,1-4.5,1.9-5.8c0.9-1.5,2.4-2.5,4.2-4.5c1.2-1.3,3-4.2,4.5-6.6
+ c2.9-4.9,3.9-7.1,5.6-10.3C92.3,33.4,90.2,29.3,85.9,29.8z M60,72.6c-1,1.7-2.9,5.1-3.9,6.7c-0.5,0.9-0.9,2.2-1.2,3.2
+ c-0.3-1.2-0.3-3,0.6-4.6l0,0c0.7-0.9,2-2.7,3-3.9c2.1-2.9,8.2-12,9.5-12.8C66.8,62.4,61.9,69.5,60,72.6z"/>
+<path d="M56.3,75c-3.1,3.4-3.5,10-2.4,14.3C57.7,76,66,65.7,72.3,57.1C66.5,59.4,61.1,69.5,56.3,75z M60,72.6
+ c-1,1.7-2.9,5.1-3.9,6.7c-0.5,0.9-0.9,2.2-1.2,3.2c-0.3-1.2-0.3-3,0.6-4.6l0,0c0.7-0.9,2-2.7,3-3.9c2.1-2.9,8.2-12,9.5-12.8
+ C66.8,62.4,61.9,69.5,60,72.6z"/>
+<path d="M72.3,57.1L72.3,57.1L72.3,57.1z"/>
+<path id="path4677" d="M81.9,35c0.1,0.9,0,1.1,0.3,1.4c1.2,0.1,3-0.8,4.2-1.2c-0.6,0.9-2.1,2.1-3.5,3.3c-0.2,0.5-0.1,0.8-0.1,1.2
+ c-1-0.1-2.1,0.3-2.6,0.6c0.4,0.3,1.7,3.5,1.2,5.2c-0.4-0.4-1.7-3.9-2.7-4.2c-0.6,1.5-0.4,5-1.2,6.8c-1-1-1-3.9-0.4-5.5
+ c-1.2,0.4-2.2,1.2-3.4,1.2c1.2-1.5,2.6-2.3,3.9-3.5c0-0.5-0.3-0.6-0.9-0.9c1.2-0.4,2.4-1,2.3-2.7c0.4,0.3,0.8,0.6,1.2,0.7
+ C81.1,36.6,81.6,35.6,81.9,35L81.9,35z"/>
+<path d="M86.7,29.2C80.6,29.4,76.1,30.6,73,34c-2.2,2.6-3.1,6-3.6,9.9c-0.9,6.4-0.9,6.2-5.5,8.9c-4.3,2.6-8.2,7.1-11.2,10.7
+ c-6.5,7.8-11.9,33-4.9,46.9l0,0l2.1-2.3c-6.8-7.7-2.1-28.1,0.3-35.2c2.2-6.6,7.9-13.3,13.7-17.6c6.8-5,6-3.8,7.2-9.7
+ c0.7-3.7,1.5-8,3.6-10.2c2.7-2.9,6.8-5,12.1-4.9L86.7,29.2z"/>
+<path id="path3177" d="M77.6,56.5c4.2-2,11.4-11.3,14.4-21.2c-1.2,1.5-2.9,3.9-4.4,7C84.5,48.7,78.7,54.9,77.6,56.5z"/>
+<path d="M54.5,97.2c-7.9,9.6-6.3,12.7-5.7,12.3c1.8-1.8,4.5-6.6,8.1-11.2c8.9-11.5,18.7-28.7,20.3-40.4
+ C71.5,75.6,60.1,90.2,54.5,97.2z"/>
+<path id="path4334_00000171706154884340887790000012676028719422921878_" class="st1" d="M55.6,77.9c-0.9,1.6-0.9,3.5-0.6,4.6
+ c0.3-1,0.6-2.2,1.2-3.2c0.9-1.6,2.7-5,3.9-6.7c2-3.1,6.8-10.2,8.2-11.5c-1.4,0.8-7.5,9.9-9.5,12.8C57.6,75.2,56.3,77,55.6,77.9
+ L55.6,77.9z"/>
+</svg>