updates app name, fixes first camera access
This commit is contained in:
parent
59044e0554
commit
9e12972677
@ -7,7 +7,7 @@ android {
|
|||||||
compileSdk 32
|
compileSdk 32
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.example.bump"
|
applicationId "com.maenle.bump"
|
||||||
minSdk 29
|
minSdk 29
|
||||||
targetSdk 32
|
targetSdk 32
|
||||||
versionCode 1
|
versionCode 1
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package com.example.bump
|
package com.maenle.bump
|
||||||
|
|
||||||
import androidx.test.platform.app.InstrumentationRegistry
|
import androidx.test.platform.app.InstrumentationRegistry
|
||||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||||
@ -19,6 +19,6 @@ class ExampleInstrumentedTest {
|
|||||||
fun useAppContext() {
|
fun useAppContext() {
|
||||||
// Context of the app under test.
|
// Context of the app under test.
|
||||||
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
|
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
|
||||||
assertEquals("com.example.bump", appContext.packageName)
|
assertEquals("com.maenle.bump", appContext.packageName)
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.example.bump">
|
package="com.maenle.bump">
|
||||||
|
|
||||||
<uses-feature android:name="android.hardware.camera.any" />
|
<uses-feature android:name="android.hardware.camera.any" />
|
||||||
<uses-permission android:name="android.permission.CAMERA" />
|
<uses-permission android:name="android.permission.CAMERA" />
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package com.example.bump
|
package com.maenle.bump
|
||||||
|
|
||||||
import android.Manifest
|
import android.Manifest
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
@ -17,7 +17,7 @@ import androidx.core.app.ActivityCompat
|
|||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.lifecycle.ViewModelProvider
|
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.Barcode
|
||||||
import com.google.mlkit.vision.barcode.BarcodeScanner
|
import com.google.mlkit.vision.barcode.BarcodeScanner
|
||||||
import com.google.mlkit.vision.barcode.BarcodeScannerOptions
|
import com.google.mlkit.vision.barcode.BarcodeScannerOptions
|
||||||
@ -90,6 +90,7 @@ class CameraFragment: Fragment() {
|
|||||||
arrayOf(Manifest.permission.CAMERA),
|
arrayOf(Manifest.permission.CAMERA),
|
||||||
PERMISSION_CAMERA_REQUEST
|
PERMISSION_CAMERA_REQUEST
|
||||||
)
|
)
|
||||||
|
bindCameraUseCases()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package com.example.bump
|
package com.maenle.bump
|
||||||
|
|
||||||
import android.app.Application
|
import android.app.Application
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package com.example.bump
|
package com.maenle.bump
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
@ -6,7 +6,7 @@ import android.view.LayoutInflater
|
|||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.navigation.fragment.findNavController
|
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.
|
* A simple [Fragment] subclass as the default destination in the navigation.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package com.example.bump
|
package com.maenle.bump
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import com.google.android.material.snackbar.Snackbar
|
import com.google.android.material.snackbar.Snackbar
|
||||||
@ -9,7 +9,7 @@ import androidx.navigation.ui.navigateUp
|
|||||||
import androidx.navigation.ui.setupActionBarWithNavController
|
import androidx.navigation.ui.setupActionBarWithNavController
|
||||||
import android.view.Menu
|
import android.view.Menu
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
import com.example.bump.databinding.ActivityMainBinding
|
import com.maenle.bump.databinding.ActivityMainBinding
|
||||||
|
|
||||||
class MainActivity : AppCompatActivity() {
|
class MainActivity : AppCompatActivity() {
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package com.example.bump
|
package com.maenle.bump
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
@ -6,7 +6,7 @@ import android.view.LayoutInflater
|
|||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.navigation.fragment.findNavController
|
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.
|
* A simple [Fragment] subclass as the second destination in the navigation.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
tools:context="com.example.bump.MainActivity">
|
tools:context="com.maenle.bump.MainActivity">
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_settings"
|
android:id="@+id/action_settings"
|
||||||
android:orderInCategory="100"
|
android:orderInCategory="100"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/FirstFragment"
|
android:id="@+id/FirstFragment"
|
||||||
android:name="com.example.bump.FirstFragment"
|
android:name="com.maenle.bump.FirstFragment"
|
||||||
android:label="@string/first_fragment_label"
|
android:label="@string/first_fragment_label"
|
||||||
tools:layout="@layout/fragment_first">
|
tools:layout="@layout/fragment_first">
|
||||||
|
|
||||||
@ -17,7 +17,7 @@
|
|||||||
</fragment>
|
</fragment>
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/SecondFragment"
|
android:id="@+id/SecondFragment"
|
||||||
android:name="com.example.bump.SecondFragment"
|
android:name="com.maenle.bump.SecondFragment"
|
||||||
android:label="@string/second_fragment_label"
|
android:label="@string/second_fragment_label"
|
||||||
tools:layout="@layout/fragment_second">
|
tools:layout="@layout/fragment_second">
|
||||||
|
|
||||||
@ -27,7 +27,7 @@
|
|||||||
</fragment>
|
</fragment>
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/CameraFragment"
|
android:id="@+id/CameraFragment"
|
||||||
android:name="com.example.bump.CameraFragment"
|
android:name="com.maenle.bump.CameraFragment"
|
||||||
android:label="@string/camera_fragment_label"
|
android:label="@string/camera_fragment_label"
|
||||||
tools:layout="@layout/fragment_camera">
|
tools:layout="@layout/fragment_camera">
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">Bump for Android</string>
|
<string name="app_name">Bump</string>
|
||||||
<string name="action_settings">Settings</string>
|
<string name="action_settings">Settings</string>
|
||||||
<!-- Strings used for fragments for navigation -->
|
<!-- Strings used for fragments for navigation -->
|
||||||
<string name="first_fragment_label">First Fragment</string>
|
<string name="first_fragment_label">First Fragment</string>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package com.example.bump
|
package com.maenle.bump
|
||||||
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
|
|
||||||
|
@ -6,5 +6,5 @@ dependencyResolutionManagement {
|
|||||||
jcenter() // Warning: this repository is going to shut down soon
|
jcenter() // Warning: this repository is going to shut down soon
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rootProject.name = "Bump for Android"
|
rootProject.name = "Bump"
|
||||||
include ':app'
|
include ':app'
|
||||||
|
Loading…
Reference in New Issue
Block a user