Package com.cheetahdigital.uikit.helper
Class DeepLinkHelper
- java.lang.Object
-
- com.cheetahdigital.uikit.helper.DeepLinkHelper
-
public class DeepLinkHelper extends java.lang.Object
Created by henry.domingo on 15/02/2018. Deep Linking Helper class.
-
-
Constructor Summary
Constructors Constructor Description DeepLinkHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static android.content.Intent
getIntent(android.app.Activity activity)
Matches the parameters set keys with the LINK_TYPES values.static java.util.HashMap<java.lang.String,java.lang.String>
getParameters(android.app.Activity activity)
Parses URI deep link parameters into a setstatic void
startActivity(android.app.Activity activity)
Starts the activity associated with the received deep linkstatic void
startActivity(android.app.Activity activity, boolean finishCurrentActivity)
Starts the activity associated with the received deep link
-
-
-
Method Detail
-
getParameters
public static java.util.HashMap<java.lang.String,java.lang.String> getParameters(android.app.Activity activity)
Parses URI deep link parameters into a set- Parameters:
activity
- Activity- Returns:
- Set of query parameters. Key-value pairs
-
getIntent
@Nullable public static android.content.Intent getIntent(android.app.Activity activity)
Matches the parameters set keys with the LINK_TYPES values. It then sets the corresponding implicit intent together with the value from the parameter set as an extra data.- Parameters:
activity
- Activity- Returns:
- implicit Intent with the respective extras
-
startActivity
public static void startActivity(android.app.Activity activity)
Starts the activity associated with the received deep link- Parameters:
activity
- Activity
-
startActivity
public static void startActivity(android.app.Activity activity, boolean finishCurrentActivity)
Starts the activity associated with the received deep link- Parameters:
activity
- ActivityfinishCurrentActivity
- If true, finishes the current activity after starting the new one.
-
-