-
-
Save vinodbaste/8095acf8da13829bb27888350c261440 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(data: Uri?) { | |
when (data?.path) { | |
DEEPLINK_HOME -> { | |
Snackbar.make(findViewById(android.R.id.content), R.string.welcome_message, | |
Snackbar.LENGTH_SHORT).show() | |
} | |
DEEPLINK_QUERY -> { | |
val symbol = data.getQueryParameter(SYMBOL_QUERY).orEmpty() | |
val getQuoteIntent = Intent(this, StockQuoteActivity::class.java).apply { | |
putExtra(SYMBOL_QUERY, symbol.toUpperCase(Locale.getDefault())) | |
} | |
startActivity(getQuoteIntent) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment