Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Is there any way to capture deeplink and navigate accordingly when App is in background/running ?

$
0
0

Hi I am working on a xamarin project and dynamic link is implemented in this project. I am clicking on dynamic link and able to extract parameters from it when my app is closed, I am doing the same by this way :

For Android

public void CheckForDynamicLinkParameter()
{
var deepLink = AppInviteReferral.GetDeepLink(Intent);

        //Extracting page to be opened from deepLink URL
        SetPageFromLink(deepLink);

        var data = Intent.Data;

        if (deepLink != null)
        {

            Uri myUri = new Uri(deepLink);

            string param1 = HttpUtility.ParseQueryString(myUri.Query).Get("id");
            string param2 = HttpUtility.ParseQueryString(myUri.Query).Get("token");
            Utilities.Configuration.UpdateConfigValue(Utilities.Constants.deepLinkEmail, param1);
            Utilities.Configuration.UpdateConfigValue(Utilities.Constants.deepLinkToken, param2);

        }


    }

CheckForDynamicLinkParameter() method I am calling in OnCreate() of main activity and extracting params from deeplink and navigating to some different pages.

For iOS :

Same way in iOS I am calling ContinueUserActivity(). This way I am able to find parameters only when my app is closed.

My issue is that, when I am clicking the dynamic link when app is open/in backgrounsd I am unable to capture the deeplink. So is there any way to capture deeplink when my app is open ?


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>