-
@Deprecated() public class Branch.ShareLinkBuilder extends BranchShareSheetBuilder
Legacy class for building a share link dialog. Use BranchShareSheetBuilder instead.
-
-
Constructor Summary
Constructors Constructor Description Branch.ShareLinkBuilder(Activity activity, JSONObject parameters)Branch.ShareLinkBuilder(Activity activity, BranchShortLinkBuilder shortLinkBuilder)
-
Method Summary
Modifier and Type Method Description Branch.ShareLinkBuildersetMessage(String message)Sets the message to be shared with the link. Branch.ShareLinkBuildersetSubject(String subject)Sets the subject of this message. Branch.ShareLinkBuilderaddTag(String tag)Adds the given tag an iterable Collection of String tags associated with a deeplink. Branch.ShareLinkBuilderaddTags(ArrayList<String> tags)Adds the given tag an iterable Collection of String tags associated with a deeplink. Branch.ShareLinkBuildersetFeature(String feature)Adds a feature that make use of the link. Branch.ShareLinkBuildersetStage(String stage)Adds a stage application or user flow associated with this link. Branch.ShareLinkBuildersetCallback(Branch.BranchLinkShareListener callback)Adds a callback to get the sharing status. Branch.ShareLinkBuildersetChannelProperties(Branch.IChannelProperties channelPropertiesCallback)Branch.ShareLinkBuilderaddPreferredSharingOption(SharingHelper.SHARE_WITH preferredOption)Adds application to the preferred list of applications which are shown on share dialog.Only these options will be visible when the application selector dialog launches. Branch.ShareLinkBuilderaddPreferredSharingOptions(ArrayList<SharingHelper.SHARE_WITH> preferredOptions)Adds application to the preferred list of applications which are shown on share dialog.Only these options will be visible when the application selector dialog launches. Branch.ShareLinkBuilderaddParam(String key, String value)Add the given key value to the deep link parameters Branch.ShareLinkBuildersetDefaultURL(String url)Set a default url to share in case there is any error creating the deep link Branch.ShareLinkBuildersetMoreOptionStyle(Drawable icon, String label)Set the icon and label for the option to expand the application list to see more options. Branch.ShareLinkBuildersetMoreOptionStyle(int drawableIconID, int stringLabelID)Set the icon and label for the option to expand the application list to see more options. Branch.ShareLinkBuildersetCopyUrlStyle(Drawable icon, String label, String message)Set the icon, label and success message for copy url option. Branch.ShareLinkBuildersetCopyUrlStyle(int drawableIconID, int stringLabelID, int stringMessageID)Set the icon, label and success message for copy url option. Branch.ShareLinkBuildersetAlias(String alias)Sets the alias for this link. Branch.ShareLinkBuildersetMatchDuration(int matchDuration)Sets the amount of time that Branch allows a click to remain outstanding. Branch.ShareLinkBuildersetAsFullWidthStyle(boolean setFullWidthStyle)Sets the share dialog to full width mode. Branch.ShareLinkBuildersetDialogThemeResourceID(@StyleRes() int styleResourceID)Sets the given resource id as the theme id for share sheet dialog view. Branch.ShareLinkBuildersetDividerHeight(int height)Set the height for the divider for the sharing channels in the list. Branch.ShareLinkBuildersetSharingTitle(String title)Set the title for the sharing dialog Branch.ShareLinkBuildersetSharingTitle(View titleView)Set the title for the sharing dialog Branch.ShareLinkBuildersetIconSize(int iconSize)Set icon size for the sharing dialog Branch.ShareLinkBuilderexcludeFromShareSheet(@NonNull() String packageName)Exclude items from the ShareSheet by package name String. Branch.ShareLinkBuilderexcludeFromShareSheet(@NonNull() Array<String> packageName)Exclude items from the ShareSheet by package name array. Branch.ShareLinkBuilderexcludeFromShareSheet(@NonNull() List<String> packageNames)Exclude items from the ShareSheet by package name List. Branch.ShareLinkBuilderincludeInShareSheet(@NonNull() String packageName)Include items from the ShareSheet by package name String. Branch.ShareLinkBuilderincludeInShareSheet(@NonNull() Array<String> packageName)Include items from the ShareSheet by package name Array. Branch.ShareLinkBuilderincludeInShareSheet(@NonNull() List<String> packageNames)Include items from the ShareSheet by package name List. -
Methods inherited from class io.branch.referral.BranchShareSheetBuilder
addParam, addPreferredSharingOption, addPreferredSharingOptions, addTag, addTags, excludeFromShareSheet, excludeFromShareSheet, excludeFromShareSheet, getActivity, getBranch, getCallback, getChannelPropertiesCallback, getCopyURlText, getCopyUrlIcon, getDefaultURL, getDialogThemeResourceID, getDividerHeight, getIconSize, getIsFullWidthStyle, getMoreOptionIcon, getMoreOptionText, getPreferredOptions, getShareMsg, getShareSub, getSharingTitle, getSharingTitleView, getShortLinkBuilder, getStyleResourceID, getUrlCopiedMessage, includeInShareSheet, includeInShareSheet, includeInShareSheet, setAlias, setAsFullWidthStyle, setCallback, setChannelProperties, setCopyUrlStyle, setCopyUrlStyle, setDefaultURL, setDialogThemeResourceID, setDividerHeight, setFeature, setIconSize, setMatchDuration, setMessage, setMoreOptionStyle, setMoreOptionStyle, setSharingTitle, setSharingTitle, setShortLinkBuilderInternal, setStage, setStyleResourceID, setSubject, shareLink -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
Branch.ShareLinkBuilder
Branch.ShareLinkBuilder(Activity activity, JSONObject parameters)
-
Branch.ShareLinkBuilder
Branch.ShareLinkBuilder(Activity activity, BranchShortLinkBuilder shortLinkBuilder)
-
-
Method Detail
-
setMessage
Branch.ShareLinkBuilder setMessage(String message)
Sets the message to be shared with the link.
- Parameters:
message- A String to be shared with the link
-
setSubject
Branch.ShareLinkBuilder setSubject(String subject)
Sets the subject of this message. This will be added to Email and SMS Application capable of handling subject in the message.
- Parameters:
subject- A String subject of this message.
-
addTag
Branch.ShareLinkBuilder addTag(String tag)
Adds the given tag an iterable Collection of String tags associated with a deeplink.
- Parameters:
tag- A String to be added to the iterable Collection of String tags associated with a deeplink.
-
addTags
Branch.ShareLinkBuilder addTags(ArrayList<String> tags)
Adds the given tag an iterable Collection of String tags associated with a deeplink.
- Parameters:
tags- A java.util.List of tags to be added to the iterable Collection of String tags associated with a deeplink.
-
setFeature
Branch.ShareLinkBuilder setFeature(String feature)
Adds a feature that make use of the link.
- Parameters:
feature- A String value identifying the feature that the link makes use of.Should not exceed 128 characters.
-
setStage
Branch.ShareLinkBuilder setStage(String stage)
Adds a stage application or user flow associated with this link.
- Parameters:
stage- A String value identifying the stage in an application or user flowprocess.
-
setCallback
Branch.ShareLinkBuilder setCallback(Branch.BranchLinkShareListener callback)
Adds a callback to get the sharing status.
- Parameters:
callback- A Branch.BranchLinkShareListener instance for getting sharing status.
-
setChannelProperties
Branch.ShareLinkBuilder setChannelProperties(Branch.IChannelProperties channelPropertiesCallback)
- Parameters:
channelPropertiesCallback- A io.branch.referral.Branch.IChannelProperties instance for customizing sharing properties for channels.
-
addPreferredSharingOption
Branch.ShareLinkBuilder addPreferredSharingOption(SharingHelper.SHARE_WITH preferredOption)
Adds application to the preferred list of applications which are shown on share dialog.Only these options will be visible when the application selector dialog launches. Other options can beaccessed by clicking "More"
- Parameters:
preferredOption- A list of applications to be added as preferred options on the app chooser.
-
addPreferredSharingOptions
Branch.ShareLinkBuilder addPreferredSharingOptions(ArrayList<SharingHelper.SHARE_WITH> preferredOptions)
Adds application to the preferred list of applications which are shown on share dialog.Only these options will be visible when the application selector dialog launches. Other options can beaccessed by clicking "More"
- Parameters:
preferredOptions- A list of applications to be added as preferred options on the app chooser.
-
addParam
Branch.ShareLinkBuilder addParam(String key, String value)
Add the given key value to the deep link parameters
-
setDefaultURL
Branch.ShareLinkBuilder setDefaultURL(String url)
Set a default url to share in case there is any error creating the deep link
- Parameters:
url- A String with value of default url to be shared with the selected application in case deep link creation fails.
-
setMoreOptionStyle
Branch.ShareLinkBuilder setMoreOptionStyle(Drawable icon, String label)
Set the icon and label for the option to expand the application list to see more options.Default label is set to "More"
- Parameters:
icon- Drawable to set as the icon for more option.label- A String with value for the more option label.
-
setMoreOptionStyle
Branch.ShareLinkBuilder setMoreOptionStyle(int drawableIconID, int stringLabelID)
Set the icon and label for the option to expand the application list to see more options.Default label is set to "More"
- Parameters:
drawableIconID- Resource ID for the drawable to set as the icon for more option.stringLabelID- Resource ID for String label for the more option.
-
setCopyUrlStyle
Branch.ShareLinkBuilder setCopyUrlStyle(Drawable icon, String label, String message)
Set the icon, label and success message for copy url option. Default label is "Copy link".
-
setCopyUrlStyle
Branch.ShareLinkBuilder setCopyUrlStyle(int drawableIconID, int stringLabelID, int stringMessageID)
Set the icon, label and success message for copy url option. Default label is "Copy link".
- Parameters:
drawableIconID- Resource ID for the drawable to set as the icon for copy url option.stringLabelID- Resource ID for the string label the copy url option.stringMessageID- Resource ID for the string message to show toast message displayed on copying a url
-
setAlias
Branch.ShareLinkBuilder setAlias(String alias)
Sets the alias for this link.
- Parameters:
alias- Link 'alias' can be used to label the endpoint on the link.
-
setMatchDuration
Branch.ShareLinkBuilder setMatchDuration(int matchDuration)
Sets the amount of time that Branch allows a click to remain outstanding.
- Parameters:
matchDuration- A Integer value specifying the time that Branch allows a click toremain outstanding and be eligible to be matched with a new app session.
-
setAsFullWidthStyle
Branch.ShareLinkBuilder setAsFullWidthStyle(boolean setFullWidthStyle)
Sets the share dialog to full width mode. Full width mode will show a non modal sheet with entire screen width.
- Parameters:
setFullWidthStyle- Boolean With value true if a full width style share sheet is desired.
-
setDialogThemeResourceID
Branch.ShareLinkBuilder setDialogThemeResourceID(@StyleRes() int styleResourceID)
Sets the given resource id as the theme id for share sheet dialog view.
- Parameters:
styleResourceID- the id of the theme to be applied to the share sheet dialog.
-
setDividerHeight
Branch.ShareLinkBuilder setDividerHeight(int height)
Set the height for the divider for the sharing channels in the list. Set this to zero to remove the dividers
- Parameters:
height- The new height of the divider in pixels.
-
setSharingTitle
Branch.ShareLinkBuilder setSharingTitle(String title)
Set the title for the sharing dialog
- Parameters:
title- String containing the value for the title text.
-
setSharingTitle
Branch.ShareLinkBuilder setSharingTitle(View titleView)
Set the title for the sharing dialog
- Parameters:
titleView- View for setting the title.
-
setIconSize
Branch.ShareLinkBuilder setIconSize(int iconSize)
Set icon size for the sharing dialog
- Parameters:
iconSize- for setting the share sheet icon size.
-
excludeFromShareSheet
Branch.ShareLinkBuilder excludeFromShareSheet(@NonNull() String packageName)
Exclude items from the ShareSheet by package name String.
- Parameters:
packageName- String package name to be excluded.
-
excludeFromShareSheet
Branch.ShareLinkBuilder excludeFromShareSheet(@NonNull() Array<String> packageName)
Exclude items from the ShareSheet by package name array.
- Parameters:
packageName- String package name to be excluded.
-
excludeFromShareSheet
Branch.ShareLinkBuilder excludeFromShareSheet(@NonNull() List<String> packageNames)
Exclude items from the ShareSheet by package name List.
- Parameters:
packageNames- List package name to be excluded.
-
includeInShareSheet
Branch.ShareLinkBuilder includeInShareSheet(@NonNull() String packageName)
Include items from the ShareSheet by package name String. If only "com.Slack"is included, then only preferred sharing options + Slackwill be displayed, for example.
- Parameters:
packageName- String package name to be included.
-
includeInShareSheet
Branch.ShareLinkBuilder includeInShareSheet(@NonNull() Array<String> packageName)
Include items from the ShareSheet by package name Array. If only "com.Slack"is included, then only preferred sharing options + Slackwill be displayed, for example.
- Parameters:
packageName- String package name to be included.
-
includeInShareSheet
Branch.ShareLinkBuilder includeInShareSheet(@NonNull() List<String> packageNames)
Include items from the ShareSheet by package name List. If only "com.Slack"is included, then only preferred sharing options + Slackwill be displayed, for example.
- Parameters:
packageNames- List package name to be included.
-
-
-
-