Skip to content

로그아웃 버그 수정 #16

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

Merged
merged 13 commits into from
Jun 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/android-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ jobs:
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1

- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
java-version: '17'

- name: Download and set up Android SDK
uses: android-actions/setup-android@v2
Expand All @@ -54,15 +54,15 @@ jobs:
run: |
echo "$KEYSTORE_BASE64" | base64 --decode > release.keystore

- name: Build Release AAB
- name: Build Release AAB (with Java 17)
run: |
./gradlew bundleRelease \
-Pandroid.injected.signing.store.file=release.keystore \
-Pandroid.injected.signing.store.password=$KEYSTORE_PASSWORD \
-Pandroid.injected.signing.key.alias=$SIGNING_KEY_ALIAS \
-Pandroid.injected.signing.key.password=$SIGNING_KEY_PASSWORD
env:
JAVA_HOME: ${{ runner.tool_cache }}/java/temurin-11-jdk
JAVA_HOME: ${{ runner.tool_cache }}/java/temurin-17-jdk
ANDROID_SDK_ROOT: ${{ runner.tool_cache }}/android-sdk

- name: Create GitHub Release
Expand All @@ -81,7 +81,7 @@ jobs:

- name: Upload AAB to GitHub Release
if: steps.create_release.outputs.upload_url != ''
uses: softprops/action-upload-release-asset@v1
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: app/build/outputs/bundle/release/app-release.aab
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/sonarcloud-analyze.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: F-Lab SonarCloud Code Analyze

on:
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:

env:
CACHED_DEPENDENCIES_PATHS: '**/node_modules'

jobs:
CodeAnalyze:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set SonarCloud Project Key
run: |
REPO_NAME=$(echo $GITHUB_REPOSITORY | cut -d '/' -f 2)
ORG_NAME=$(echo $GITHUB_REPOSITORY | cut -d '/' -f 1)
SONAR_PROJECT_KEY="${ORG_NAME}_${REPO_NAME}"
echo "SONAR_PROJECT_KEY=$SONAR_PROJECT_KEY" >> $GITHUB_ENV

- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: '19'
distribution: 'adopt'

- name: Create Sonar Gradle File
run: |
insert_string="plugins { id 'org.sonarqube' version '4.4.1.3373' }"
if [ -f "build.gradle" ]; then
echo "$insert_string" > temp.gradle
cat build.gradle >> temp.gradle
echo "" >> temp.gradle
echo "sonarqube {" >> temp.gradle
echo " properties {" >> temp.gradle
echo " property 'sonar.java.binaries', '**'" >> temp.gradle
echo " }" >> temp.gradle
echo "}" >> temp.gradle
mv temp.gradle build.gradle
else
echo "$insert_string" > build.gradle
echo "" >> build.gradle
echo "sonarqube {" >> build.gradle
echo " properties {" >> build.gradle
echo " property 'sonar.java.binaries', '**'" >> build.gradle
echo " }" >> build.gradle
echo "}" >> build.gradle
fi
chmod 777 ./gradlew


- name: Analyze
run: ./gradlew sonar -Dsonar.projectKey=${{ env.SONAR_PROJECT_KEY }} -Dsonar.organization=f-lab-edu-1 -Dsonar.host.url=https://sonarcloud.io -Dsonar.token=${{ secrets.SECRET_SONARQUBE }} -Dsonar.gradle.skipCompile=true
env:
SONAR_TOKEN: ${{ secrets.SECRET_SONARQUBE }}


57 changes: 56 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,56 @@
# barcode-scanner
![app icon 240_240](https://github.com/user-attachments/assets/1f0dae10-bccb-4c87-8746-54ad2c847ea1)

![Android](https://img.shields.io/badge/Android-%2334A853?style=for-the-badge&logo=Android&logoColor=white)
![kotlin](https://img.shields.io/badge/Kotlin-%237F52FF?style=for-the-badge&logo=Kotlin&logoColor=white)

## 프로젝트 소개
카메라로 바코드를 스캔해서 코드를 추출해서 활용할 수 있는 앱입니다.

## 🚀 주요 기능

- 📷 1D/2D 바코드(예: QR 코드) 스캔
- 🔗 바코드 내 URL 자동 추출 및 열기
- 🕓 스캔 기록 확인
- 📋 스캔된 정보 복사 기능
- 📦 바코드로 Google sheet에서 데이터 불러오기

## 📸 스크린샷

| 스캔 화면 | sheet 화면 | 기록 목록 |
|-----------|------------|-------------|
| ![screenshot-barcode](https://github.com/user-attachments/assets/90e78030-4b38-4f33-8718-a98d19586928) | ![screenshot-sheet](https://github.com/user-attachments/assets/935fbb7c-b978-46a8-911e-67d0c208a257)| ![screenshot-history](https://github.com/user-attachments/assets/06a04aaf-4343-4d2c-865a-dc44888dd0b2)|



## 🛠 사용 기술

- Kotlin
- CameraX
- ML Kit Barcode Scanning API
- MVVM 아키텍처
- Hilt (의존성 주입)
- Jetpack Navigation
- Room (로컬 DB)
- DataStore (앱 설정 저장)

## ✅ 최소 요구사항

- Android 7.0 (API 24) 이상
- 카메라 권한 허용

## 🧾 Open Source Licenses
This project is licensed under the [Apache License 2.0](LICENSE).

It also uses the following open source libraries:
- [Retrofit](https://square.github.io/retrofit/) — Apache License 2.0
- [ML Kit Barcode Scanning](https://developers.google.com/ml-kit/vision/barcode-scanning) — Apache License 2.0
- [CameraX](https://developer.android.com/training/camerax) — Apache License 2.0
- [Hilt](https://dagger.dev/hilt/) — Apache License 2.0
- [AppAuth for Android](https://github.com/openid/AppAuth-Android) — Apache License 2.0
- [Jetpack DataStore](https://developer.android.com/topic/libraries/architecture/datastore) — Apache License 2.0
- [Room](https://developer.android.com/training/data-storage/room) — Apache License 2.0

## 개인정보처리방침
- [개인정보처리방침](https://f-lab-edu.github.io/barcode-scanner/privacy-policy.html)


Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ class TokenStorageImpl @Inject constructor(

override suspend fun clearAuthToken() {
context.tokenDataStore.edit { prefs ->
prefs.remove(Keys.ACCESS_TOKEN)
prefs.remove(Keys.REFRESH_TOKEN)
prefs.remove(Keys.KEY_STATE)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ class SettingViewModel @Inject constructor(
private val _authRequest = Channel<AuthorizationRequest>(Channel.BUFFERED)
val authRequest = _authRequest.receiveAsFlow()

private val _userInfo = MutableLiveData<UserInfo>(null)
val userInfo: LiveData<UserInfo>
private val _userInfo = MutableLiveData<UserInfo?>(null)
val userInfo: LiveData<UserInfo?>
get() = _userInfo

val isLogin: LiveData<Boolean> = _userInfo.map { it != null }
Expand Down
1 change: 1 addition & 0 deletions google263427aa81abbadf.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
google-site-verification: google263427aa81abbadf.html
Loading
Loading