diff --git a/app/build.gradle b/app/build.gradle index 3e76c3d..8b2ce2d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -33,6 +33,7 @@ android { } buildFeatures { viewBinding true + buildConfig true } } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 7a1883f..df3a472 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -2,6 +2,14 @@ + + + + + + - + android:value="${MAPS_API_KEY}" /> Unit) { - // TODO("Добавить получение местоположения от fusedLocationClient и передать результат в callback после получения") + + fusedLocationClient.getCurrentLocation(CurrentLocationRequest.Builder().build(), null) + .addOnCompleteListener { callback.invoke(it.result) } } private fun startCamera() { @@ -168,9 +205,11 @@ class CameraActivity : AppCompatActivity() { private const val TAG = "CameraXApp" private const val FILENAME_FORMAT = "yyyy-MM-dd-HH-mm-ss-SSS" private const val REQUEST_CODE_PERMISSIONS = 10 - // TODO("Указать набор требуемых разрешений") + private val REQUIRED_PERMISSIONS: Array = mutableListOf( - // TODO("Добавить требуемые разрешения") + ACCESS_COARSE_LOCATION, + ACCESS_FINE_LOCATION, + CAMERA ).toTypedArray() const val SUCCESS_RESULT_CODE = 15 diff --git a/build.gradle b/build.gradle index 2938249..3dca589 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,11 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. + +buildscript { + dependencies { + classpath("com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:2.0.1") + } +} + plugins { id 'com.android.application' version '8.7.3' apply false id 'com.android.library' version '8.7.3' apply false