File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
feature/main/src/main/java/com/plottwist/feature/main Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 11package com.plottwist.feature.main
22
3+ import android.content.Intent
34import android.os.Bundle
45import androidx.activity.ComponentActivity
56import androidx.activity.compose.setContent
67import androidx.activity.enableEdgeToEdge
8+ import androidx.core.net.toUri
79import com.plottwist.feature.main.ui.theme.TukTheme
810import dagger.hilt.android.AndroidEntryPoint
911
@@ -13,6 +15,7 @@ class MainActivity : ComponentActivity() {
1315 super .onCreate(savedInstanceState)
1416 enableEdgeToEdge()
1517
18+ handleDeepLink(intent)
1619 setComposeContent()
1720 }
1821
@@ -24,6 +27,16 @@ class MainActivity : ComponentActivity() {
2427 }
2528 }
2629
30+ private fun handleDeepLink (
31+ intent : Intent ,
32+ ) {
33+ val deepLink = intent.extras?.getString(" deepLink" ) ? : return
34+
35+ startActivity(Intent (Intent .ACTION_VIEW ).apply {
36+ data = deepLink.toUri()
37+ })
38+ }
39+
2740 companion object {
2841 const val NOTIFICATION_REQUEST_CODE = 0
2942 }
You can’t perform that action at this time.
0 commit comments