Skip to content

Commit e43122e

Browse files
committed
First commit
0 parents  commit e43122e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1307
-0
lines changed

.gitignore

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/caches
5+
/.idea/libraries
6+
/.idea/modules.xml
7+
/.idea/workspace.xml
8+
/.idea/navEditor.xml
9+
/.idea/assetWizardSettings.xml
10+
.DS_Store
11+
/build
12+
/captures
13+
.externalNativeBuild
14+
.cxx

.idea/codeStyles/Project.xml

+122
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/codeStyles/codeStyleConfig.xml

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+25
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations.xml

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/build.gradle

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
apply plugin: 'com.android.application'
2+
apply plugin: 'kotlin-android'
3+
apply plugin: 'kotlin-android-extensions'
4+
5+
android {
6+
compileSdkVersion 29
7+
buildToolsVersion "29.0.2"
8+
9+
defaultConfig {
10+
applicationId "com.sample.android.cameraxmlkit"
11+
minSdkVersion 23
12+
targetSdkVersion 29
13+
versionCode 1
14+
versionName "1.0"
15+
16+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
17+
}
18+
19+
buildTypes {
20+
release {
21+
minifyEnabled false
22+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
23+
}
24+
}
25+
26+
viewBinding {
27+
enabled = true
28+
}
29+
30+
compileOptions {
31+
sourceCompatibility 1.8
32+
targetCompatibility 1.8
33+
}
34+
}
35+
36+
dependencies {
37+
implementation fileTree(dir: 'libs', include: ['*.jar'])
38+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
39+
implementation 'androidx.appcompat:appcompat:1.1.0'
40+
implementation 'androidx.core:core-ktx:1.2.0'
41+
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
42+
testImplementation 'junit:junit:4.12'
43+
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
44+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
45+
46+
def camerax_version = "1.0.0-beta02"
47+
implementation "androidx.camera:camera-camera2:${camerax_version}"
48+
// If you want to use the CameraX View class
49+
implementation "androidx.camera:camera-view:1.0.0-alpha09"
50+
// If you want to use the CameraX Extensions library
51+
implementation "androidx.camera:camera-extensions:1.0.0-alpha09"
52+
// If you want to use the CameraX Lifecycle library
53+
implementation "androidx.camera:camera-lifecycle:${camerax_version}"
54+
55+
// ML Kit dependencies
56+
implementation 'com.google.firebase:firebase-ml-vision:24.0.1'
57+
// Barcode detection model.
58+
implementation 'com.google.firebase:firebase-ml-vision-barcode-model:16.0.2'
59+
}
60+
61+
apply plugin: 'com.google.gms.google-services'

app/google-services.json

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"project_info": {
3+
"project_number": "1082498360877",
4+
"firebase_url": "https://cameraxmlkit-609cd.firebaseio.com",
5+
"project_id": "cameraxmlkit-609cd",
6+
"storage_bucket": "cameraxmlkit-609cd.appspot.com"
7+
},
8+
"client": [
9+
{
10+
"client_info": {
11+
"mobilesdk_app_id": "1:1082498360877:android:72cfbcbc02905e0654baa4",
12+
"android_client_info": {
13+
"package_name": "com.sample.android.cameraxmlkit"
14+
}
15+
},
16+
"oauth_client": [
17+
{
18+
"client_id": "1082498360877-11kqrav396gibt3e7gci609s29267dj2.apps.googleusercontent.com",
19+
"client_type": 3
20+
}
21+
],
22+
"api_key": [
23+
{
24+
"current_key": "AIzaSyCxrvxchadJ7U0d4iSALjiASvi9E1nl3rU"
25+
}
26+
],
27+
"services": {
28+
"appinvite_service": {
29+
"other_platform_oauth_client": [
30+
{
31+
"client_id": "1082498360877-11kqrav396gibt3e7gci609s29267dj2.apps.googleusercontent.com",
32+
"client_type": 3
33+
}
34+
]
35+
}
36+
}
37+
}
38+
],
39+
"configuration_version": "1"
40+
}

app/proguard-rules.pro

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.sample.android.cameraxmlkit
2+
3+
import androidx.test.platform.app.InstrumentationRegistry
4+
import androidx.test.ext.junit.runners.AndroidJUnit4
5+
6+
import org.junit.Test
7+
import org.junit.runner.RunWith
8+
9+
import org.junit.Assert.*
10+
11+
/**
12+
* Instrumented test, which will execute on an Android device.
13+
*
14+
* See [testing documentation](http://d.android.com/tools/testing).
15+
*/
16+
@RunWith(AndroidJUnit4::class)
17+
class ExampleInstrumentedTest {
18+
@Test
19+
fun useAppContext() {
20+
// Context of the app under test.
21+
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22+
assertEquals("com.sample.android.cameraxmlkit", appContext.packageName)
23+
}
24+
}

app/src/main/AndroidManifest.xml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.sample.android.cameraxmlkit">
4+
5+
<uses-permission android:name="android.permission.CAMERA" />
6+
7+
<application
8+
android:allowBackup="true"
9+
android:name=".CameraXMLKitApplication"
10+
android:icon="@mipmap/ic_launcher"
11+
android:label="@string/app_name"
12+
android:roundIcon="@mipmap/ic_launcher_round"
13+
android:supportsRtl="true"
14+
android:theme="@style/AppTheme">
15+
<activity android:name=".MainActivity">
16+
<intent-filter>
17+
<action android:name="android.intent.action.MAIN" />
18+
19+
<category android:name="android.intent.category.LAUNCHER" />
20+
</intent-filter>
21+
</activity>
22+
</application>
23+
24+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package com.sample.android.cameraxmlkit
2+
3+
import android.app.Application
4+
import androidx.camera.camera2.Camera2Config
5+
import androidx.camera.core.CameraXConfig
6+
7+
class CameraXMLKitApplication : Application(), CameraXConfig.Provider {
8+
override fun getCameraXConfig(): CameraXConfig {
9+
return Camera2Config.defaultConfig()
10+
}
11+
}

0 commit comments

Comments
 (0)