diff --git a/mobile_new/.gitignore b/mobile_new/.gitignore new file mode 100644 index 00000000..aa724b77 --- /dev/null +++ b/mobile_new/.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/mobile_new/app/.gitignore b/mobile_new/app/.gitignore new file mode 100644 index 00000000..42afabfd --- /dev/null +++ b/mobile_new/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/mobile_new/app/build.gradle.kts b/mobile_new/app/build.gradle.kts new file mode 100644 index 00000000..99ad97cf --- /dev/null +++ b/mobile_new/app/build.gradle.kts @@ -0,0 +1,48 @@ +plugins { + alias(libs.plugins.android.application) + alias(libs.plugins.kotlin.android) +} + +android { + namespace = "com.koalasat.robosats" + compileSdk = 36 + + defaultConfig { + applicationId = "com.koalasat.robosats" + minSdk = 24 + targetSdk = 36 + versionCode = 1 + versionName = "1.0" + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + kotlinOptions { + jvmTarget = "11" + } +} + +dependencies { + + implementation(libs.androidx.core.ktx) + implementation(libs.androidx.appcompat) + implementation(libs.material) + implementation(libs.androidx.activity) + implementation(libs.androidx.constraintlayout) + testImplementation(libs.junit) + androidTestImplementation(libs.androidx.junit) + androidTestImplementation(libs.androidx.espresso.core) +} diff --git a/mobile_new/app/proguard-rules.pro b/mobile_new/app/proguard-rules.pro new file mode 100644 index 00000000..481bb434 --- /dev/null +++ b/mobile_new/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/mobile_new/app/src/androidTest/java/com/koalasat/robosats/ExampleInstrumentedTest.kt b/mobile_new/app/src/androidTest/java/com/koalasat/robosats/ExampleInstrumentedTest.kt new file mode 100644 index 00000000..bc490e19 --- /dev/null +++ b/mobile_new/app/src/androidTest/java/com/koalasat/robosats/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package com.koalasat.robosats + +import androidx.test.platform.app.InstrumentationRegistry +import androidx.test.ext.junit.runners.AndroidJUnit4 + +import org.junit.Test +import org.junit.runner.RunWith + +import org.junit.Assert.* + +/** + * Instrumented test, which will execute on an Android device. + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +@RunWith(AndroidJUnit4::class) +class ExampleInstrumentedTest { + @Test + fun useAppContext() { + // Context of the app under test. + val appContext = InstrumentationRegistry.getInstrumentation().targetContext + assertEquals("com.koalasat.robosats", appContext.packageName) + } +} diff --git a/mobile_new/app/src/main/AndroidManifest.xml b/mobile_new/app/src/main/AndroidManifest.xml new file mode 100644 index 00000000..c6722a31 --- /dev/null +++ b/mobile_new/app/src/main/AndroidManifest.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + diff --git a/mobile_new/app/src/main/java/com/koalasat/robosats/MainActivity.kt b/mobile_new/app/src/main/java/com/koalasat/robosats/MainActivity.kt new file mode 100644 index 00000000..e789f1b8 --- /dev/null +++ b/mobile_new/app/src/main/java/com/koalasat/robosats/MainActivity.kt @@ -0,0 +1,60 @@ +package com.koalasat.robosats + +import android.os.Bundle +import android.webkit.WebSettings +import android.webkit.WebView +import android.webkit.WebViewClient +import androidx.appcompat.app.AppCompatActivity + +class MainActivity : AppCompatActivity() { + private lateinit var webView: WebView + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + + // We don't need edge-to-edge since we're using fitsSystemWindows + setContentView(R.layout.activity_main) + + // Set up the WebView + webView = findViewById(R.id.webView) + setupWebView() + } + + private fun setupWebView() { + // Set WebViewClient to handle page navigation + webView.webViewClient = WebViewClient() + + val webSettings = webView.settings + + // Enable JavaScript + webSettings.javaScriptEnabled = true + + // Enable DOM storage for HTML5 apps + webSettings.domStorageEnabled = true + + // Set cache mode + webSettings.cacheMode = WebSettings.LOAD_DEFAULT + + // Enable mixed content (http in https) + webSettings.mixedContentMode = WebSettings.MIXED_CONTENT_ALWAYS_ALLOW + + // Enable zooming + webSettings.setSupportZoom(true) + webSettings.builtInZoomControls = true + webSettings.displayZoomControls = false + + // Enable HTML5 features + webSettings.allowFileAccess = true + webSettings.allowContentAccess = true + webSettings.loadWithOverviewMode = true + webSettings.useWideViewPort = true + webSettings.setSupportMultipleWindows(true) + webSettings.javaScriptCanOpenWindowsAutomatically = true + + // Improve display for better Android integration + webSettings.textZoom = 100 // Normal text zoom + + // Load the website + webView.loadUrl("http://check.torproject.org") + } +} diff --git a/mobile_new/app/src/main/res/drawable/ic_launcher_background.xml b/mobile_new/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 00000000..07d5da9c --- /dev/null +++ b/mobile_new/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mobile_new/app/src/main/res/drawable/ic_launcher_foreground.xml b/mobile_new/app/src/main/res/drawable/ic_launcher_foreground.xml new file mode 100644 index 00000000..7706ab9e --- /dev/null +++ b/mobile_new/app/src/main/res/drawable/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + diff --git a/mobile_new/app/src/main/res/layout/activity_main.xml b/mobile_new/app/src/main/res/layout/activity_main.xml new file mode 100644 index 00000000..6dd3b647 --- /dev/null +++ b/mobile_new/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,21 @@ + + + + + + diff --git a/mobile_new/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/mobile_new/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 00000000..b3e26b4c --- /dev/null +++ b/mobile_new/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/mobile_new/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/mobile_new/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 00000000..b3e26b4c --- /dev/null +++ b/mobile_new/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/mobile_new/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/mobile_new/app/src/main/res/mipmap-hdpi/ic_launcher.webp new file mode 100644 index 00000000..c209e78e Binary files /dev/null and b/mobile_new/app/src/main/res/mipmap-hdpi/ic_launcher.webp differ diff --git a/mobile_new/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/mobile_new/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp new file mode 100644 index 00000000..b2dfe3d1 Binary files /dev/null and b/mobile_new/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ diff --git a/mobile_new/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/mobile_new/app/src/main/res/mipmap-mdpi/ic_launcher.webp new file mode 100644 index 00000000..4f0f1d64 Binary files /dev/null and b/mobile_new/app/src/main/res/mipmap-mdpi/ic_launcher.webp differ diff --git a/mobile_new/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/mobile_new/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp new file mode 100644 index 00000000..62b611da Binary files /dev/null and b/mobile_new/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ diff --git a/mobile_new/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/mobile_new/app/src/main/res/mipmap-xhdpi/ic_launcher.webp new file mode 100644 index 00000000..948a3070 Binary files /dev/null and b/mobile_new/app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ diff --git a/mobile_new/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/mobile_new/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp new file mode 100644 index 00000000..1b9a6956 Binary files /dev/null and b/mobile_new/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ diff --git a/mobile_new/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/mobile_new/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp new file mode 100644 index 00000000..28d4b77f Binary files /dev/null and b/mobile_new/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ diff --git a/mobile_new/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/mobile_new/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp new file mode 100644 index 00000000..9287f508 Binary files /dev/null and b/mobile_new/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ diff --git a/mobile_new/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/mobile_new/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp new file mode 100644 index 00000000..aa7d6427 Binary files /dev/null and b/mobile_new/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ diff --git a/mobile_new/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/mobile_new/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp new file mode 100644 index 00000000..9126ae37 Binary files /dev/null and b/mobile_new/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ diff --git a/mobile_new/app/src/main/res/values-night/themes.xml b/mobile_new/app/src/main/res/values-night/themes.xml new file mode 100644 index 00000000..70efe437 --- /dev/null +++ b/mobile_new/app/src/main/res/values-night/themes.xml @@ -0,0 +1,7 @@ + + + + diff --git a/mobile_new/app/src/main/res/values/colors.xml b/mobile_new/app/src/main/res/values/colors.xml new file mode 100644 index 00000000..768b058a --- /dev/null +++ b/mobile_new/app/src/main/res/values/colors.xml @@ -0,0 +1,5 @@ + + + #FF000000 + #FFFFFFFF + diff --git a/mobile_new/app/src/main/res/values/strings.xml b/mobile_new/app/src/main/res/values/strings.xml new file mode 100644 index 00000000..b1a28134 --- /dev/null +++ b/mobile_new/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + Robosats + \ No newline at end of file diff --git a/mobile_new/app/src/main/res/values/themes.xml b/mobile_new/app/src/main/res/values/themes.xml new file mode 100644 index 00000000..11b4ad52 --- /dev/null +++ b/mobile_new/app/src/main/res/values/themes.xml @@ -0,0 +1,9 @@ + + + + +