From 2d080d4b7d3fb35232f425d0139171c517921c2a Mon Sep 17 00:00:00 2001 From: Joren Date: Wed, 1 May 2024 23:24:51 +0200 Subject: [PATCH] Make some updates to server connection --- .idea/deploymentTargetDropDown.xml | 47 ++++++++++++++++++- .idea/misc.xml | 1 - app/src/main/AndroidManifest.xml | 4 ++ app/src/main/java/com/ti/m/GoodSoftware.kt | 54 ++++++++++++++++------ app/src/main/java/com/ti/m/MainActivity.kt | 40 ++++++++++++++-- 5 files changed, 125 insertions(+), 21 deletions(-) diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml index 2006c4b..1698150 100644 --- a/.idea/deploymentTargetDropDown.xml +++ b/.idea/deploymentTargetDropDown.xml @@ -3,7 +3,52 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.idea/misc.xml b/.idea/misc.xml index 0ad17cb..8978d23 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,4 +1,3 @@ - diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 103d595..1114934 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -2,6 +2,10 @@ + + + + , grantResults: IntArray) { + super.onRequestPermissionsResult(requestCode, permissions, grantResults) + if (requestCode == REQUEST_CAMERA_PERMISSION) { + if (grantResults.isNotEmpty() && grantResults[0] == PackageManager.PERMISSION_GRANTED) { + // Permission granted, proceed with your camera operations + lifecycleScope.launch { + goo.takeBeautifulPicture(this@MainActivity) + } + } else { + // Permission denied + Toast.makeText(this, "Camera permission denied", Toast.LENGTH_SHORT).show() + } } } }