Last active
February 11, 2020 16:48
-
-
Save ParkSangGwon/b78e2a8c8d15cf4a40e42e9a13cb309e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun handleDeepLink() { | |
val deepLinkUri = intent.data | |
logd("deepLinkUri: $deepLinkUri") | |
val deepLinkIntent = deepLinkUri?.let { | |
DeepLinkInfo.invoke(deepLinkUri).getIntent(this, it) | |
} ?: DeepLinkInfo.getMainIntent(this) | |
if (isTaskRoot) { | |
TaskStackBuilder.create(this).apply { | |
addNextIntentWithParentStack(DeepLinkInfo.getMainIntent(this@SchemeActivity)) | |
addNextIntent(deepLinkIntent) | |
}.startActivities() | |
} else { | |
startActivity(deepLinkIntent) | |
} | |
finish() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment