Skip to content

Commit

Permalink
Merge pull request #558 from TeamSparker/release-1.1.1
Browse files Browse the repository at this point in the history
Release 1.1.1
  • Loading branch information
yjooooo authored Oct 17, 2023
2 parents ac536c8 + 8bc61d7 commit 9790d5c
Show file tree
Hide file tree
Showing 13 changed files with 92 additions and 29 deletions.
15 changes: 15 additions & 0 deletions .idea/git_toolbox_prj.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 19 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,29 @@ plugins {
id 'kotlin-parcelize'
}

Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())

android {
compileSdk 31
compileSdk 33

defaultConfig {
applicationId "com.teamsparker.android"
minSdk 26
targetSdk 31
versionCode 5
versionName "1.1.0"
targetSdk 33
versionCode 6
versionName "1.1.1"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

buildConfigField(
"String",
"FACEBOOK_APP_ID",
properties.getProperty("FACEBOOK_APP_ID")
)

manifestPlaceholders["FACEBOOK_APP_ID"] =
properties.getProperty("FACEBOOK_APP_ID")
}

buildTypes {
Expand Down Expand Up @@ -122,4 +134,7 @@ dependencies {

// Timber
implementation 'com.jakewharton.timber:timber:5.0.1'

// Facebook
implementation "com.facebook.android:facebook-android-sdk:[8,9)"
}
16 changes: 15 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.teamsparker.android">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32" />
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" android:minSdkVersion="33" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="28" />

<!-- API 33 이상부터 광고 ID 선언해야하지만 사용하지 않아서 아래와 같이 권한 추가 -->
<uses-permission
android:name="com.google.android.gms.permission.AD_ID"
tools:node="remove" />

<uses-feature
android:name="android.hardware.camera2"
android:required="false" />
Expand All @@ -25,6 +32,13 @@
android:roundIcon="@mipmap/ic_app_logo_round"
android:supportsRtl="true"
android:theme="@style/Theme.SparkAndroid">

<!-- API 33 이상부터 광고 ID 선언해야하지만 사용하지 않아서 아래와 같이 권한 추가 -->
<meta-data
android:name="google_analytics_adid_collection_enabled"
android:value="false" />
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="${FACEBOOK_APP_ID}"/>

<activity
android:name="com.teamsparker.android.ui.habit.HabitSendSparkActivity"
android:exported="false"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,17 @@ class ProfileBottomSheet : BottomSheetDialogFragment() {
}

private fun initFromAlbumBtnClickListener() {
val permission = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
android.Manifest.permission.READ_MEDIA_IMAGES
} else {
android.Manifest.permission.READ_EXTERNAL_STORAGE
}

binding.tvProfileBottomFromAlbum.setOnClickListener {
when (PackageManager.PERMISSION_GRANTED) {
ContextCompat.checkSelfPermission(
requireContext(),
android.Manifest.permission.READ_EXTERNAL_STORAGE
permission,
) -> {
fromAlbumActivityLauncher.launch(
Intent(
Expand All @@ -107,7 +113,7 @@ class ProfileBottomSheet : BottomSheetDialogFragment() {
else -> {
ActivityCompat.requestPermissions(
requireActivity(),
arrayOf(android.Manifest.permission.READ_EXTERNAL_STORAGE),
arrayOf(permission),
REQUEST_READ_STORAGE_PERMISSION
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,17 @@ class CertifyBottomSheet : BottomSheetDialogFragment() {
}

private fun initFromAlbumBtnClickListener() {
val permission = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
android.Manifest.permission.READ_MEDIA_IMAGES
} else {
android.Manifest.permission.READ_EXTERNAL_STORAGE
}

binding.tvCertifyAlbum.setOnClickListener {
when (PackageManager.PERMISSION_GRANTED) {
ContextCompat.checkSelfPermission(
requireContext(),
android.Manifest.permission.READ_EXTERNAL_STORAGE
permission,
),
-> {
fromAlbumActivityLauncher.launch(
Expand All @@ -122,7 +128,7 @@ class CertifyBottomSheet : BottomSheetDialogFragment() {
else -> {
ActivityCompat.requestPermissions(
requireActivity(),
arrayOf(android.Manifest.permission.READ_EXTERNAL_STORAGE),
arrayOf(permission),
REQUEST_READ_STORAGE_PERMISSION
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ class FeedAdapter(
it.visibility = View.VISIBLE
it.playAnimation()
it.addAnimatorListener(object : Animator.AnimatorListener {
override fun onAnimationEnd(animation: Animator?) {
override fun onAnimationEnd(animation: Animator) {
it.visibility = View.INVISIBLE
binding.btnFeedHeart.isEnabled = true
}

override fun onAnimationStart(animation: Animator?) {}
override fun onAnimationCancel(animation: Animator?) {}
override fun onAnimationRepeat(animation: Animator?) {}
override fun onAnimationStart(animation: Animator) {}
override fun onAnimationCancel(animation: Animator) {}
override fun onAnimationRepeat(animation: Animator) {}

})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ class IntroActivity : BaseActivity<ActivityIntroBinding>(R.layout.activity_intro

private fun initLottieListener() {
binding.lottieIntroBg.addAnimatorListener(object : Animator.AnimatorListener {
override fun onAnimationEnd(animation: Animator?) {
override fun onAnimationEnd(animation: Animator) {
introViewModel.initIsEndLottie()
}

override fun onAnimationStart(animation: Animator?) {}
override fun onAnimationCancel(animation: Animator?) {}
override fun onAnimationRepeat(animation: Animator?) {}
override fun onAnimationStart(animation: Animator) {}
override fun onAnimationCancel(animation: Animator) {}
override fun onAnimationRepeat(animation: Animator) {}
})
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.teamsparker.android.BuildConfig
import com.teamsparker.android.data.remote.entity.response.ProfileResponse
import com.teamsparker.android.data.remote.repository.AlarmSettingRepository
import com.teamsparker.android.data.remote.repository.AuthRepository
Expand All @@ -20,6 +21,8 @@ class MyPageViewModel @Inject constructor(
private val authRepository: AuthRepository,
private val alarmSettingRepository: AlarmSettingRepository
) : ViewModel() {
val appVersion = BuildConfig.VERSION_NAME

private val _profileData = MutableLiveData<ProfileResponse>()
val profileData: LiveData<ProfileResponse> = _profileData

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import com.teamsparker.android.ui.main.MainActivity
import com.teamsparker.android.ui.main.MainActivity.Companion.FROM_WHERE
import com.teamsparker.android.util.showToast
import android.provider.MediaStore
import com.teamsparker.android.BuildConfig
import timber.log.Timber
import java.io.ByteArrayOutputStream
import java.io.OutputStream
Expand Down Expand Up @@ -111,18 +112,15 @@ class InstaActivity : BaseActivity<ActivityInstaBinding>(R.layout.activity_insta
}

private fun shareInsta(uri: Uri) {

val sourceApplication = "com.spark.android"

val intent = Intent("com.instagram.share.ADD_TO_STORY")
intent.type = "image/jpeg"
intent.putExtra("source_application", sourceApplication)
intent.putExtra("com.facebook.platform.extra.APPLICATION_ID", BuildConfig.FACEBOOK_APP_ID)
intent.putExtra("interactive_asset_uri", uri)
intent.putExtra("top_background_color", "#737376")
intent.putExtra("bottom_background_color", "#737376")
intent.putExtra("interactive_asset_uri", uri)

grantUriPermission(
"com.instagram.android",
"com.facebook.katana",
uri,
Intent.FLAG_GRANT_READ_URI_PERMISSION
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,15 @@ object AnimationUtil {
ObjectAnimator.ofFloat(constraintLayout, "translationY", 0f).apply {
start()
addListener(object : AnimatorListenerAdapter() {
override fun onAnimationEnd(animation: Animator?) {
override fun onAnimationEnd(animation: Animator) {
super.onAnimationEnd(animation)
ObjectAnimator.ofFloat(textviewTwo, View.ALPHA, 0f, 1f).apply {
duration = EDIT_TEXT_FOCUS_TRANSLATION
start()
}
ObjectAnimator.ofFloat(textviewOne, View.ALPHA, 0f, 1f).apply {
addListener(object : AnimatorListenerAdapter() {
override fun onAnimationStart(animation: Animator?) {
override fun onAnimationStart(animation: Animator) {
super.onAnimationStart(animation)
textviewOne.visibility = View.VISIBLE
textviewTwo.visibility = View.VISIBLE
Expand Down Expand Up @@ -152,12 +152,12 @@ object AnimationUtil {
}
ObjectAnimator.ofFloat(textviewOne, View.ALPHA, 1f, 0f).apply {
addListener(object : AnimatorListenerAdapter() {
override fun onAnimationEnd(animation: Animator?) {
override fun onAnimationEnd(animation: Animator) {
super.onAnimationEnd(animation)
ObjectAnimator.ofFloat(constraintLayout, "translationY", -220f).apply {
start()
addListener(object : AnimatorListenerAdapter() {
override fun onAnimationEnd(animation: Animator?) {
override fun onAnimationEnd(animation: Animator) {
super.onAnimationEnd(animation)
textviewOne.visibility = View.GONE
textviewTwo.visibility = View.GONE
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_my_page_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@
android:layout_marginEnd="28dp"
android:fontFamily="@font/futura_medium"
android:includeFontPadding="false"
android:text="@string/my_page_main_version"
android:text="@{@string/my_page_main_version(myPageViewModel.appVersion)}"
android:textColor="@color/spark_light_dark_gray"
android:textSize="12dp"
app:layout_constraintBottom_toBottomOf="@id/tv_my_page_main_version_info"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@
<string name="my_page_main_policy">약관 및 정책</string>
<string name="my_page_main_open_source">오픈소스 라이선스</string>
<string name="my_page_main_version_info">버전 정보</string>
<string name="my_page_main_version">v1.0.0</string>
<string name="my_page_main_version">v%s</string>
<string name="my_page_main_sign_out">로그아웃</string>
<string name="my_page_main_withdrawal"><u>회원 탈퇴</u></string>
<string name="my_page_sign_out_msg">로그아웃되었습니다.</string>
Expand Down

0 comments on commit 9790d5c

Please sign in to comment.