Skip to content

Commit 6c10e45

Browse files
authored
[FEAT/#1475] 앱링크 세팅 (#1497)
* [FEAT/#1475] 앱링크 세팅 * [CHORE/#1475] CI 수정
1 parent cef332f commit 6c10e45

4 files changed

Lines changed: 33 additions & 2 deletions

File tree

.github/workflows/develop_PR_builder.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ jobs:
5050
DEV_SERVER_CLIENT_ID: ${{secrets.DEV_SERVER_CLIENT_ID}}
5151
PROD_SERVER_CLIENT_ID: ${{secrets.PROD_SERVER_CLIENT_ID}}
5252
PLATFORM: ${{secrets.PLATFORM}}
53+
PLAYGROUND_HOST: ${{secrets.PLAYGROUND_HOST}}
5354
run: |
5455
echo apiKey=\"$API_KEY\" >> ./local.properties
5556
echo dataStoreKey=\"$DATA_STORE_KEY\" >> ./local.properties
@@ -79,6 +80,8 @@ jobs:
7980
echo devServerClientId=\"DEV_SERVER_CLIENT_ID\" >> ./local.properties
8081
echo prodServerClientId=\"PROD_SERVER_CLIENT_ID\" >> ./local.properties
8182
echo platform=\"PLATFORM\" >> ./local.properties
83+
echo dev_playground_host=$PLAYGROUND_HOST >> ./local.properties
84+
echo prod_playground_host=$PLAYGROUND_HOST >> ./local.properties
8285
8386
- name: Access Firebase Service
8487
run: echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > ./app/google-services.json

app/src/main/AndroidManifest.xml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,17 @@
8282

8383
<data android:scheme="sopt" />
8484
</intent-filter>
85+
86+
<intent-filter android:autoVerify="true">
87+
<action android:name="android.intent.action.VIEW" />
88+
89+
<category android:name="android.intent.category.DEFAULT" />
90+
<category android:name="android.intent.category.BROWSABLE" />
91+
92+
<data
93+
android:scheme="https"
94+
android:host="${PLAYGROUND_HOST}" />
95+
</intent-filter>
8596
</activity>
8697
<activity
8798
android:name=".feature.attendance.AttendanceActivity"
@@ -140,7 +151,7 @@
140151
<activity
141152
android:name=".feature.notification.SchemeActivity"
142153
android:exported="true"
143-
android:launchMode="singleTop" />
154+
android:launchMode="singleTop"/>
144155
<activity
145156
android:name=".feature.fortune.FortuneActivity"
146157
android:exported="true"

app/src/main/java/org/sopt/official/feature/deeplink/DeepLinkSchemeActivity.kt

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@
2424
*/
2525
package org.sopt.official.feature.deeplink
2626

27+
import android.content.Intent
2728
import android.os.Bundle
2829
import androidx.appcompat.app.AppCompatActivity
2930
import com.airbnb.deeplinkdispatch.DeepLinkHandler
3031
import dagger.hilt.android.AndroidEntryPoint
32+
import javax.inject.Inject
3133
import org.sopt.official.common.navigator.NavigatorProvider
3234
import org.sopt.official.deeplink.AppDeeplinkModule
3335
import org.sopt.official.deeplink.AppDeeplinkModuleRegistry
@@ -36,7 +38,8 @@ import org.sopt.official.feature.fortune.deeplink.FortuneDeeplinkModuleRegistry
3638
import org.sopt.official.network.persistence.SoptDataStore
3739
import org.sopt.official.webview.deeplink.WebDeeplinkModule
3840
import org.sopt.official.webview.deeplink.WebDeeplinkModuleRegistry
39-
import javax.inject.Inject
41+
import org.sopt.official.webview.view.WebViewActivity
42+
import org.sopt.official.webview.view.WebViewActivity.Companion.INTENT_URL
4043

4144
@AndroidEntryPoint
4245
@DeepLinkHandler(value = [AppDeeplinkModule::class, FortuneDeeplinkModule::class, WebDeeplinkModule::class])
@@ -57,6 +60,16 @@ class DeepLinkSchemeActivity : AppCompatActivity() {
5760
return
5861
}
5962

63+
if (intent?.data?.scheme == "https") {
64+
Intent(this, WebViewActivity::class.java).apply {
65+
putExtra(INTENT_URL, intent?.dataString)
66+
}.apply {
67+
this@DeepLinkSchemeActivity.startActivity(this)
68+
}
69+
finish()
70+
return
71+
}
72+
6073
DeepLinkDelegate(
6174
AppDeeplinkModuleRegistry(),
6275
FortuneDeeplinkModuleRegistry(),

build-logic/convention/src/main/kotlin/org/sopt/official/plugin/configuration/ConfigurationManager.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,16 @@ object ConfigurationManager {
5454
"String", "PLAYGROUND_API",
5555
properties.getQuotedProperty("debugPlaygroundApi")
5656
)
57+
58+
manifestPlaceholders["PLAYGROUND_HOST"] = properties.getProperty("dev_playground_host")
5759
}
5860
getByName("release").apply {
5961
buildConfigField(
6062
"String", "PLAYGROUND_API",
6163
properties.getQuotedProperty("releasePlaygroundApi")
6264
)
65+
66+
manifestPlaceholders["PLAYGROUND_HOST"] = properties.getProperty("prod_playground_host")
6367
}
6468
}
6569
}

0 commit comments

Comments
 (0)