File tree 4 files changed +57
-1
lines changed
app/src/main/kotlin/com/bff/wespot
kotlin/com/bff/wespot/navigation
4 files changed +57
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import android.content.Intent
6
6
import android.net.Uri
7
7
import com.bff.wespot.auth.AuthActivity
8
8
import com.bff.wespot.navigation.Navigator
9
+ import com.bff.wespot.navigation.util.WebLink
9
10
import com.bff.wespot.navigation.util.buildIntent
10
11
import timber.log.Timber
11
12
import javax.inject.Inject
@@ -96,6 +97,15 @@ class NavigatorImpl @Inject constructor() : Navigator {
96
97
return intent
97
98
}
98
99
100
+ override fun navigateToWebLink (context : Context , webLink : WebLink ) {
101
+ val webLinkIntent = Intent (
102
+ Intent .ACTION_VIEW ,
103
+ Uri .parse(context.getString(webLink.url)),
104
+ )
105
+ webLinkIntent.addFlags(Intent .FLAG_ACTIVITY_NEW_TASK )
106
+ context.startActivity(webLinkIntent)
107
+ }
108
+
99
109
private fun redirectToPlayStoreForInstagram (context : Context ) {
100
110
val appStoreIntent = Intent (
101
111
Intent .ACTION_VIEW ,
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package com.bff.wespot.navigation
3
3
import android.content.Context
4
4
import android.content.Intent
5
5
import android.net.Uri
6
+ import com.bff.wespot.navigation.util.WebLink
6
7
7
8
interface Navigator {
8
9
fun navigateToMain (
@@ -20,4 +21,6 @@ interface Navigator {
20
21
): Intent
21
22
22
23
fun navigateToSharing (context : Context )
23
- }
24
+
25
+ fun navigateToWebLink (context : Context , webLink : WebLink )
26
+ }
Original file line number Diff line number Diff line change
1
+ package com.bff.wespot.navigation.util
2
+
3
+ import com.bff.wespot.navigation.R
4
+
5
+ enum class WebLink {
6
+ PLAY_STORE ,
7
+ VOTE_QUESTION_GOOGLE_FORM ,
8
+ WESPOT_KAKAKO_CHANNEL ,
9
+ WESPOT_INSTARGRAM ,
10
+ USER_OPINION_GOOGLE_FORM ,
11
+ RESEARCH_PARTICIPATION_GOOGLE_FORM ,
12
+ WESPOT_MAKERS ,
13
+ PROFILE_CHANGE_GOOGLE_FROM ,
14
+ PRIVACY_POLICY ,
15
+ TERMS_OF_SERVICE ;
16
+
17
+ val url
18
+ get() = when (this ) {
19
+ PLAY_STORE -> R .string.play_store_url
20
+ VOTE_QUESTION_GOOGLE_FORM -> R .string.vote_question_google_form_url
21
+ WESPOT_KAKAKO_CHANNEL -> R .string.wespot_kakao_channel_url
22
+ WESPOT_INSTARGRAM -> R .string.wespot_instagram_url
23
+ USER_OPINION_GOOGLE_FORM -> R .string.user_opinion_google_form_url
24
+ RESEARCH_PARTICIPATION_GOOGLE_FORM -> R .string.research_participation_google_form_url
25
+ WESPOT_MAKERS -> R .string.wespot_makers_url
26
+ PROFILE_CHANGE_GOOGLE_FROM -> R .string.profile_change_google_form_url
27
+ PRIVACY_POLICY -> R .string.privacy_policy_url
28
+ TERMS_OF_SERVICE -> R .string.terms_of_service_url
29
+ }
30
+ }
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" utf-8" ?>
2
+ <resources >
3
+ <string name =" vote_question_google_form_url" >https://forms.gle/eiKdpjmwdxzvqm947</string >
4
+ <string name =" wespot_kakao_channel_url" >http://pf.kakao.com/_SEDcG</string >
5
+ <string name =" wespot_instagram_url" >https://www.instagram.com/wespot.official/</string >
6
+ <string name =" user_opinion_google_form_url" >https://forms.gle/BZbC5wpuMt9mynUG6</string >
7
+ <string name =" research_participation_google_form_url" >https://docs.google.com/forms/d/e/1FAIpQLSfkN2b752gRKtFRk9IUreFRacNXnj5jh4tlHWKp0n51IaObyw/viewform?usp=sf_link</string >
8
+ <string name =" wespot_makers_url" >https://www.notion.so/WeSpot-Makers-87e988ab3c9e47f28c141ad1aa663b80?pvs=4</string >
9
+ <string name =" profile_change_google_form_url" >https://docs.google.com/forms/d/e/1FAIpQLSdFlTCYbGL4QDYJlzt8jeeeA-E3ITWIBeYS2B5cAZs2j8wosQ/viewform?usp=sf_link</string >
10
+ <string name =" privacy_policy_url" >https://www.notion.so/2fa1c3002e14460f91462204b0daefbf?pvs=4</string >
11
+ <string name =" play_store_url" >https://play.google.com/store/apps</string >
12
+ <string name =" terms_of_service_url" >https://www.notion.so/yapp-workspace/0826c1435e0b4eba95ce62beb0aea425</string >
13
+ </resources >
You can’t perform that action at this time.
0 commit comments