From c6c6f35dd12a45fd23593014e850da22f92a4edd Mon Sep 17 00:00:00 2001 From: yjooooo Date: Sun, 1 Oct 2023 00:54:54 +0900 Subject: [PATCH 1/6] =?UTF-8?q?#556=20[fix]=20api=20=EC=82=AC=EC=9A=A9?= =?UTF-8?q?=EB=B0=A9=EB=B2=95=20=EB=B3=80=EA=B2=BD=EB=90=9C=20=EA=B2=83=20?= =?UTF-8?q?=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/kotlinc.xml | 6 ++++++ app/build.gradle | 15 +++++++++++++++ app/src/main/AndroidManifest.xml | 2 ++ .../teamsparker/android/ui/share/InstaActivity.kt | 10 ++++------ 4 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 .idea/kotlinc.xml diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml new file mode 100644 index 00000000..7e340a77 --- /dev/null +++ b/.idea/kotlinc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index a27ad946..a13c487d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -8,6 +8,9 @@ plugins { id 'kotlin-parcelize' } +Properties properties = new Properties() +properties.load(project.rootProject.file('local.properties').newDataInputStream()) + android { compileSdk 31 @@ -19,6 +22,15 @@ android { versionName "1.1.0" 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 { @@ -122,4 +134,7 @@ dependencies { // Timber implementation 'com.jakewharton.timber:timber:5.0.1' + + // Facebook + implementation "com.facebook.android:facebook-android-sdk:[8,9)" } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 09d28f8b..848aa3d6 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -25,6 +25,8 @@ android:roundIcon="@mipmap/ic_app_logo_round" android:supportsRtl="true" android:theme="@style/Theme.SparkAndroid"> + + (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 ) From 9730b1fed04386ba3fb6efcb6b0c752e8ba09d8e Mon Sep 17 00:00:00 2001 From: yjooooo Date: Sun, 1 Oct 2023 01:49:17 +0900 Subject: [PATCH 2/6] =?UTF-8?q?#556=20[fix]=20targetSdk=2033=20=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EB=B2=84=EC=A0=84=20up?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/git_toolbox_prj.xml | 15 +++++++++++++++ app/build.gradle | 4 ++-- .../android/ui/feed/adapter/FeedAdapter.kt | 8 ++++---- .../teamsparker/android/ui/intro/IntroActivity.kt | 8 ++++---- .../com/teamsparker/android/util/AnimationUtil.kt | 8 ++++---- 5 files changed, 29 insertions(+), 14 deletions(-) create mode 100644 .idea/git_toolbox_prj.xml diff --git a/.idea/git_toolbox_prj.xml b/.idea/git_toolbox_prj.xml new file mode 100644 index 00000000..02b915b8 --- /dev/null +++ b/.idea/git_toolbox_prj.xml @@ -0,0 +1,15 @@ + + + + + + + \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index a13c487d..fb5b16fc 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -12,12 +12,12 @@ 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 + targetSdk 33 versionCode 5 versionName "1.1.0" diff --git a/app/src/main/java/com/teamsparker/android/ui/feed/adapter/FeedAdapter.kt b/app/src/main/java/com/teamsparker/android/ui/feed/adapter/FeedAdapter.kt index c29cdd07..285e928f 100644 --- a/app/src/main/java/com/teamsparker/android/ui/feed/adapter/FeedAdapter.kt +++ b/app/src/main/java/com/teamsparker/android/ui/feed/adapter/FeedAdapter.kt @@ -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) {} }) } diff --git a/app/src/main/java/com/teamsparker/android/ui/intro/IntroActivity.kt b/app/src/main/java/com/teamsparker/android/ui/intro/IntroActivity.kt index c058d3f6..acb62df3 100644 --- a/app/src/main/java/com/teamsparker/android/ui/intro/IntroActivity.kt +++ b/app/src/main/java/com/teamsparker/android/ui/intro/IntroActivity.kt @@ -87,13 +87,13 @@ class IntroActivity : BaseActivity(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) {} }) } diff --git a/app/src/main/java/com/teamsparker/android/util/AnimationUtil.kt b/app/src/main/java/com/teamsparker/android/util/AnimationUtil.kt index 688b3573..efa6048b 100644 --- a/app/src/main/java/com/teamsparker/android/util/AnimationUtil.kt +++ b/app/src/main/java/com/teamsparker/android/util/AnimationUtil.kt @@ -113,7 +113,7 @@ 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 @@ -121,7 +121,7 @@ object AnimationUtil { } 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 @@ -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 From 09de99d47f7a448b7ffda2fbf98b5b4db5163aab Mon Sep 17 00:00:00 2001 From: yjooooo Date: Sun, 1 Oct 2023 01:59:37 +0900 Subject: [PATCH 3/6] =?UTF-8?q?#556=20[fix]=20=EB=B2=84=EC=A0=84=20?= =?UTF-8?q?=EC=A0=95=EB=B3=B4=20=ED=98=84=EC=9E=AC=20=EB=B2=84=EC=A0=84=20?= =?UTF-8?q?=EB=B0=9B=EC=95=84=EC=98=A4=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/teamsparker/android/ui/mypage/MyPageViewModel.kt | 3 +++ app/src/main/res/layout/fragment_my_page_main.xml | 2 +- app/src/main/res/values/strings.xml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/teamsparker/android/ui/mypage/MyPageViewModel.kt b/app/src/main/java/com/teamsparker/android/ui/mypage/MyPageViewModel.kt index 54f085ec..c54ee5a2 100644 --- a/app/src/main/java/com/teamsparker/android/ui/mypage/MyPageViewModel.kt +++ b/app/src/main/java/com/teamsparker/android/ui/mypage/MyPageViewModel.kt @@ -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 @@ -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() val profileData: LiveData = _profileData diff --git a/app/src/main/res/layout/fragment_my_page_main.xml b/app/src/main/res/layout/fragment_my_page_main.xml index b31d9917..eb603aec 100644 --- a/app/src/main/res/layout/fragment_my_page_main.xml +++ b/app/src/main/res/layout/fragment_my_page_main.xml @@ -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" diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 6f72ea92..5320c0ed 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -299,7 +299,7 @@ 약관 및 정책 오픈소스 라이선스 버전 정보 - v1.0.0 + v%s 로그아웃 회원 탈퇴 로그아웃되었습니다. From 328646db970b203294ae56fc0d007dabbc2b0b01 Mon Sep 17 00:00:00 2001 From: ze-zeh Date: Sat, 14 Oct 2023 20:54:35 +0900 Subject: [PATCH 4/6] =?UTF-8?q?#556=20[fix]=20=EC=9D=B4=EB=AF=B8=EC=A7=80?= =?UTF-8?q?=20=EA=B6=8C=ED=95=9C=20sdk=20=EB=B2=84=EC=A0=84=20=EB=B3=84=20?= =?UTF-8?q?=EB=B6=84=EA=B8=B0=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/AndroidManifest.xml | 3 ++- .../android/ui/auth/profile/ProfileBottomSheet.kt | 10 ++++++++-- .../android/ui/certify/CertifyBottomSheet.kt | 10 ++++++++-- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 848aa3d6..cd1088b0 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -3,7 +3,8 @@ package="com.teamsparker.android"> - + + = 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( @@ -107,7 +113,7 @@ class ProfileBottomSheet : BottomSheetDialogFragment() { else -> { ActivityCompat.requestPermissions( requireActivity(), - arrayOf(android.Manifest.permission.READ_EXTERNAL_STORAGE), + arrayOf(permission), REQUEST_READ_STORAGE_PERMISSION ) } diff --git a/app/src/main/java/com/teamsparker/android/ui/certify/CertifyBottomSheet.kt b/app/src/main/java/com/teamsparker/android/ui/certify/CertifyBottomSheet.kt index ba2c5fb1..b3b7e6e4 100644 --- a/app/src/main/java/com/teamsparker/android/ui/certify/CertifyBottomSheet.kt +++ b/app/src/main/java/com/teamsparker/android/ui/certify/CertifyBottomSheet.kt @@ -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( @@ -122,7 +128,7 @@ class CertifyBottomSheet : BottomSheetDialogFragment() { else -> { ActivityCompat.requestPermissions( requireActivity(), - arrayOf(android.Manifest.permission.READ_EXTERNAL_STORAGE), + arrayOf(permission), REQUEST_READ_STORAGE_PERMISSION ) } From 766175de4d7e9cb74807ed76a94a047d6ca2ca79 Mon Sep 17 00:00:00 2001 From: yjooooo Date: Mon, 16 Oct 2023 11:42:02 +0900 Subject: [PATCH 5/6] =?UTF-8?q?#556=20[chore]=201.1.1=20=EC=97=85=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=8A=B8=20=EB=B2=84=EC=A0=84=EC=A0=95=EB=B3=B4=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index fb5b16fc..5dc691fd 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -18,8 +18,8 @@ android { applicationId "com.teamsparker.android" minSdk 26 targetSdk 33 - versionCode 5 - versionName "1.1.0" + versionCode 6 + versionName "1.1.1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" From 8bc61d7fd9cf52a301d56ef1f48c4b3374b40498 Mon Sep 17 00:00:00 2001 From: yjooooo Date: Wed, 18 Oct 2023 00:37:59 +0900 Subject: [PATCH 6/6] =?UTF-8?q?#556=20[fix]=20API=2033=20=ED=83=80?= =?UTF-8?q?=EA=B2=9F=ED=8C=85=EC=9C=BC=EB=A1=9C=20=EC=9D=B8=ED=95=B4=20?= =?UTF-8?q?=EA=B4=91=EA=B3=A0=20ID=20=EC=84=A0=EC=96=B8=20=EA=B4=80?= =?UTF-8?q?=EB=A0=A8=20manifest=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/AndroidManifest.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index cd1088b0..a33b9cf9 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,5 +1,6 @@ @@ -10,6 +11,11 @@ android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="28" /> + + + @@ -26,6 +32,11 @@ android:roundIcon="@mipmap/ic_app_logo_round" android:supportsRtl="true" android:theme="@style/Theme.SparkAndroid"> + + +