public Dialog shareLink ( Branch . ShareLinkBuilder builder ) { builder_ = builder ; context_ = builder . getActivity ( ) ; callback_ = builder . getCallback ( ) ; channelPropertiesCallback_ = builder . getChannelPropertiesCallback ( ) ; shareLinkIntent_ = new Intent ( Intent . ACTION_SEND ) ; shareLinkIntent_ . setType ( "text/plain" ) ; shareDialogThemeID_ = builder . getStyleResourceID ( ) ; includeInShareSheet = builder . getIncludedInShareSheet ( ) ; excludeFromShareSheet = builder . getExcludedFromShareSheet ( ) ; iconSize_ = builder . getIconSize ( ) ; try { createShareDialog ( builder . getPreferredOptions ( ) ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; if ( callback_ != null ) { callback_ . onLinkShareResponse ( null , null , new BranchError ( "Trouble sharing link" , BranchError . ERR_BRANCH_NO_SHARE_OPTION ) ) ; } else { PrefHelper . Debug ( "Unable create share options. Couldn't find applications on device to share the link." ) ; } } return shareDlg_ ; }
Creates an application selector and shares a link on user selecting the application .