public static AppLinkData createFromActivity ( Activity activity ) { Validate . notNull ( activity , "activity" ) ; Intent intent = activity . getIntent ( ) ; if ( intent == null ) { return null ; } AppLinkData appLinkData = createFromAlApplinkData ( intent ) ; if ( appLinkData == null ) { String appLinkArgsJsonString = intent . getStringExtra ( BUNDLE_APPLINK_ARGS_KEY ) ; appLinkData = createFromJson ( appLinkArgsJsonString ) ; } if ( appLinkData == null ) { // Try regular app linking appLinkData = createFromUri ( intent . getData ( ) ) ; } return appLinkData ; }
Parses out any app link data from the Intent of the Activity passed in .