AppLinkData
有此級別的更新版本。前往查看 最新版本。

Class to encapsulate an app link, and provide methods for constructing the data from various sources

伸延:Object
套件:applinks
類別方式
fetchDeferredAppLinkData(Context, CompletionHandler)

Asynchronously fetches app link information that might have been stored for use after installation of the app

public static void fetchDeferredAppLinkData(Context context, CompletionHandler completionHandler)
參數說明
contextThe context
completionHandlerCompletionHandler to be notified with the AppLinkData object or null if none is available. Must not be null.
fetchDeferredAppLinkData(Context, String, CompletionHandler)

Asynchronously fetches app link information that might have been stored for use after installation of the app

public static void fetchDeferredAppLinkData(Context context, String applicationId, CompletionHandler completionHandler)
參數說明
contextThe context
applicationIdFacebook application Id. If null, it is taken from the manifest
completionHandlerCompletionHandler to be notified with the AppLinkData object or null if none is available. Must not be null.
createFromActivity(Activity)

Parses out any app link data from the Intent of the Activity passed in.

public static AppLinkData createFromActivity(Activity activity)
參數說明
activityActivity that was started because of an app link
Returns
AppLinkData if found. null if not.
createFromAlApplinkData(Intent)

Parses out any app link data from the Intent passed in.

public static AppLinkData createFromAlApplinkData(Intent intent)
參數說明
intentIntent from the Activity that started because of an app link
Returns
AppLinkData if found. null if not.
執行個體方法
getTargetUri()

Returns the target uri for this App Link.

public Uri getTargetUri()
Returns
Target uri
getRef()

Returns the ref for this App Link.

public String getRef()
Returns
Ref
getPromotionCode()

Returns the promotion code for this App Link.

public String getPromotionCode()
Returns
Promotion code
getArgumentBundle()

The full set of arguments for this app link. Properties like target uri & ref are typically picked out of this set of arguments.

public Bundle getArgumentBundle()
Returns
App link related arguments as a bundle.
getRefererData()

The referer data associated with the app link. This will contain Facebook specific information like fb_access_token, fb_expires_in, and fb_ref.

public Bundle getRefererData()
Returns
The referer data.
常數
ARGUMENTS_TAPTIME_KEY
Key that should be used to pull out the UTC Unix tap-time from the arguments for this app link.
public static final String ARGUMENTS_TAPTIME_KEY
ARGUMENTS_REFERER_DATA_KEY
Key that should be used to get the "referer_data" field for this app link.
public static final String ARGUMENTS_REFERER_DATA_KEY
ARGUMENTS_EXTRAS_KEY
Key that should be used to get the "extras" field for this app link.
public static final String ARGUMENTS_EXTRAS_KEY
ARGUMENTS_NATIVE_CLASS_KEY
Key that should be used to pull out the native class that would have been used if the applink was deferred.
public static final String ARGUMENTS_NATIVE_CLASS_KEY
ARGUMENTS_NATIVE_URL
Key that should be used to pull out the native url that would have been used if the applink was deferred.
public static final String ARGUMENTS_NATIVE_URL