Skip to content

Commit 8fba5a4

Browse files
committed
[IDLE-506] Resovle Conflict
2 parents b76902e + 2758346 commit 8fba5a4

File tree

27 files changed

+583
-249
lines changed

27 files changed

+583
-249
lines changed

.github/workflows/android_cd.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ jobs:
3838
echo "NAVER_CLIENT_ID=${{ secrets.NAVER_CLIENT_ID }}" >> local.properties
3939
echo "NAVER_CLIENT_SECRET=${{ secrets.NAVER_CLIENT_SECRET }}" >> local.properties
4040
echo "AMPLITUDE_API_KEY=${{ secrets.AMPLITUDE_API_KEY }}" >> local.properties
41+
echo "KAKAO_APP_KEY=${{ secrets.KAKAO_APP_KEY }}" >> local.properties
42+
echo "APPSFLYER_API_KEY=${{ secrets.APPSFLYER_API_KEY }}" >> local.properties
4143
4244
- name: Set up keystore.properties
4345
run: |

.github/workflows/android_ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ jobs:
4141
echo "NAVER_CLIENT_ID=${{ secrets.NAVER_CLIENT_ID }}" >> local.properties
4242
echo "NAVER_CLIENT_SECRET=${{ secrets.NAVER_CLIENT_SECRET }}" >> local.properties
4343
echo "AMPLITUDE_API_KEY=${{ secrets.AMPLITUDE_API_KEY }}" >> local.properties
44+
echo "KAKAO_APP_KEY=${{ secrets.KAKAO_APP_KEY }}" >> local.properties
45+
echo "APPSFLYER_API_KEY=${{ secrets.APPSFLYER_API_KEY }}" >> local.properties
4446
4547
- name: Set up keystore.properties
4648
run: |

