Class 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 set
      static void startActivity​(android.app.Activity activity)
      Starts the activity associated with the received deep link
      static void startActivity​(android.app.Activity activity, boolean finishCurrentActivity)
      Starts the activity associated with the received deep link
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DeepLinkHelper

        public DeepLinkHelper()
    • 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 - Activity
        finishCurrentActivity - If true, finishes the current activity after starting the new one.