-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
๐ :: (#13) - add qrcode function #51
Changes from 18 commits
5320bf3
dde3add
9276a7d
44b7094
9d1ba91
b29441d
a641d6b
f7de637
628575a
689fa8d
3f51b44
13002dc
57f0f58
125eb4b
b39533b
f9910a9
9303f45
e92f07c
b17718c
345e82f
4fec43b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="129dp" | ||
android:height="128dp" | ||
android:viewportWidth="129" | ||
android:viewportHeight="128"> | ||
<path | ||
android:pathData="M8.5,49V8H48.5V4H7.5C5.84,4 4.5,5.34 4.5,7V49H8.5ZM48.5,120H8.5V49L8.5,79H4.5V121C4.5,122.66 5.84,124 7.5,124H48.5V120ZM80.5,120V124H121.5C123.16,124 124.5,122.66 124.5,121V79H120.5V120H80.5ZM120.5,49H124.5V7C124.5,5.34 123.16,4 121.5,4H80.5V8H120.5V49Z" | ||
android:fillColor="#ffffff" | ||
android:fillType="evenOdd"/> | ||
<group> | ||
<clip-path | ||
android:pathData="M8.5,49V8H48.5V4H7.5C5.84,4 4.5,5.34 4.5,7V49H8.5ZM48.5,120H8.5V49L8.5,79H4.5V121C4.5,122.66 5.84,124 7.5,124H48.5V120ZM80.5,120V124H121.5C123.16,124 124.5,122.66 124.5,121V79H120.5V120H80.5ZM120.5,49H124.5V7C124.5,5.34 123.16,4 121.5,4H80.5V8H120.5V49Z" | ||
android:fillType="evenOdd"/> | ||
<path | ||
android:pathData="M8.5,8V7.9H8.4V8H8.5ZM48.5,8V8.1H48.6V8H48.5ZM48.5,4H48.6V3.9H48.5V4ZM4.5,49H4.4V49.1H4.5V49ZM8.5,120H8.4V120.1H8.5V120ZM48.5,120H48.6V119.9H48.5V120ZM8.5,79V79.1H8.6V79H8.5ZM4.5,79V78.9H4.4V79H4.5ZM48.5,124V124.1H48.6V124H48.5ZM80.5,124H80.4V124.1H80.5V124ZM80.5,120V119.9H80.4V120H80.5ZM124.5,79H124.6V78.9H124.5V79ZM120.5,79V78.9H120.4V79H120.5ZM120.5,120V120.1H120.6V120H120.5ZM124.5,49V49.1H124.6V49H124.5ZM120.5,49H120.4V49.1H120.5V49ZM80.5,4V3.9H80.4V4H80.5ZM80.5,8H80.4V8.1H80.5V8ZM120.5,8H120.6V7.9H120.5V8ZM8.4,8V49H8.6V8H8.4ZM48.5,7.9H8.5V8.1H48.5V7.9ZM48.4,4V8H48.6V4H48.4ZM48.5,3.9H7.5V4.1H48.5V3.9ZM7.5,3.9C5.79,3.9 4.4,5.29 4.4,7H4.6C4.6,5.4 5.9,4.1 7.5,4.1V3.9ZM4.4,7V49H4.6V7H4.4ZM4.5,49.1H8.5V48.9H4.5V49.1ZM8.5,120.1H48.5V119.9H8.5V120.1ZM8.4,49V120H8.6V49H8.4ZM8.4,49L8.4,79H8.6L8.6,49H8.4ZM8.5,78.9H4.5V79.1H8.5V78.9ZM4.4,79V121H4.6V79H4.4ZM4.4,121C4.4,122.71 5.79,124.1 7.5,124.1V123.9C5.9,123.9 4.6,122.6 4.6,121H4.4ZM7.5,124.1H48.5V123.9H7.5V124.1ZM48.4,120V124H48.6V120H48.4ZM80.6,124V120H80.4V124H80.6ZM80.5,124.1H121.5V123.9H80.5V124.1ZM121.5,124.1C123.21,124.1 124.6,122.71 124.6,121H124.4C124.4,122.6 123.1,123.9 121.5,123.9V124.1ZM124.6,121V79H124.4V121H124.6ZM120.5,79.1H124.5V78.9H120.5V79.1ZM120.6,120V79H120.4V120H120.6ZM80.5,120.1H120.5V119.9H80.5V120.1ZM124.5,48.9H120.5V49.1H124.5V48.9ZM124.6,49V7H124.4V49H124.6ZM124.6,7C124.6,5.29 123.21,3.9 121.5,3.9V4.1C123.1,4.1 124.4,5.4 124.4,7H124.6ZM121.5,3.9H80.5V4.1H121.5V3.9ZM80.6,8V4H80.4V8H80.6ZM120.5,7.9H80.5V8.1H120.5V7.9ZM120.6,49V8H120.4V49H120.6Z" | ||
android:fillColor="#4D4D4D"/> | ||
</group> | ||
</vector> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.goms.domain.outing | ||
|
||
import com.goms.data.repository.outing.OutingRepository | ||
import kotlinx.coroutines.flow.Flow | ||
import java.util.UUID | ||
import javax.inject.Inject | ||
|
||
class OutingUseCase @Inject constructor( | ||
private val outingRepository: OutingRepository | ||
) { | ||
suspend operator fun invoke(outingUUID: UUID): Flow<Unit> = | ||
outingRepository.outing(outingUUID) | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ๋ฐํํ๋ ๊ฐ์ด ์์ผ๋ฉด runCatching์ ์ฌ์ฉํ๋๊ฒ ๋ ์ข์๊ฑฐ ๊ฐ์์ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
package com.goms.main | ||
|
||
import android.util.Log | ||
import androidx.compose.foundation.background | ||
import androidx.compose.foundation.layout.Arrangement | ||
import androidx.compose.foundation.layout.Box | ||
|
@@ -37,7 +38,8 @@ fun MainRoute( | |
viewModelStoreOwner: ViewModelStoreOwner, | ||
onOutingStatusClick: () -> Unit, | ||
onLateListClick: () -> Unit, | ||
onStudentManagementClick: () -> Unit | ||
onStudentManagementClick: () -> Unit, | ||
onQrcodeClick: () -> Unit | ||
) { | ||
MainViewModelProvider(viewModelStoreOwner = viewModelStoreOwner) { viewModel -> | ||
val role by viewModel.role.collectAsStateWithLifecycle(initialValue = "") | ||
|
@@ -55,6 +57,7 @@ fun MainRoute( | |
onOutingStatusClick = onOutingStatusClick, | ||
onLateListClick = onLateListClick, | ||
onStudentManagementClick = onStudentManagementClick, | ||
onQrcodeClick = onQrcodeClick, | ||
mainCallBack = { | ||
viewModel.getProfile() | ||
viewModel.getLateRankList() | ||
|
@@ -74,6 +77,7 @@ fun MainScreen( | |
onOutingStatusClick: () -> Unit, | ||
onLateListClick: () -> Unit, | ||
onStudentManagementClick: () -> Unit, | ||
onQrcodeClick: () -> Unit, | ||
mainCallBack: () -> Unit | ||
) { | ||
LaunchedEffect(true) { | ||
|
@@ -125,7 +129,9 @@ fun MainScreen( | |
.align(Alignment.BottomEnd) | ||
.padding(end = 16.dp, bottom = 16.dp), | ||
role = role | ||
) {} | ||
) { | ||
onQrcodeClick() | ||
} | ||
Comment on lines
+132
to
+134
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ์ฌ๊ธฐ์ ํด๋ฆญํ์๋์ qr scan์ผ๋ก ์ด๋ํ๋๋ฐ ์ ๊ฐ component์์ ๋ฐ๋ก ๋ถ๋ฆฌ๋ฅผ ์ํด๋์ ์ด๋๋ฏผํ ๋ ์์ ํ์ํ ๊ฑฐ ๊ฐ์์ ์ง๊ธ์ ๊ด์ฐฎ์๋ฐ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ์ด๊ฑด ๋์ค์ ์ปดํฌ๋ํธ์์ ์ ์ ์ด๋๊ณผ ์ด๋๋ฏผ ์ด๋์ ๋๋๋๊ฒ ์ข์๋ณด์ฌ์ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ์ด๊ฒ๋ ๊ฐ์ ์ด์ ์ ๋๋ค |
||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import com.goms.goms_android_v2.libs | ||
|
||
plugins { | ||
id("goms.android.feature") | ||
id("goms.android.hilt") | ||
} | ||
|
||
android { | ||
namespace = "com.goms.qrcode_scan" | ||
} | ||
|
||
dependencies { | ||
add("implementation", libs.findLibrary("camera.core").get()) | ||
add("implementation", libs.findLibrary("camera.view").get()) | ||
add("implementation", libs.findLibrary("camera.camera2").get()) | ||
add("implementation", libs.findLibrary("camera.lifecycle").get()) | ||
add("implementation", libs.findLibrary("camera.extensions").get()) | ||
|
||
add("implementation", libs.findLibrary("mlkit").get()) | ||
|
||
add("implementation", libs.findLibrary("accompanist.permission").get()) | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.goms.qrcode_scan | ||
|
||
import androidx.test.platform.app.InstrumentationRegistry | ||
import androidx.test.ext.junit.runners.AndroidJUnit4 | ||
|
||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
|
||
import org.junit.Assert.* | ||
|
||
/** | ||
* Instrumented test, which will execute on an Android device. | ||
* | ||
* See [testing documentation](http://d.android.com/tools/testing). | ||
*/ | ||
@RunWith(AndroidJUnit4::class) | ||
class ExampleInstrumentedTest { | ||
@Test | ||
fun useAppContext() { | ||
// Context of the app under test. | ||
val appContext = InstrumentationRegistry.getInstrumentation().targetContext | ||
assertEquals("com.goms.qrcode_scan.test", appContext.packageName) | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
</manifest> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ด๊ฑฐ ์ด๋ฆ์ onQrcodeClick๋ง๊ณ onQrcodeScanClick์ผ๋ก ๋ฐ๊พธ๋๊ฒ ์ข์ง ์์๊น์ ์ด๋๋ฏผ qr ์์ฑ๋ ํด์ผํ๋๋ฐ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋์ค์ ๋ฐ๋ก ๋ก์ง ์ถ๊ฐํด์ ์ฒ๋ฆฌํ๋๊ฒ ๋ ๋์๊ฑฐ ๊ฐ์์ ์ ๋ ๊ฒ ํ์ด์