diff --git a/app/src/main/java/com/github/libretube/activities/AboutActivity.kt b/app/src/main/java/com/github/libretube/activities/AboutActivity.kt
index 0f686b483..e02a1edd7 100644
--- a/app/src/main/java/com/github/libretube/activities/AboutActivity.kt
+++ b/app/src/main/java/com/github/libretube/activities/AboutActivity.kt
@@ -30,6 +30,17 @@ class AboutActivity : BaseActivity() {
binding = ActivityAboutBinding.inflate(layoutInflater)
setContentView(binding.root)
+ binding.appIcon.setOnClickListener {
+ val sendIntent: Intent = Intent().apply {
+ action = Intent.ACTION_SEND
+ putExtra(Intent.EXTRA_TEXT, GITHUB_URL)
+ type = "text/plain"
+ }
+
+ val shareIntent = Intent.createChooser(sendIntent, null)
+ startActivity(shareIntent)
+ }
+
binding.website.setOnClickListener {
openLinkFromHref(WEBSITE_URL)
}
@@ -77,6 +88,10 @@ class AboutActivity : BaseActivity() {
onLongClick(LICENSE_URL)
true
}
+
+ binding.device.setOnClickListener {
+ showDeviceInfo()
+ }
}
private fun openLinkFromHref(link: String) {
@@ -120,4 +135,20 @@ class AboutActivity : BaseActivity() {
.create()
.show()
}
+
+ private fun showDeviceInfo() {
+ val text = "Manufacturer: ${Build.MANUFACTURER}\n" +
+ "Model: ${Build.MODEL}\n" +
+ "SDK: ${Build.VERSION.SDK_INT}\n" +
+ "Board: ${Build.BOARD}\n" +
+ "OS: Android ${Build.VERSION.RELEASE}\n" +
+ "Arch: ${Build.SUPPORTED_ABIS[0]}\n" +
+ "Product: ${Build.PRODUCT}"
+
+ MaterialAlertDialogBuilder(this)
+ .setTitle(R.string.device_info)
+ .setMessage(text)
+ .setPositiveButton(R.string.okay, null)
+ .show()
+ }
}
diff --git a/app/src/main/res/drawable/ic_device.xml b/app/src/main/res/drawable/ic_device.xml
new file mode 100644
index 000000000..8ae0007a4
--- /dev/null
+++ b/app/src/main/res/drawable/ic_device.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/main/res/layout/activity_about.xml b/app/src/main/res/layout/activity_about.xml
index e9c7e5914..4999b4636 100644
--- a/app/src/main/res/layout/activity_about.xml
+++ b/app/src/main/res/layout/activity_about.xml
@@ -6,10 +6,11 @@
@@ -135,6 +136,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 3613bada4..9fba8cc81 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -312,4 +312,5 @@
Open
Minutes before being reminded
Legacy subscriptions view
+ Device Info