Skip to content

Commit

Permalink
[IDLE-506] Resovle Conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
tgyuuAn committed Nov 13, 2024
2 parents b76902e + 2758346 commit 9f230ef
Show file tree
Hide file tree
Showing 27 changed files with 594 additions and 249 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/android_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ jobs:
echo "NAVER_CLIENT_ID=${{ secrets.NAVER_CLIENT_ID }}" >> local.properties
echo "NAVER_CLIENT_SECRET=${{ secrets.NAVER_CLIENT_SECRET }}" >> local.properties
echo "AMPLITUDE_API_KEY=${{ secrets.AMPLITUDE_API_KEY }}" >> local.properties
echo "KAKAO_APP_KEY=${{ secrets.KAKAO_APP_KEY }}" >> local.properties
echo "APPSFLYER_API_KEY=${{ secrets.APPSFLYER_API_KEY }}" >> local.properties
- name: Set up keystore.properties
run: |
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/android_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ jobs:
echo "NAVER_CLIENT_ID=${{ secrets.NAVER_CLIENT_ID }}" >> local.properties
echo "NAVER_CLIENT_SECRET=${{ secrets.NAVER_CLIENT_SECRET }}" >> local.properties
echo "AMPLITUDE_API_KEY=${{ secrets.AMPLITUDE_API_KEY }}" >> local.properties
echo "KAKAO_APP_KEY=${{ secrets.KAKAO_APP_KEY }}" >> local.properties
echo "APPSFLYER_API_KEY=${{ secrets.APPSFLYER_API_KEY }}" >> local.properties
- name: Set up keystore.properties
run: |
Expand Down
17 changes: 11 additions & 6 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,29 @@ android {
namespace = "com.idle.care"

defaultConfig {
versionCode = 14
versionName = "1.1.5"
versionCode = 15
versionName = "1.2.0"
targetSdk = 34

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

val localProperties = Properties()
localProperties.load(project.rootProject.file("local.properties").bufferedReader())
manifestPlaceholders["NAVER_CLIENT_ID"] = localProperties["NAVER_CLIENT_ID"] as String
manifestPlaceholders["KAKAO_APP_KEY"] = localProperties["KAKAO_APP_KEY"] as String

buildConfigField(
"String",
"AMPLITUDE_API_KEY",
"\"${localProperties["AMPLITUDE_API_KEY"]}\"",
"String", "AMPLITUDE_API_KEY", "\"${localProperties["AMPLITUDE_API_KEY"]}\"",
)
buildConfigField("String", "KAKAO_APP_KEY", "\"${localProperties["KAKAO_APP_KEY"]}\"")
buildConfigField("String", "APPSFLYER_API_KEY", "\"${localProperties["APPSFLYER_API_KEY"]}\"")
}

signingConfigs {
create("release") {
val keystoreProperties = Properties()
keystoreProperties.load(project.rootProject.file("keystore.properties").bufferedReader()
keystoreProperties.load(
project.rootProject.file("keystore.properties").bufferedReader()
)

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

implementation(libs.firebase.messaging)
implementation(libs.kakao.common)
implementation(libs.appsFlyer)
implementation(libs.installerReferrer)
}
50 changes: 49 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
xmlns:tools="http://schemas.android.com/tools"
package="com.idle.care">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Expand All @@ -16,6 +17,7 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Care"
tools:replace="android:dataExtractionRules, android:fullBackupContent"
tools:targetApi="34">
<activity
android:name="com.idle.presentation.MainActivity"
Expand All @@ -29,6 +31,48 @@

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

<intent-filter>
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data
android:host="kakaolink"
android:scheme="kakao${KAKAO_APP_KEY}://kakaolink" />
</intent-filter>

<intent-filter>
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data android:scheme="care" />
</intent-filter>

<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data android:scheme="http" />
<data android:scheme="https" />
<data android:host="caremeet.kr" />
</intent-filter>

<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data
android:host="caremeet.onelink.me"
android:scheme="https" />
</intent-filter>
</activity>
<service
android:name=".notification.NotificationService"
Expand All @@ -48,4 +92,8 @@
android:name="com.naver.maps.map.CLIENT_ID"
android:value="${NAVER_CLIENT_ID}" />
</application>

<queries>
<package android:name="com.kakao.talk" />
</queries>
</manifest>
33 changes: 33 additions & 0 deletions app/src/main/java/com/idle/care/CareApplication.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,31 @@ package com.idle.care
import android.app.Application
import android.app.NotificationChannel
import android.app.NotificationManager
import com.appsflyer.AppsFlyerLib
import com.appsflyer.attribution.AppsFlyerRequestListener
import com.idle.analytics.error.ErrorLoggingHelper
import com.idle.care.notification.NotificationHandler.Companion.BACKGROUND_CHANNEL
import com.idle.care.notification.NotificationHandler.Companion.BACKGROUND_DESCRIPTION
import com.kakao.sdk.common.KakaoSdk
import dagger.hilt.android.HiltAndroidApp
import javax.inject.Inject


@HiltAndroidApp
class CareApplication : Application() {

@Inject
lateinit var errorLoggingHelper: ErrorLoggingHelper

override fun onCreate() {
super.onCreate()

initNotification()
initKakao()
initAppsFlyer()
}

private fun initNotification() {
val channel =
NotificationChannel(
BACKGROUND_CHANNEL,
Expand All @@ -23,4 +39,21 @@ class CareApplication : Application() {
val notificationManager = getSystemService(NOTIFICATION_SERVICE) as NotificationManager
notificationManager.createNotificationChannel(channel)
}

private fun initKakao() {
KakaoSdk.init(this, BuildConfig.KAKAO_APP_KEY)
}

private fun initAppsFlyer() {
AppsFlyerLib.getInstance().apply {
init(BuildConfig.APPSFLYER_API_KEY, null, this@CareApplication)
setDebugLog(true)
start(this@CareApplication, "", object : AppsFlyerRequestListener {
override fun onSuccess() {}
override fun onError(p0: Int, p1: String) {
errorLoggingHelper.logError(Exception("AppsFlyer 연동 실패 $p0 $p1"))
}
})
}
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package com.idle.care.notification

import android.util.Log
import com.google.firebase.messaging.FirebaseMessagingService
import com.google.firebase.messaging.RemoteMessage
import com.idle.domain.model.auth.UserType
import com.idle.analytics.error.ErrorLoggingHelper
import com.idle.domain.usecase.auth.GetUserTypeUseCase
import com.idle.domain.usecase.notification.PostDeviceTokenUseCase
import dagger.hilt.android.AndroidEntryPoint
Expand All @@ -26,9 +25,12 @@ class NotificationService : FirebaseMessagingService() {
@Inject
lateinit var notificationHandler: NotificationHandler

@Inject
lateinit var errorLoggingHelper: ErrorLoggingHelper

private val job = SupervisorJob()
private val coroutineExceptionHandler = CoroutineExceptionHandler { _, throwable ->
Log.e("test", throwable.stackTraceToString())
errorLoggingHelper.logError(throwable)
}
private val scope = CoroutineScope(Dispatchers.IO + job + coroutineExceptionHandler)

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

when (userType) {
UserType.CENTER.apiValue, UserType.WORKER.apiValue -> postDeviceTokenUseCase(
deviceToken = token,
userType = userType,
)
}
postDeviceTokenUseCase(
deviceToken = token,
userType = userType,
)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ sealed class MainEvent {
MainEvent()

data object DismissToast : MainEvent()
data class ShareJobPosting(val shareJobPostingInfo: ShareJobPostingInfo) : MainEvent()
}

enum class ToastType {
Expand All @@ -32,3 +33,16 @@ enum class ToastType {
}
}
}

data class ShareJobPostingInfo(
val id: String,
val title: String,
val weekdays: String,
val workTime: String,
val payAmount: String,
val roadNameAddress: String,
val gender: String,
val centerName: String,
val centerOfficeNumber: String,
val type: String,
)
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import com.idle.domain.model.jobposting.JobPostingType
import com.idle.domain.model.jobposting.LifeAssistance
import com.idle.domain.model.jobposting.MentalStatus
import com.idle.domain.model.jobposting.PayType
import com.idle.domain.model.jobposting.SharedJobPostingInfo
import com.idle.domain.model.jobposting.WorkerJobPosting
import com.idle.domain.model.jobposting.WorkerJobPostingDetail
import com.idle.domain.repositorry.jobposting.JobPostingRepository
Expand All @@ -26,6 +27,13 @@ import javax.inject.Inject
class JobPostingRepositoryImpl @Inject constructor(
private val jobPostingDataSource: JobPostingDataSource
) : JobPostingRepository {
override var sharedJobPostingInfo: SharedJobPostingInfo? = null
get() {
val currentValue = field
field = null
return currentValue
}

override suspend fun postJobPosting(
weekdays: List<DayOfWeek>,
startTime: String,
Expand Down
20 changes: 20 additions & 0 deletions core/designresource/src/main/res/drawable/ic_share.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="32dp"
android:height="32dp"
android:viewportWidth="32"
android:viewportHeight="32">
<path
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"
android:strokeLineJoin="round"
android:strokeWidth="2.7"
android:fillColor="#00000000"
android:strokeColor="#7E848F"
android:strokeLineCap="round"/>
<path
android:pathData="M15.5,5.217V20M21,10.217L15.5,5L10,10.217"
android:strokeLineJoin="round"
android:strokeWidth="2.7"
android:fillColor="#00000000"
android:strokeColor="#7E848F"
android:strokeLineCap="round"/>
</vector>
1 change: 1 addition & 0 deletions core/designresource/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@
<string name="privacy_and_policy">개인정보 처리 방침</string>
<string name="faq">자주 묻는 질문</string>
<string name="inquiry">문의하기</string>
<string name="share">공유하기</string>
<string name="call">통화하기</string>
<string name="inquiry_by_call">전화로 문의하기</string>
<string name="inquiry_by_chat">채팅으로 문의하기</string>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package com.idle.domain.model.jobposting

data class SharedJobPostingInfo(
val jobPostingId: String,
val jobPostingType: JobPostingType,
)
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ data class Notification(

enum class NotificationType(private val notificationTypeClass: Type) {
APPLICANT(NotificationContent.ApplicantNotification::class.java),
NEW_JOB_POSTING(NotificationContent.NewJobPostingNotification::class.java),
UNKNOWN(NotificationContent.UnKnownNotification::class.java);

companion object {
Expand All @@ -27,5 +28,6 @@ enum class NotificationType(private val notificationTypeClass: Type) {

sealed class NotificationContent {
data class ApplicantNotification(val jobPostingId: String) : NotificationContent()
data class NewJobPostingNotification(val jobPostingId: String) : NotificationContent()
data object UnKnownNotification : NotificationContent()
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ data class WorkerProfile(
val introduce: String?,
val speciality: String?,
val profileImageUrl: String?,
)
)
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ import com.idle.domain.model.jobposting.JobPostingType
import com.idle.domain.model.jobposting.LifeAssistance
import com.idle.domain.model.jobposting.MentalStatus
import com.idle.domain.model.jobposting.PayType
import com.idle.domain.model.jobposting.SharedJobPostingInfo
import com.idle.domain.model.jobposting.WorkerJobPosting
import com.idle.domain.model.jobposting.WorkerJobPostingDetail

interface JobPostingRepository {
var sharedJobPostingInfo: SharedJobPostingInfo?

suspend fun postJobPosting(
weekdays: List<DayOfWeek>,
startTime: String,
Expand Down
Loading

0 comments on commit 9f230ef

Please sign in to comment.