Challenges with automating deep linking

Telemarketing List delivers accurate contact databases to enhance lead generation and customer outreach. Connect with the right prospects quickly and efficiently.
Post Reply
ishanijerin1
Posts: 59
Joined: Tue Jan 07, 2025 4:40 am

Challenges with automating deep linking

Post by ishanijerin1 »

In the Navigation component, when using explicit and implicit deep links, transitions are automatically performed, so it is not possible to insert processing before the transition. This behavior was the main reason why the requirement "Perform biometric authentication when the app is launched and when it returns to the background" could not be met.

Differences in behavior when the app is launched and when it returns to the background
When the app starts
Although deep linking is handled automatically in all launchModecases, the transition occurs before biometric authentication is performed, which does not meet the requirements.
When returning to the background
standardwould spawn a new activity, which would cause scotland email address the transition to be performed before the biometric authentication, and would therefore not meet the requirements.
singleTopsingleTaskActivities are reused in and onNewIntent()and deep links can be handled manually in , making it possible to insert biometric authentication.
Manual Processing
Instead of using the deep link described in the official documentation, we designed the transition to be controlled after biometric authentication is performed by manually implementing the transition.

Sample Code
override fun onResume() {
super .onResume()

// Get URI data from intent.
val data = intent?.data
if (data != null ) {
// Get destination and required data.
val destinationId = getDestinationId(data)
val bundle = getNavigationData(data)

if (destinationId != null && bundle != null ) {
// Execute the transition only if biometric authentication is successful
if (performBiometricAuthentication()) {
navController.navigate(destinationId, bundle)
Post Reply