Skip to content
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
20 changes: 19 additions & 1 deletion NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ https://creativecommons.org/licenses/by/4.0/
================================================================================
3. Android Open Source Project (AndroidX, Jetpack Compose, Material Components)
================================================================================
androidx.core, androidx.lifecycle, androidx.activity,
androidx.core, androidx.lifecycle, androidx.activity, androidx.fragment,
androidx.compose.* , androidx.compose.material3

Copyright (C) The Android Open Source Project
Expand Down Expand Up @@ -173,5 +173,23 @@ SOFTWARE.

================================================================================

9. Google Play 인앱 업데이트 라이브러리 (#500)
--------------------------------------------
com.google.android.play:app-update, com.google.android.play:core-common
Play 스토어에서 설치한 앱이 도움말의 '업데이트 확인'에서 휴대폰의 Play 스토어 앱에
새 버전이 있는지 물을 때 씁니다. 이 라이브러리는 권한(인터넷 권한 포함)을 더하지 않습니다.

Copyright (C) Google LLC
Play Core Software Development Kit Terms of Service
https://developer.android.com/guide/playcore/license

com.google.android.gms:play-services-tasks, com.google.android.gms:play-services-basement
(위 라이브러리가 함께 가져옵니다)
Copyright (C) Google LLC
Android Software Development Kit License
https://developer.android.com/studio/terms.html

================================================================================

테스트에만 쓰이는 의존성(JUnit, Espresso, org.json 등)은 APK 에 포함되지 않으므로
위 목록에서 제외했습니다.
22 changes: 16 additions & 6 deletions PRIVACY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# SoundVisualizer 개인정보처리방침

시행일: 2026년 11월 25일
시행일: 2026년 11월 26일

SoundVisualizer(이하 "앱")는 팀 SOVIS가 만든 Android 앱입니다. 이 방침은 앱이 어떤 정보를 다루는지 설명합니다.

Expand Down Expand Up @@ -43,11 +43,16 @@ SoundVisualizer(이하 "앱")는 팀 SOVIS가 만든 Android 앱입니다. 이
- 앱 버전, Android 버전, 기기 모델, 앱 언어가 미리 채워집니다.
- 보낼지는 사용자가 정합니다. 보낸 내용은 GitHub 또는 메일 서비스의 정책을 따르며, GitHub 이슈는 누구나 볼 수 있습니다.

## 6. 방침의 변경
## 6. 업데이트 확인

- 도움말 탭의 '업데이트 확인'을 누르면, Play 스토어에서 설치한 경우 휴대폰의 Play 스토어 앱에 새 버전이 있는지 묻습니다. 앱이 직접 인터넷에 접속하지는 않으며, Play 스토어 앱이 주고받는 정보는 Google의 정책을 따릅니다.
- 다른 곳에서 설치했다면 그 스토어(원스토어 또는 Play 스토어)의 앱 페이지를 열 뿐입니다.

## 7. 방침의 변경

이 방침이 바뀌면 이 페이지에 알리고 시행일을 고칩니다.

## 7. 문의
## 8. 문의

- 팀 SOVIS
- sovis.kr@gmail.com
Expand All @@ -58,7 +63,7 @@ SoundVisualizer(이하 "앱")는 팀 SOVIS가 만든 Android 앱입니다. 이

# SoundVisualizer Privacy Policy

Effective date: November 25, 2026
Effective date: November 26, 2026

SoundVisualizer (the "app") is an Android app made by team SOVIS. This policy explains what information the app handles.

Expand Down Expand Up @@ -99,11 +104,16 @@ The app **does not collect any personal information.**
- The app version, Android version, device model and app language are filled in.
- You decide whether to send it. What you send is covered by GitHub's or your email provider's policies, and GitHub issues are public.

## 6. Changes to this policy
## 6. Checking for updates

- When you tap "Check for updates" in the Help tab and the app was installed from Google Play, the app asks the Play Store app on your phone whether a new version is available. The app itself does not connect to the internet; what the Play Store app exchanges is covered by Google's policies.
- If the app was installed from elsewhere, it only opens the app's page in that store (ONE store or Google Play).

## 7. Changes to this policy

If this policy changes, we will update this page and its effective date.

## 7. Contact
## 8. Contact

- Team SOVIS
- sovis.kr@gmail.com
Expand Down
11 changes: 9 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
// 37(Android 17)에서 이 앱에 걸리는 변경은 백그라운드 액티비티 시작(BAL) 조이기뿐이었다. 타일·알림 본문·
// "다시 켜기" 로 여는 경로가 모두 BAL_ALLOW_NON_APP_VISIBLE_WINDOW 로 허용되는 것을 Android 17 에서 봤다(#155).
targetSdk = 37
versionCode = 21
versionName = "1.9.2"
versionCode = 22
versionName = "1.10.0"
buildConfigField("boolean", "AI_SILERO_PREVIEW_ENABLED",
providers.gradleProperty("aiSileroPreview").map {
require(it == "true" || it == "false") { "aiSileroPreview must be true or false" }
Expand All @@ -34,7 +34,7 @@
}.getOrElse("true"))

if (buildingBundle) {
ndk { abiFilters += shippedAbis }

Check warning on line 37 in app/build.gradle.kts

View workflow job for this annotation

GitHub Actions / 빌드 · 유닛 테스트 · APK

Lint ChromeOsAbiSupport

Missing x86_64 ABI support for ChromeOS
}

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
Expand Down Expand Up @@ -137,7 +137,7 @@
// App Bundle 은 스토어가 기기에 맞는 ABI 만 골라 보내므로 분할이 필요 없다(맨 위 buildingBundle).
isEnable = !buildingBundle
reset()
include(*shippedAbis.toTypedArray())

Check warning on line 140 in app/build.gradle.kts

View workflow job for this annotation

GitHub Actions / 빌드 · 유닛 테스트 · APK

Lint ChromeOsAbiSupport

Missing x86_64 ABI support for ChromeOS
isUniversalApk = false
}
}
Expand Down Expand Up @@ -198,10 +198,10 @@
}

dependencies {
implementation("androidx.core:core-ktx:1.19.0")

Check warning on line 201 in app/build.gradle.kts

View workflow job for this annotation

GitHub Actions / 빌드 · 유닛 테스트 · APK

Lint GradleDependency

A newer version of androidx.core:core-ktx than 1.19.0 is available: 1.19.1
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.11.0")

Check warning on line 202 in app/build.gradle.kts

View workflow job for this annotation

GitHub Actions / 빌드 · 유닛 테스트 · APK

Lint GradleDependency

A newer version of androidx.lifecycle:lifecycle-runtime-ktx than 2.11.0 is available: 2.11.1
implementation("androidx.activity:activity-compose:1.13.0")
implementation(platform("androidx.compose:compose-bom:2026.09.00"))

Check warning on line 204 in app/build.gradle.kts

View workflow job for this annotation

GitHub Actions / 빌드 · 유닛 테스트 · APK

Lint GradleDependency

A newer version of androidx.compose:compose-bom than 2026.09.00 is available: 2026.11.01
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.ui:ui-graphics")
implementation("androidx.compose.ui:ui-tooling-preview")
Expand All @@ -215,12 +215,19 @@
//noinspection NewerVersionAvailable
implementation("com.microsoft.onnxruntime:onnxruntime-android:1.22.0")

// 도움말의 '업데이트 확인'(#500). Play 스토어에서 설치한 앱이 휴대폰의 Play 스토어 앱에 새 버전이 있는지 묻는다.
// 앱이 인터넷에 접속하지 않고 Play 스토어 앱과 기기 안에서 주고받으며, 권한을 더하지 않는다(InternetPermissionTest).
implementation("com.google.android.play:app-update:2.1.0")
// app-update 가 끌고 오는 play-services-basement 는 androidx.fragment 1.0.0 을 가져온다. fragment 가 1.3.0 보다 낮으면
// registerForActivityResult 가 틀리게 동작할 수 있어 릴리스 lint 가 막는다(InvalidFragmentVersionForActivityResult). 새 판으로 올려 둔다.
implementation("androidx.fragment:fragment:1.9.1")

testImplementation("junit:junit:4.13.2")
// Real org.json for JVM unit tests (the Android stub is not mocked by default)
testImplementation("org.json:json:20260814")
androidTestImplementation("androidx.test.ext:junit:1.3.0")
androidTestImplementation("androidx.test.espresso:espresso-core:3.7.0")
androidTestImplementation(platform("androidx.compose:compose-bom:2026.09.00"))

Check warning on line 230 in app/build.gradle.kts

View workflow job for this annotation

GitHub Actions / 빌드 · 유닛 테스트 · APK

Lint GradleDependency

A newer version of androidx.compose:compose-bom than 2026.09.00 is available: 2026.11.01
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
androidTestImplementation("androidx.test:runner:1.7.0")
androidTestImplementation("androidx.test:rules:1.7.0")
Expand Down
20 changes: 19 additions & 1 deletion app/src/main/assets/licenses/NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ https://creativecommons.org/licenses/by/4.0/
================================================================================
3. Android Open Source Project (AndroidX, Jetpack Compose, Material Components)
================================================================================
androidx.core, androidx.lifecycle, androidx.activity,
androidx.core, androidx.lifecycle, androidx.activity, androidx.fragment,
androidx.compose.* , androidx.compose.material3

Copyright (C) The Android Open Source Project
Expand Down Expand Up @@ -173,5 +173,23 @@ SOFTWARE.

================================================================================

9. Google Play 인앱 업데이트 라이브러리 (#500)
--------------------------------------------
com.google.android.play:app-update, com.google.android.play:core-common
Play 스토어에서 설치한 앱이 도움말의 '업데이트 확인'에서 휴대폰의 Play 스토어 앱에
새 버전이 있는지 물을 때 씁니다. 이 라이브러리는 권한(인터넷 권한 포함)을 더하지 않습니다.

Copyright (C) Google LLC
Play Core Software Development Kit Terms of Service
https://developer.android.com/guide/playcore/license

com.google.android.gms:play-services-tasks, com.google.android.gms:play-services-basement
(위 라이브러리가 함께 가져옵니다)
Copyright (C) Google LLC
Android Software Development Kit License
https://developer.android.com/studio/terms.html

================================================================================

테스트에만 쓰이는 의존성(JUnit, Espresso, org.json 등)은 APK 에 포함되지 않으므로
위 목록에서 제외했습니다.
74 changes: 73 additions & 1 deletion app/src/main/java/com/example/soundvisualizer/help/HelpTab.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,16 @@ import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.produceState
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalConfiguration
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.semantics.LiveRegionMode
import androidx.compose.ui.semantics.clearAndSetSemantics
import androidx.compose.ui.semantics.liveRegion
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontWeight
Expand All @@ -59,6 +62,7 @@ import com.example.soundvisualizer.SecondaryTextColor
import com.example.soundvisualizer.SettingsExpander
import com.example.soundvisualizer.SettingsManager
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext

private val BodySize = 15.sp
Expand Down Expand Up @@ -187,11 +191,12 @@ fun HelpTab() {
Text(stringResource(R.string.help_about_team), fontSize = BodySize, color = PrimaryTextColor)
Text(stringResource(R.string.help_about_license), fontSize = 14.sp, lineHeight = 21.sp, color = SecondaryTextColor)
}
UpdateButton()
OutlinedButton(
onClick = { showLicenses = true },
border = BorderStroke(1.dp, AccentColor),
shape = RoundedCornerShape(14.dp),
modifier = Modifier.fillMaxWidth().padding(top = 16.dp).heightIn(min = 48.dp)
modifier = Modifier.fillMaxWidth().padding(top = 10.dp).heightIn(min = 48.dp)
) {
Text(stringResource(R.string.help_licenses_button), fontSize = 15.sp, fontWeight = FontWeight.Bold, textAlign = TextAlign.Center, color = AccentColor)
}
Expand All @@ -208,6 +213,73 @@ fun HelpTab() {
}
}

/**
* 업데이트 확인(#500). 앱에는 인터넷 권한이 없어 직접 묻지 않는다. Play 스토어에서 설치했으면 휴대폰의 Play 스토어 앱에
* 새 버전이 있는지 묻고, 최신이면 그렇다고 알린다. 새 버전이 있거나 묻지 못하면, 그리고 다른 곳에서 설치했으면 그 스토어의
* 앱 페이지를 연다([UpdateStore]). 스토어 페이지에서 업데이트 버튼을 누르는 것은 사용자다.
*/
@Composable
private fun UpdateButton() {
val context = LocalContext.current
val scope = rememberCoroutineScope()
val store = remember(context) { UpdateStore.of(UpdateCheck.installer(context)) }
var checking by remember { mutableStateOf(false) }
var latest by rememberSaveable { mutableStateOf(false) }
val noStore = stringResource(R.string.help_update_no_store)

OutlinedButton(
onClick = {
latest = false
val links = UpdateLinks.forStore(store, context.packageName)
if (store != UpdateStore.Play) {
openStore(context, links, noStore)
return@OutlinedButton
}
checking = true
scope.launch {
val hasUpdate = UpdateCheck.playHasUpdate(context)
checking = false
if (hasUpdate == false) latest = true else openStore(context, links, noStore)
}
},
enabled = !checking,
border = BorderStroke(1.dp, AccentColor),
shape = RoundedCornerShape(14.dp),
modifier = Modifier.fillMaxWidth().padding(top = 16.dp).heightIn(min = 48.dp)
) {
Text(
stringResource(if (checking) R.string.help_update_checking else R.string.help_update_button),
fontSize = 15.sp, fontWeight = FontWeight.Bold, textAlign = TextAlign.Center, color = AccentColor
)
}
if (latest) {
// 누른 결과라 화면 읽어주기가 읽고 지나가게 한다.
Text(
stringResource(R.string.help_update_latest),
fontSize = 14.sp, lineHeight = 21.sp, color = SecondaryTextColor,
modifier = Modifier.padding(top = 8.dp).semantics { liveRegion = LiveRegionMode.Polite }
)
}
}

/** 스토어 페이지를 연다. Play 주소는 Play 스토어 앱으로 열고, 그 앱이 없으면 브라우저로 연다. 둘 다 안 되면 알린다. */
private fun openStore(context: Context, links: UpdateLinks, noStore: String) {
fun open(url: String): Boolean {
val intent = Intent(Intent.ACTION_VIEW, url.toUri()).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
// market:// 은 다른 마켓 앱도 받을 수 있어 고르는 창이 뜬다. Play 스토어 앱으로 바로 연다.
if (url.startsWith("market://")) intent.setPackage(UpdateStore.PLAY_STORE_PACKAGE)
return try {
context.startActivity(intent)
true
} catch (e: ActivityNotFoundException) {
false
}
}
if (open(links.primary)) return
if (links.fallback != null && open(links.fallback)) return
Toast.makeText(context, noStore, Toast.LENGTH_LONG).show()
}

/**
* 개인정보처리방침을 브라우저로 여는 버튼(#468). 앱 언어가 한국어면 한국어, 그 밖에는 영어 페이지를 연다.
* 브라우저가 없는 기기에서는 주소를 알려 준다.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
package com.example.soundvisualizer.help

import android.content.Context
import android.content.pm.PackageManager
import android.os.Build
import android.util.Log
import com.google.android.play.core.appupdate.AppUpdateManagerFactory
import com.google.android.play.core.install.model.UpdateAvailability
import kotlinx.coroutines.suspendCancellableCoroutine
import kotlin.coroutines.resume

/**
* 도움말의 '업데이트 확인'(#500)이 기기에 묻는 것. 어느 스토어로 보낼지는 [UpdateStore] 가 정한다.
*/
internal object UpdateCheck {

private const val TAG = "UpdateCheck"

/** 이 앱을 설치한 앱의 패키지 이름. 스토어 밖에서 설치했거나 알 수 없으면 null. */
fun installer(context: Context): String? = try {
val pm = context.packageManager
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
pm.getInstallSourceInfo(context.packageName).installingPackageName
} else {
@Suppress("DEPRECATION")
pm.getInstallerPackageName(context.packageName)
}
} catch (e: PackageManager.NameNotFoundException) {
null
} catch (e: IllegalArgumentException) {
null
}

/**
* Play 스토어 앱에 새 버전이 있는지 묻는다. 있으면 true, 최신이면 false, 묻지 못하면 null(그때는 Play 스토어 페이지를 연다).
*
* Play 인앱 업데이트 라이브러리는 앱이 인터넷에 접속하지 않고 기기 안의 Play 스토어 앱과 주고받는다. Play 스토어에서 설치한
* 앱만 답을 받는다(그래서 [UpdateStore.Play] 일 때만 부른다).
*/
suspend fun playHasUpdate(context: Context): Boolean? = suspendCancellableCoroutine { continuation ->
try {
AppUpdateManagerFactory.create(context.applicationContext).appUpdateInfo
.addOnSuccessListener { info ->
val availability = info.updateAvailability()
if (continuation.isActive) {
continuation.resume(
availability == UpdateAvailability.UPDATE_AVAILABLE ||
availability == UpdateAvailability.DEVELOPER_TRIGGERED_UPDATE_IN_PROGRESS
)
}
}
.addOnFailureListener { e ->
Log.w(TAG, "Play 스토어에 업데이트를 묻지 못했습니다", e)
if (continuation.isActive) continuation.resume(null)
}
} catch (e: RuntimeException) {
// Play 스토어 앱이 없거나 꺼져 있는 기기.
Log.w(TAG, "Play 인앱 업데이트를 쓸 수 없습니다", e)
if (continuation.isActive) continuation.resume(null)
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
package com.example.soundvisualizer.help

/**
* 도움말의 '업데이트 확인'(#500)이 어느 스토어로 보낼지.
*
* 앱에는 인터넷 권한이 없다. 새 버전이 있는지는 Play 스토어에서 설치한 경우에만 휴대폰의 Play 스토어 앱에 물을 수 있고,
* 그 밖에는 스토어 페이지를 열어 거기서 업데이트하게 한다. 원스토어에서 받은 사람은 원스토어로 보낸다(원스토어가 업데이트를
* 관리한다). GitHub 의 APK 처럼 스토어 밖에서 설치했으면 Play 스토어로 보낸다. 같은 팀 키로 서명해 Play 스토어 판이 그 위에 설치된다.
*
* 화면이나 Android API 없이 문자열만 다루므로 단위 테스트로 고정한다.
*/
enum class UpdateStore {
/** Play 스토어에서 설치했다. Play 스토어 앱에 새 버전이 있는지 물을 수 있다. */
Play,

/** 원스토어에서 설치했다. 원스토어의 앱 페이지를 연다. */
OneStore,

/** 그 밖(GitHub APK, 다른 마켓, 알 수 없음). Play 스토어의 앱 페이지를 연다. */
Other;

companion object {
const val PLAY_STORE_PACKAGE = "com.android.vending"

/** 원스토어 앱과 원스토어 서비스, 예전 통신사 마켓(원스토어로 합쳐짐)의 패키지 이름. */
val ONE_STORE_PACKAGES = setOf(
"com.skt.skaf.A000Z00040",
"com.skt.skaf.OA00018282",
"com.kt.olleh.storefront",
"com.kt.olleh.istore",
"com.lguplus.appstore",
"android.lgt.appstore",
)

/** 원스토어의 SoundVisualizer 페이지(상품 번호 0001013096). 원스토어 앱이 있으면 그 앱이 연다. */
const val ONE_STORE_URL = "https://m.onestore.co.kr/v2/ko-kr/app/0001013096"

/** 설치한 앱의 패키지 이름(Android 의 installingPackageName)으로 정한다. */
fun of(installer: String?): UpdateStore = when {
installer == PLAY_STORE_PACKAGE -> Play
installer in ONE_STORE_PACKAGES -> OneStore
else -> Other
}

/** Play 스토어 앱으로 여는 주소. */
fun playMarketUri(packageName: String): String = "market://details?id=$packageName"

/** Play 스토어 앱이 없을 때 브라우저로 여는 주소. */
fun playWebUrl(packageName: String): String = "https://play.google.com/store/apps/details?id=$packageName"
}
}

/** 업데이트 확인을 눌렀을 때 할 일. 앞의 것이 열리지 않으면 뒤의 것을 연다. */
data class UpdateLinks(val primary: String, val fallback: String?) {
companion object {
fun forStore(store: UpdateStore, packageName: String): UpdateLinks = when (store) {
UpdateStore.OneStore -> UpdateLinks(UpdateStore.ONE_STORE_URL, null)
UpdateStore.Play, UpdateStore.Other ->
UpdateLinks(UpdateStore.playMarketUri(packageName), UpdateStore.playWebUrl(packageName))
}
}
}
Loading
Loading