public static Uri getTargetUrl ( Intent intent ) { Bundle appLinkData = getAppLinkData ( intent ) ; if ( appLinkData != null ) { String targetString = appLinkData . getString ( KEY_NAME_TARGET ) ; if ( targetString != null ) { return Uri . parse ( targetString ) ; } } return intent . getData ( ) ; }
Gets the target URL for an intent regardless of whether the intent is from an App Link . If the intent is from an App Link this will be the App Link target . Otherwise it will be the data Uri from the intent itself .