app/build.gradle.kts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,29 @@ android {
1111
namespace = "com.idle.care"
1212

1313
defaultConfig {
14-
versionCode = 14
15-
versionName = "1.1.5"
14+
versionCode = 15
15+
versionName = "1.2.0"
1616
targetSdk = 34
1717

1818
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
1919

2020
val localProperties = Properties()
2121
localProperties.load(project.rootProject.file("local.properties").bufferedReader())
2222
manifestPlaceholders["NAVER_CLIENT_ID"] = localProperties["NAVER_CLIENT_ID"] as String
23+
manifestPlaceholders["KAKAO_APP_KEY"] = localProperties["KAKAO_APP_KEY"] as String
2324

2425
buildConfigField(
25-
"String",
26-
"AMPLITUDE_API_KEY",
27-
"\"${localProperties["AMPLITUDE_API_KEY"]}\"",
26+
"String", "AMPLITUDE_API_KEY", "\"${localProperties["AMPLITUDE_API_KEY"]}\"",
2827
)
28+
buildConfigField("String", "KAKAO_APP_KEY", "\"${localProperties["KAKAO_APP_KEY"]}\"")
29+
buildConfigField("String", "APPSFLYER_API_KEY", "\"${localProperties["APPSFLYER_API_KEY"]}\"")
2930
}
3031

3132
signingConfigs {
3233
create("release") {
3334
val keystoreProperties = Properties()
34-
keystoreProperties.load(project.rootProject.file("keystore.properties").bufferedReader()
35+
keystoreProperties.load(
36+
project.rootProject.file("keystore.properties").bufferedReader()
3537
)
3638

3739
storeFile = file(keystoreProperties["STORE_FILE_PATH"] as String)
@@ -61,4 +63,7 @@ dependencies {
6163
implementation(projects.core.analytics)
6264

6365
implementation(libs.firebase.messaging)
66+
implementation(libs.kakao.common)
67+
implementation(libs.appsFlyer)
68+
implementation(libs.installerReferrer)
6469
}

app/src/main/AndroidManifest.xml

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
xmlns:tools="http://schemas.android.com/tools">
3+
xmlns:tools="http://schemas.android.com/tools"
4+
package="com.idle.care">
45

56
<uses-permission android:name="android.permission.INTERNET" />
67
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
@@ -16,6 +17,7 @@
1617
android:roundIcon="@mipmap/ic_launcher_round"
1718
android:supportsRtl="true"
1819
android:theme="@style/Theme.Care"
20+
tools:replace="android:dataExtractionRules, android:fullBackupContent"
1921
tools:targetApi="34">
2022
<activity
2123
android:name="com.idle.presentation.MainActivity"
@@ -29,6 +31,48 @@
2931

3032
<category android:name="android.intent.category.LAUNCHER" />
3133
</intent-filter>
34+
35+
<intent-filter>
36+
<action android:name="android.intent.action.VIEW" />
37+
38+
<category android:name="android.intent.category.DEFAULT" />
39+
<category android:name="android.intent.category.BROWSABLE" />
40+
41+
<data
42+
android:host="kakaolink"
43+
android:scheme="kakao${KAKAO_APP_KEY}://kakaolink" />
44+
</intent-filter>
45+
46+
<intent-filter>
47+
<action android:name="android.intent.action.VIEW" />
48+
49+
<category android:name="android.intent.category.DEFAULT" />
50+
<category android:name="android.intent.category.BROWSABLE" />
51+
52+
<data android:scheme="care" />
53+
</intent-filter>
54+
55+
<intent-filter android:autoVerify="true">
56+
<action android:name="android.intent.action.VIEW" />
57+
58+
<category android:name="android.intent.category.DEFAULT" />
59+
<category android:name="android.intent.category.BROWSABLE" />
60+
61+
<data android:scheme="http" />
62+
<data android:scheme="https" />
63+
<data android:host="caremeet.kr" />
64+
</intent-filter>
65+
66+
<intent-filter android:autoVerify="true">
67+
<action android:name="android.intent.action.VIEW" />
68+
69+
<category android:name="android.intent.category.DEFAULT" />
70+
<category android:name="android.intent.category.BROWSABLE" />
71+
72+
<data
73+
android:host="caremeet.onelink.me"
74+
android:scheme="https" />
75+
</intent-filter>
3276
</activity>
3377
<service
3478
android:name=".notification.NotificationService"
@@ -48,4 +92,8 @@
4892
android:name="com.naver.maps.map.CLIENT_ID"
4993
android:value="${NAVER_CLIENT_ID}" />
5094
</application>
95+
96+
<queries>
97+
<package android:name="com.kakao.talk" />
98+
</queries>
5199
</manifest>

app/src/main/java/com/idle/care/CareApplication.kt

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,31 @@ package com.idle.care
33
import android.app.Application
44
import android.app.NotificationChannel
55
import android.app.NotificationManager
6+
import com.appsflyer.AppsFlyerLib
7+
import com.appsflyer.attribution.AppsFlyerRequestListener
8+
import com.idle.analytics.error.ErrorLoggingHelper
69
import com.idle.care.notification.NotificationHandler.Companion.BACKGROUND_CHANNEL
710
import com.idle.care.notification.NotificationHandler.Companion.BACKGROUND_DESCRIPTION
11+
import com.kakao.sdk.common.KakaoSdk
812
import dagger.hilt.android.HiltAndroidApp
13+
import javax.inject.Inject
14+
915

1016
@HiltAndroidApp
1117
class CareApplication : Application() {
18+
19+
@Inject
20+
lateinit var errorLoggingHelper: ErrorLoggingHelper
21+
1222
override fun onCreate() {
1323
super.onCreate()
1424

25+
initNotification()
26+
initKakao()
27+
initAppsFlyer()
28+
}
29+
30+
private fun initNotification() {
1531
val channel =
1632
NotificationChannel(
1733
BACKGROUND_CHANNEL,
@@ -23,4 +39,21 @@ class CareApplication : Application() {
2339
val notificationManager = getSystemService(NOTIFICATION_SERVICE) as NotificationManager
2440
notificationManager.createNotificationChannel(channel)
2541
}
42+
43+
private fun initKakao() {
44+
KakaoSdk.init(this, BuildConfig.KAKAO_APP_KEY)
45+
}
46+
47+
private fun initAppsFlyer() {
48+
AppsFlyerLib.getInstance().apply {
49+
init(BuildConfig.APPSFLYER_API_KEY, null, this@CareApplication)
50+
setDebugLog(true)
51+
start(this@CareApplication, "", object : AppsFlyerRequestListener {
52+
override fun onSuccess() {}
53+
override fun onError(p0: Int, p1: String) {
54+
errorLoggingHelper.logError(Exception("AppsFlyer 연동 실패 $p0 $p1"))
55+
}
56+
})
57+
}
58+
}
2659
}

app/src/main/java/com/idle/care/notification/NotificationService.kt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
package com.idle.care.notification
22

3-
import android.util.Log
43
import com.google.firebase.messaging.FirebaseMessagingService
54
import com.google.firebase.messaging.RemoteMessage
6-
import com.idle.domain.model.auth.UserType
5+
import com.idle.analytics.error.ErrorLoggingHelper
76
import com.idle.domain.usecase.auth.GetUserTypeUseCase
87
import com.idle.domain.usecase.notification.PostDeviceTokenUseCase
98
import dagger.hilt.android.AndroidEntryPoint
@@ -26,9 +25,12 @@ class NotificationService : FirebaseMessagingService() {
2625
@Inject
2726
lateinit var notificationHandler: NotificationHandler
2827

28+
@Inject
29+
lateinit var errorLoggingHelper: ErrorLoggingHelper
30+
2931
private val job = SupervisorJob()
3032
private val coroutineExceptionHandler = CoroutineExceptionHandler { _, throwable ->
31-
Log.e("test", throwable.stackTraceToString())
33+
errorLoggingHelper.logError(throwable)
3234
}
3335
private val scope = CoroutineScope(Dispatchers.IO + job + coroutineExceptionHandler)
3436

@@ -38,12 +40,10 @@ class NotificationService : FirebaseMessagingService() {
3840
scope.launch {
3941
val userType = getUserTypeUseCase()
4042

41-
when (userType) {
42-
UserType.CENTER.apiValue, UserType.WORKER.apiValue -> postDeviceTokenUseCase(
43-
deviceToken = token,
44-
userType = userType,
45-
)
46-
}
43+
postDeviceTokenUseCase(
44+
deviceToken = token,
45+
userType = userType,
46+
)
4747
}
4848
}
4949

core/common-ui/binding/src/main/java/com/idle/binding/EventHandlerHelper.kt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ sealed class MainEvent {
2121
MainEvent()
2222

2323
data object DismissToast : MainEvent()
24+
data class ShareJobPosting(val shareJobPostingInfo: ShareJobPostingInfo) : MainEvent()
2425
}
2526

2627
enum class ToastType {
@@ -32,3 +33,16 @@ enum class ToastType {
3233
}
3334
}
3435
}
36+
37+
data class ShareJobPostingInfo(
38+
val id: String,
39+
val title: String,
40+
val weekdays: String,
41+
val workTime: String,
42+
val payAmount: String,
43+
val roadNameAddress: String,
44+
val gender: String,
45+
val centerName: String,
46+
val centerOfficeNumber: String,
47+
val type: String,
48+
)

core/data/src/main/java/com/idle/data/repository/jobposting/JobPostingRepositoryImpl.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import com.idle.domain.model.jobposting.JobPostingType
1414
import com.idle.domain.model.jobposting.LifeAssistance
1515
import com.idle.domain.model.jobposting.MentalStatus
1616
import com.idle.domain.model.jobposting.PayType
17+
import com.idle.domain.model.jobposting.SharedJobPostingInfo
1718
import com.idle.domain.model.jobposting.WorkerJobPosting
1819
import com.idle.domain.model.jobposting.WorkerJobPostingDetail
1920
import com.idle.domain.repositorry.jobposting.JobPostingRepository
@@ -26,6 +27,13 @@ import javax.inject.Inject
2627
class JobPostingRepositoryImpl @Inject constructor(
2728
private val jobPostingDataSource: JobPostingDataSource
2829
) : JobPostingRepository {
30+
override var sharedJobPostingInfo: SharedJobPostingInfo? = null
31+
get() {
32+
val currentValue = field
33+
field = null
34+
return currentValue
35+
}
36+
2937
override suspend fun postJobPosting(
3038
weekdays: List<DayOfWeek>,
3139
startTime: String,
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="32dp"
3+
android:height="32dp"
4+
android:viewportWidth="32"
5+
android:viewportHeight="32">
6+
<path
7+
android:pathData="M6,17V23.429C6,24.111 6.286,24.765 6.795,25.247C7.304,25.729 7.994,26 8.714,26H22.286C23.006,26 23.696,25.729 24.205,25.247C24.714,24.765 25,24.111 25,23.429V17"
8+
android:strokeLineJoin="round"
9+
android:strokeWidth="2.7"
10+
android:fillColor="#00000000"
11+
android:strokeColor="#7E848F"
12+
android:strokeLineCap="round"/>
13+
<path
14+
android:pathData="M15.5,5.217V20M21,10.217L15.5,5L10,10.217"
15+
android:strokeLineJoin="round"
16+
android:strokeWidth="2.7"
17+
android:fillColor="#00000000"
18+
android:strokeColor="#7E848F"
19+
android:strokeLineCap="round"/>
20+
</vector>

core/designresource/src/main/res/values/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@
246246
<string name="privacy_and_policy">개인정보 처리 방침</string>
247247
<string name="faq">자주 묻는 질문</string>
248248
<string name="inquiry">문의하기</string>
249+
<string name="share">공유하기</string>
249250
<string name="call">통화하기</string>
250251
<string name="inquiry_by_call">전화로 문의하기</string>
251252
<string name="inquiry_by_chat">채팅으로 문의하기</string>

0 commit comments

Comments
 (0)