diff --git a/app/build.gradle b/app/build.gradle
index 3e72e09..27b27c1 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -6,7 +6,7 @@ android {
compileSdkVersion 29
defaultConfig {
applicationId "io.github.chronosx88.yggdrasil"
- minSdkVersion 21
+ minSdkVersion 22
targetSdkVersion 29
versionCode 1
versionName "1.0"
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 4e5b87b..1080956 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -24,10 +24,8 @@
-
-
\ No newline at end of file
diff --git a/app/src/main/ic_launcher-playstore.png b/app/src/main/ic_launcher-playstore.png
new file mode 100644
index 0000000..34cd542
Binary files /dev/null and b/app/src/main/ic_launcher-playstore.png differ
diff --git a/app/src/main/java/io/github/chronosx88/yggdrasil/MainActivity.kt b/app/src/main/java/io/github/chronosx88/yggdrasil/MainActivity.kt
index 49e3421..0e9a83e 100644
--- a/app/src/main/java/io/github/chronosx88/yggdrasil/MainActivity.kt
+++ b/app/src/main/java/io/github/chronosx88/yggdrasil/MainActivity.kt
@@ -1,51 +1,78 @@
package io.github.chronosx88.yggdrasil
+import android.R.attr
import android.app.Activity
+import android.app.PendingIntent
import android.content.Intent
import android.net.VpnService
import android.os.Bundle
-import android.widget.Button
+import android.util.Log
+import android.widget.RadioGroup
+import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
class MainActivity : AppCompatActivity() {
- private var isYggStarted = false
+ companion object {
+ const val PARAM_PINTENT = "pendingIntent"
+ const val STATUS_START = 1
+ const val STATUS_FINISH = 0
+ const val IPv6: String = "IPv6"
+ private const val TAG="Yggdrasil"
+ private const val VPN_REQUEST_CODE = 0x0F
+ }
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
+ val connectRadioGroup = findViewById(R.id.connectRadioGroup)
+ connectRadioGroup.setOnCheckedChangeListener { group, checkedId ->
+ when (checkedId) {
+ R.id.disconnectButton -> stopVpn()
+ R.id.connectButton -> startVpn()
+ else -> { // Note the block
- val connectButton = findViewById