Skip to content

Commit 4f91a31

Browse files
authored
Merge pull request #1 from TheLuckyCoder/master
Add Android App
2 parents b398921 + 93ced04 commit 4f91a31

File tree

78 files changed

+3027
-0
lines changed

Some content is hidden

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

78 files changed

+3027
-0
lines changed

README.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
# QR Authentification - QPerior Hackhaton 5.11.2022 - 6.11.2022
22
The main ideea of this app built during the Q-Perior Hackhaton is for people from a organizations to access and book rooms by scanning a certain qr.
33
If the user is logged in into the app and has enough permissions to open the dor, the server will send a request to that specific dor to open it.
4+
5+
## Final result
6+
<p float="left">
7+
<img src="/screenshots/screenshot1.jpeg" width="300" />
8+
<img src="/screenshots/screenshot2.jpeg" width="300" />
9+
<img src="/screenshots/screenshot3.png" width="300" />
10+
</p>

app/.gitignore

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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
15+
local.properties

app/.idea/.gitignore

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

app/.idea/.name

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

app/.idea/compiler.xml

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

app/.idea/gradle.xml

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

app/.idea/inspectionProfiles/Project_Default.xml

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

app/.idea/jarRepositories.xml

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

app/.idea/misc.xml

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

app/app/.gitignore

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

app/app/build.gradle.kts

+128
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
plugins {
2+
id("com.android.application")
3+
4+
kotlin("android")
5+
kotlin("kapt")
6+
kotlin("plugin.serialization") version "1.7.20"
7+
id("kotlin-parcelize")
8+
id("dagger.hilt.android.plugin")
9+
}
10+
11+
android {
12+
compileSdk = 33
13+
namespace = "net.theluckycoder.qr"
14+
15+
defaultConfig {
16+
applicationId = "net.theluckycoder.qr"
17+
minSdk = 30
18+
targetSdk = 32
19+
versionCode = 1
20+
versionName = "1.0"
21+
resourceConfigurations += listOf("en")
22+
23+
/*javaCompileOptions {
24+
annotationProcessorOptions {
25+
arguments += mapOf(
26+
"room.schemaLocation" to "$projectDir/schemas",
27+
"room.incremental" to "true",
28+
"room.expandProjection" to "true"
29+
)
30+
}
31+
}*/
32+
}
33+
34+
buildTypes {
35+
debug {
36+
versionNameSuffix = "-debug"
37+
// applicationIdSuffix = ".debug"
38+
}
39+
release {
40+
isMinifyEnabled = true
41+
isShrinkResources = true
42+
proguardFiles("proguard-rules.pro")
43+
}
44+
}
45+
46+
buildFeatures.compose = true
47+
48+
compileOptions {
49+
sourceCompatibility = JavaVersion.VERSION_11
50+
targetCompatibility = JavaVersion.VERSION_11
51+
}
52+
53+
composeOptions {
54+
kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get()
55+
}
56+
}
57+
58+
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class).configureEach {
59+
kotlinOptions {
60+
jvmTarget = "11"
61+
freeCompilerArgs = freeCompilerArgs + listOf("-Xjvm-default=all")
62+
}
63+
}
64+
65+
dependencies {
66+
val voyagerVersion = "1.0.0-rc02"
67+
68+
// Kotlin
69+
kotlin("kotlin-stdlib-jdk8")
70+
debugImplementation(libs.kotlinReflect)
71+
implementation(libs.kotlinCoroutinesAndroid)
72+
implementation(libs.kotlinSerializationJson)
73+
implementation(libs.kotlinDateTime)
74+
75+
// AndroidX
76+
implementation("androidx.activity:activity-ktx:1.6.1")
77+
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1")
78+
implementation("androidx.datastore:datastore-preferences:1.0.0")
79+
80+
// Room
81+
// implementation(libs.room.runtime)
82+
// implementation(libs.room.paging)
83+
// kapt(libs.room.compiler)
84+
85+
// Compose
86+
implementation(libs.compose.compiler)
87+
implementation(libs.compose.ui)
88+
implementation(libs.compose.toolingPreview)
89+
debugImplementation(libs.compose.tooling)
90+
implementation(libs.compose.foundation)
91+
implementation(libs.compose.material)
92+
implementation(libs.compose.material3)
93+
implementation(libs.compose.animation)
94+
implementation(libs.compose.activity)
95+
implementation(libs.compose.icons)
96+
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.5.1")
97+
98+
// Voyager
99+
implementation("cafe.adriel.voyager:voyager-navigator:$voyagerVersion")
100+
implementation("cafe.adriel.voyager:voyager-tab-navigator:$voyagerVersion")
101+
implementation("cafe.adriel.voyager:voyager-bottom-sheet-navigator:$voyagerVersion")
102+
// implementation("cafe.adriel.voyager:voyager-transitions:$voyagerVersion")
103+
implementation("cafe.adriel.voyager:voyager-androidx:$voyagerVersion")
104+
105+
// Retrofit
106+
implementation("com.squareup.retrofit2:retrofit:2.9.0")
107+
implementation("de.nycode:retrofit2-kotlinx-serialization-converter:0.11.0")
108+
implementation("com.squareup.okhttp3:okhttp-tls:4.10.0")
109+
implementation("com.squareup.okhttp3:logging-interceptor:4.10.0")
110+
111+
// Accompanist
112+
implementation(libs.accompanist.pager)
113+
implementation(libs.accompanist.swipeRefresh)
114+
implementation(libs.accompanist.systemUi)
115+
implementation(libs.accompanist.permissions)
116+
117+
// Hilt
118+
implementation(libs.dagger.android)
119+
kapt(libs.dagger.compiler)
120+
kapt(libs.dagger.hilt.compiler)
121+
122+
implementation("com.journeyapps:zxing-android-embedded:4.1.0") { isTransitive = false }
123+
implementation("com.google.zxing:core:3.4.0")
124+
125+
implementation("com.marosseleng.android:compose-material3-datetime-pickers:+")
126+
implementation("io.github.boguszpawlowski.composecalendar:composecalendar:1.0.1")
127+
implementation("io.github.boguszpawlowski.composecalendar:kotlinx-datetime:1.0.1")
128+
}

app/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.kts.kts.
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

app/app/src/main/AndroidManifest.xml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools">
4+
5+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
6+
<uses-permission android:name="android.permission.CAMERA" />
7+
<uses-permission android:name="android.permission.INTERNET" />
8+
9+
<application
10+
android:name=".App"
11+
android:allowBackup="true"
12+
android:dataExtractionRules="@xml/data_extraction_rules"
13+
android:fullBackupContent="@xml/backup_rules"
14+
android:icon="@mipmap/ic_launcher"
15+
android:label="@string/app_name"
16+
android:roundIcon="@mipmap/ic_launcher_round"
17+
android:theme="@style/Theme.QRScanner"
18+
tools:targetApi="31">
19+
<activity
20+
android:name=".MainActivity"
21+
android:exported="true"
22+
android:label="@string/app_name"
23+
android:theme="@style/Theme.QRScanner">
24+
<intent-filter>
25+
<action android:name="android.intent.action.MAIN" />
26+
27+
<category android:name="android.intent.category.LAUNCHER" />
28+
</intent-filter>
29+
30+
<meta-data
31+
android:name="android.app.lib_name"
32+
android:value="" />
33+
</activity>
34+
</application>
35+
36+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package net.theluckycoder.qr
2+
3+
import android.app.Application
4+
import dagger.hilt.android.HiltAndroidApp
5+
6+
@HiltAndroidApp
7+
class App : Application() {
8+
}

0 commit comments

Comments
 (0)