Created
November 7, 2020 14:17
-
-
Save mayuce/1f90ca4e7c03b38af70f2e63c3ca22ed to your computer and use it in GitHub Desktop.
This file contains hidden or 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
package com.some.package.ui.splash.presentation | |
import .... | |
class SplashActivity : | |
BaseActivity<*, *>() { | |
companion object { | |
private const val DEEP_LINK_FUNCTION_ID = "functionId" | |
} | |
override fun onCreate() { | |
super.onCreate() | |
// ---- SOME CODE | |
route() | |
} | |
private fun route() { | |
intent.data?.getQueryParameter(DEEP_LINK_FUNCTION_ID)?.toIntOrNull()?.let { | |
Router.routeToLink(this@SplashActivity, it, intent.data) | |
} ?: kotlin.run { | |
MovieDetailRouter.startActivity( | |
this@SplashActivity, | |
RouteDetailRouter.RouterData(-1) | |
) | |
} | |
finish() | |
} | |
// ---- SOME CODE | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment