From 9e12972677e868a51e048fc71ef20a6a7354b1dc Mon Sep 17 00:00:00 2001 From: raphael Date: Sun, 12 Dec 2021 15:51:52 +0100 Subject: [PATCH] updates app name, fixes first camera access --- app/build.gradle | 2 +- .../java/com/example/bump/ExampleInstrumentedTest.kt | 4 ++-- app/src/main/AndroidManifest.xml | 2 +- app/src/main/java/com/example/bump/CameraFragment.kt | 5 +++-- app/src/main/java/com/example/bump/CameraXViewModel.kt | 2 +- app/src/main/java/com/example/bump/FirstFragment.kt | 4 ++-- app/src/main/java/com/example/bump/MainActivity.kt | 4 ++-- app/src/main/java/com/example/bump/SecondFragment.kt | 4 ++-- app/src/main/res/menu/menu_main.xml | 2 +- app/src/main/res/navigation/nav_graph.xml | 6 +++--- app/src/main/res/values/strings.xml | 2 +- app/src/test/java/com/example/bump/ExampleUnitTest.kt | 2 +- settings.gradle | 2 +- 13 files changed, 21 insertions(+), 20 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 51fa55d..b800cf1 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,7 +7,7 @@ android { compileSdk 32 defaultConfig { - applicationId "com.example.bump" + applicationId "com.maenle.bump" minSdk 29 targetSdk 32 versionCode 1 diff --git a/app/src/androidTest/java/com/example/bump/ExampleInstrumentedTest.kt b/app/src/androidTest/java/com/example/bump/ExampleInstrumentedTest.kt index 9e42ff4..481b278 100644 --- a/app/src/androidTest/java/com/example/bump/ExampleInstrumentedTest.kt +++ b/app/src/androidTest/java/com/example/bump/ExampleInstrumentedTest.kt @@ -1,4 +1,4 @@ -package com.example.bump +package com.maenle.bump import androidx.test.platform.app.InstrumentationRegistry import androidx.test.ext.junit.runners.AndroidJUnit4 @@ -19,6 +19,6 @@ class ExampleInstrumentedTest { fun useAppContext() { // Context of the app under test. val appContext = InstrumentationRegistry.getInstrumentation().targetContext - assertEquals("com.example.bump", appContext.packageName) + assertEquals("com.maenle.bump", appContext.packageName) } } \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index f7cdebe..4610afc 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@ + package="com.maenle.bump"> diff --git a/app/src/main/java/com/example/bump/CameraFragment.kt b/app/src/main/java/com/example/bump/CameraFragment.kt index 58df643..fd7aa54 100644 --- a/app/src/main/java/com/example/bump/CameraFragment.kt +++ b/app/src/main/java/com/example/bump/CameraFragment.kt @@ -1,4 +1,4 @@ -package com.example.bump +package com.maenle.bump import android.Manifest import android.annotation.SuppressLint @@ -17,7 +17,7 @@ import androidx.core.app.ActivityCompat import androidx.core.content.ContextCompat import androidx.fragment.app.Fragment import androidx.lifecycle.ViewModelProvider -import com.example.bump.databinding.FragmentSecondBinding +import com.maenle.bump.databinding.FragmentSecondBinding import com.google.mlkit.vision.barcode.Barcode import com.google.mlkit.vision.barcode.BarcodeScanner import com.google.mlkit.vision.barcode.BarcodeScannerOptions @@ -90,6 +90,7 @@ class CameraFragment: Fragment() { arrayOf(Manifest.permission.CAMERA), PERMISSION_CAMERA_REQUEST ) + bindCameraUseCases() } } } diff --git a/app/src/main/java/com/example/bump/CameraXViewModel.kt b/app/src/main/java/com/example/bump/CameraXViewModel.kt index 2a17243..c20159b 100644 --- a/app/src/main/java/com/example/bump/CameraXViewModel.kt +++ b/app/src/main/java/com/example/bump/CameraXViewModel.kt @@ -1,4 +1,4 @@ -package com.example.bump +package com.maenle.bump import android.app.Application import android.util.Log diff --git a/app/src/main/java/com/example/bump/FirstFragment.kt b/app/src/main/java/com/example/bump/FirstFragment.kt index 13c7eb0..1941bcd 100644 --- a/app/src/main/java/com/example/bump/FirstFragment.kt +++ b/app/src/main/java/com/example/bump/FirstFragment.kt @@ -1,4 +1,4 @@ -package com.example.bump +package com.maenle.bump import android.os.Bundle import androidx.fragment.app.Fragment @@ -6,7 +6,7 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.navigation.fragment.findNavController -import com.example.bump.databinding.FragmentFirstBinding +import com.maenle.bump.databinding.FragmentFirstBinding /** * A simple [Fragment] subclass as the default destination in the navigation. diff --git a/app/src/main/java/com/example/bump/MainActivity.kt b/app/src/main/java/com/example/bump/MainActivity.kt index fe14df8..77cea73 100644 --- a/app/src/main/java/com/example/bump/MainActivity.kt +++ b/app/src/main/java/com/example/bump/MainActivity.kt @@ -1,4 +1,4 @@ -package com.example.bump +package com.maenle.bump import android.os.Bundle import com.google.android.material.snackbar.Snackbar @@ -9,7 +9,7 @@ import androidx.navigation.ui.navigateUp import androidx.navigation.ui.setupActionBarWithNavController import android.view.Menu import android.view.MenuItem -import com.example.bump.databinding.ActivityMainBinding +import com.maenle.bump.databinding.ActivityMainBinding class MainActivity : AppCompatActivity() { diff --git a/app/src/main/java/com/example/bump/SecondFragment.kt b/app/src/main/java/com/example/bump/SecondFragment.kt index 9ac1b12..82ff507 100644 --- a/app/src/main/java/com/example/bump/SecondFragment.kt +++ b/app/src/main/java/com/example/bump/SecondFragment.kt @@ -1,4 +1,4 @@ -package com.example.bump +package com.maenle.bump import android.os.Bundle import androidx.fragment.app.Fragment @@ -6,7 +6,7 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.navigation.fragment.findNavController -import com.example.bump.databinding.FragmentSecondBinding +import com.maenle.bump.databinding.FragmentSecondBinding /** * A simple [Fragment] subclass as the second destination in the navigation. diff --git a/app/src/main/res/menu/menu_main.xml b/app/src/main/res/menu/menu_main.xml index 5f8c335..3a4c8c5 100644 --- a/app/src/main/res/menu/menu_main.xml +++ b/app/src/main/res/menu/menu_main.xml @@ -1,7 +1,7 @@ + tools:context="com.maenle.bump.MainActivity"> @@ -17,7 +17,7 @@ @@ -27,7 +27,7 @@ diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 1a0f73a..17943fa 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,5 +1,5 @@ - Bump for Android + Bump Settings First Fragment diff --git a/app/src/test/java/com/example/bump/ExampleUnitTest.kt b/app/src/test/java/com/example/bump/ExampleUnitTest.kt index d0b368f..c90ee07 100644 --- a/app/src/test/java/com/example/bump/ExampleUnitTest.kt +++ b/app/src/test/java/com/example/bump/ExampleUnitTest.kt @@ -1,4 +1,4 @@ -package com.example.bump +package com.maenle.bump import org.junit.Test diff --git a/settings.gradle b/settings.gradle index e1a317b..c38f58c 100644 --- a/settings.gradle +++ b/settings.gradle @@ -6,5 +6,5 @@ dependencyResolutionManagement { jcenter() // Warning: this repository is going to shut down soon } } -rootProject.name = "Bump for Android" +rootProject.name = "Bump" include ':app'