Пример #1
0
        // Get the intent for an activity corresponding to the deep link ID.
        private Intent processDeepLinkId(String deepLinkId)
        {
            Intent route;

            Android.Net.Uri uri = Android.Net.Uri.Parse(deepLinkId);
            if (uri.GetPath().StartsWith(GetString(R.String.plus_example_deep_link_id)))
            {
                route = new Intent().SetClass(GetApplicationContext(), typeof(SignInActivity));

                // Check for the call-to-action query parameter, and perform an action.
                String viewAction = uri.GetQueryParameter("view");
                if (!TextUtils.IsEmpty(viewAction) && "true".Equals(viewAction))
                {
                    Toast.MakeText(this, "Performed a view", Toast.LENGTH_LONG).Show();
                }
            }
            else
            {
                route = new Intent().SetClass(GetApplicationContext(), typeof(PlusSampleActivity));
            }

            return(route);
        }