diff --git a/README.md b/README.md
index 99676874..b7226bd3 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,20 @@
# android-map-notification
+
+## Step1
+
+### ๐ Description
+
+์นด์นด์ค๋งต ํด๋ก ์ฝ๋ฉ _ ์๋ฆผ-ํ์ด์ด๋ฒ ์ด
+
+
+### ๐ฏ Tasks
+
+- Main ๊ธฐ๋ฅ : **Splash Screen**
+
+- ์ด๊ธฐ ์ง์
ํ๋ฉด ์ถ๊ฐ
+- Firebase์ Remote Config ์ค์
+- ์๋น์ค ์ํ๋ฅผ ๋ํ๋ด๋ ๋งค๊ฐ๋ณ์ ๊ฐ๊ฐ ๋ฑ๋ก
+ - ๋งค๊ฐ๋ณ์ ์ด๋ฆ : serviceState, serviceMessage
+- ๋งค๊ฐ๋ณ์ serviceState ๊ฐ์ด ON_SERVICE์ผ ๋๋ง ์ด๊ธฐ ์ง์
ํ๋ฉด์ด ์ง๋ ํ๋ฉด์ผ๋ก ๋์ด๊ฐ
+- ๋งค๊ฐ๋ณ์ serviceState ๊ฐ์ด ON_SERVICE์ด ์๋ ๊ฒฝ์ฐ, serviceMessage ๊ฐ์ ์ด๊ธฐ ์ง์
ํ๋ฉด ํ๋จ์ ํ์ํ๊ณ ์ง๋ ํ๋ฉด์ผ๋ก ์ง์
ํ์ง ์์
+- ์๋ฒ ์ํ, UI ๋ก๋ฉ ๋ฑ์ ๋ํ ์ํ ๊ด๋ฆฌ
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 1001628e..45f6371a 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -7,31 +7,35 @@
+ tools:targetApi="31">
+ android:exported="false" />
+
+
-
-
+
+
+
-
-
+
\ No newline at end of file
diff --git a/app/src/main/java/campus/tech/kakao/map/di/AppModule.kt b/app/src/main/java/campus/tech/kakao/map/di/AppModule.kt
index d124d375..77b032e0 100644
--- a/app/src/main/java/campus/tech/kakao/map/di/AppModule.kt
+++ b/app/src/main/java/campus/tech/kakao/map/di/AppModule.kt
@@ -5,6 +5,7 @@ import androidx.room.Room
import campus.tech.kakao.map.database.AppDatabase
import campus.tech.kakao.map.database.MapItemDao
import campus.tech.kakao.map.repository.MapItemRepository
+import com.google.firebase.remoteconfig.FirebaseRemoteConfig
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
@@ -39,4 +40,10 @@ object AppModule {
): MapItemRepository {
return MapItemRepository(mapItemDao, context)
}
+
+ @Provides
+ @Singleton
+ fun provideFirebaseRemoteConfig(): FirebaseRemoteConfig {
+ return FirebaseRemoteConfig.getInstance()
+ }
}
\ No newline at end of file
diff --git a/app/src/main/java/campus/tech/kakao/map/ui/SplashScreenActivity.kt b/app/src/main/java/campus/tech/kakao/map/ui/SplashScreenActivity.kt
new file mode 100644
index 00000000..8fb67d00
--- /dev/null
+++ b/app/src/main/java/campus/tech/kakao/map/ui/SplashScreenActivity.kt
@@ -0,0 +1,50 @@
+package campus.tech.kakao.map.ui
+
+import android.content.Intent
+import android.os.Bundle
+import android.os.Handler
+import android.os.Looper
+import android.util.Log
+import androidx.activity.viewModels
+import androidx.appcompat.app.AppCompatActivity
+import androidx.databinding.DataBindingUtil
+import campus.tech.kakao.map.R
+import campus.tech.kakao.map.databinding.ActivitySplashScreenBinding
+import campus.tech.kakao.map.viewmodel.SplashScreenViewModel
+import dagger.hilt.android.AndroidEntryPoint
+
+@AndroidEntryPoint
+class SplashScreenActivity : AppCompatActivity() {
+
+ private val viewModel: SplashScreenViewModel by viewModels()
+ private lateinit var binding: ActivitySplashScreenBinding
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+
+ binding = DataBindingUtil.setContentView(this, R.layout.activity_splash_screen)
+ binding.lifecycleOwner = this
+ binding.viewModel = viewModel
+
+ viewModel.serviceState.observe(this) { state ->
+ if (state == "ON_SERVICE") {
+ navigateToMapActivity()
+ } else {
+ showServiceMessage()
+ }
+ }
+ }
+
+ private fun navigateToMapActivity() {
+ Log.d("SplashScreen", "Success")
+ Handler(Looper.getMainLooper()).postDelayed({
+ startActivity(Intent(this, MapActivity::class.java))
+ finish()
+ }, 3000)
+ }
+
+ private fun showServiceMessage() {
+ Log.d("SplashScreen", "Failed")
+ binding.tvServiceMessage.text = viewModel.serviceMessage.value
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/campus/tech/kakao/map/viewmodel/SplashScreenViewModel.kt b/app/src/main/java/campus/tech/kakao/map/viewmodel/SplashScreenViewModel.kt
new file mode 100644
index 00000000..bfc23c3b
--- /dev/null
+++ b/app/src/main/java/campus/tech/kakao/map/viewmodel/SplashScreenViewModel.kt
@@ -0,0 +1,55 @@
+package campus.tech.kakao.map.viewmodel
+
+import android.util.Log
+import androidx.lifecycle.LiveData
+import androidx.lifecycle.MutableLiveData
+import androidx.lifecycle.ViewModel
+import androidx.lifecycle.viewModelScope
+import com.google.firebase.remoteconfig.FirebaseRemoteConfig
+import com.google.firebase.remoteconfig.remoteConfigSettings
+import dagger.hilt.android.lifecycle.HiltViewModel
+import kotlinx.coroutines.launch
+import javax.inject.Inject
+
+@HiltViewModel
+class SplashScreenViewModel @Inject constructor(
+ private val remoteConfig: FirebaseRemoteConfig
+) : ViewModel() {
+
+ private val _serviceState = MutableLiveData()
+ val serviceState: LiveData = _serviceState
+
+ private val _serviceMessage = MutableLiveData()
+ val serviceMessage: LiveData = _serviceMessage
+
+ init {
+ setupRemoteConfig()
+ fetchRemoteConfig()
+ }
+
+ private fun setupRemoteConfig() {
+ val configSettings = remoteConfigSettings {
+ minimumFetchIntervalInSeconds = 0
+ }
+ remoteConfig.setConfigSettingsAsync(configSettings)
+ }
+
+ private fun fetchRemoteConfig() {
+ viewModelScope.launch {
+ remoteConfig.fetchAndActivate()
+ .addOnCompleteListener { task ->
+ if (task.isSuccessful) {
+ handleRemoteConfig()
+ } else {
+ Log.d("SplashScreenViewModel", "Fetch failed")
+ }
+ }
+ }
+ }
+
+ private fun handleRemoteConfig() {
+ _serviceState.value = remoteConfig.getString("serviceState")
+ _serviceMessage.value = remoteConfig.getString("serviceMessage")
+ }
+
+}
\ No newline at end of file
diff --git a/app/src/main/res/drawable/map.png b/app/src/main/res/drawable/map.png
new file mode 100644
index 00000000..f7a97d9d
Binary files /dev/null and b/app/src/main/res/drawable/map.png differ
diff --git a/app/src/main/res/layout/activity_splash_screen.xml b/app/src/main/res/layout/activity_splash_screen.xml
new file mode 100644
index 00000000..24bd9117
--- /dev/null
+++ b/app/src/main/res/layout/activity_splash_screen.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 4bc21f24..843469f2 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -16,4 +16,6 @@
์ง๋ ์ธ์ฆ์ ์คํจํ์ต๋๋ค.\n๋ค์ ์๋ํด์ฃผ์ธ์.
์๋ฌ ๋ฉ์ธ์ง
๋ก๋ฉ ์ด๋ฏธ์ง
+ tvServiceMessage
+ splashScreenMapIcon
\ No newline at end of file