public class JSShareFragment extends DirectShareUIFragment
DirectShareUIFragment.FromType
SnsBaseFragment.ISNSAskPublishCallback, SnsBaseFragment.ISNSShareDirectCallback
BaseFra.TopType
限定符和类型 | 字段和说明 |
---|---|
static java.lang.String |
SIZE |
static int |
SMALL |
isHost, mClickedShare, mShareDataList, mShareMgr, mShareSource, mShareTo, mWatermarkMgr, URL_CAP_DEFAULT
SNS_DIRECT_TYPE_FACEBOOK, SNS_DIRECT_TYPE_TWITTER
act, DEFAULT_TYPE_FROME, isShow, mBaseHandler, mInitPresenter, mIsCheez, mLastClickTsMs, mRootView, mStartupController, TYPE_FROME_COIN, TYPE_FROME_FANS, TYPE_FROME_STAR
构造器和说明 |
---|
JSShareFragment() |
限定符和类型 | 方法和说明 |
---|---|
static java.lang.String |
getContent()
为BaseShareModule提供分享文案
|
int |
getShareScenes() |
int |
getSourceFrom() |
com.app.live.activity.VideoDataInfo |
getVideoInfo() |
int |
getVidType() |
void |
initialShareData()
由于分享个数可以由JS来动态配置,此处选择性覆盖DirectShareUIFragment的initialShareData()方法来动态配置
|
void |
onActivityResult(int requestCode,
int resultCode,
android.content.Intent data) |
void |
onCreate(android.os.Bundle savedInstanceState) |
android.view.View |
onCreateView(android.view.LayoutInflater inflater,
android.view.ViewGroup container,
android.os.Bundle savedInstanceState) |
void |
onDestroy() |
void |
onResult(boolean success,
int type)
复写此方法,覆盖父类中的逻辑,上报分享到Facebook或者Twitter成功
|
void |
onResume() |
void |
onShareSuccess(int type)
复写此方法,不使用父类的埋点上报等逻辑,这里用来回调JS的分享成功通知
这个方法只要点击就会调用,用来上报除Facebook和twitter以外的分享
|
void |
onViewCreated(android.view.View view,
android.os.Bundle savedInstanceState) |
boolean |
parseJSParam(java.lang.String jsonStr)
解析JS传递过来的分享参数,格式如下:
{
"shareTypes":"1,2,3,4,5", //分享类型,0显示全部
"url":"http://www.live.me", //分享内容
"content":"分享内容", //分享内容
"image":"http://www.liveme.com/images/logo.jpg", //分享图片url
"subject":"主题", //iOS邮件分享主题,Android不使用
"callback":"methodName" //分享回调
}
|
void |
setH5Url(java.lang.String url)
所在H5页面的url地址
|
void |
show(java.lang.Boolean isShow) |
void |
showLoading(boolean show) |
void |
showShareTaskReward(boolean show)
复写此方法,清除掉父类中的逻辑,这里不需要展现奖励等逻辑
|
dip2px, getmShareScenes, getmShareVidType, getShareDataList, getShortId, initShareView, initShareViewNew, initShareViewNoTitle, makeChildrenInvisible, onClick, onRequestPermissionsResult, setEatGameScore, setmShareScenes, setmShareVidType, setShareSource, setShortId, shareInsProgress, shareInsWatermarkFailed, showShareInsProgress
finish, generateNetworkLiveData, getDescription, getHttpMsgTag, getInitOnceLoginOrNotRunnable, getInitOnceMustLoginRunnable, getInitRepeatLoginOrNotRunnable, getInitRepeatMustLoginRunnable, getThreadInfo, hasNetRequest, hideLoading, initPresenter, isAccountLogin, isActivityAlive, isCancelHttpMsgWhenPageDestroy, isFinish2, isShow, isShowVipBanner, isTwooProduct, isViewTokenValid, isVisitorMode, onAttach, onInitNotImportantCode, onNetRequestEnd, onNetRequestStart, onShareClickForMatch, onStartupCompleted, runOnUiThread, runOnUiThreadDelay, setUserVisibleHint, showLoading, showLoading, showLoading
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getDefaultViewModelProviderFactory, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLayoutInflater, getLayoutInflater, getLifecycle, getLoaderManager, getParentFragment, getParentFragmentManager, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSavedStateRegistry, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, getViewLifecycleOwner, getViewLifecycleOwnerLiveData, getViewModelStore, hashCode, hasOptionsMenu, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isStateSaved, isVisible, onActivityCreated, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroyOptionsMenu, onDestroyView, onDetach, onGetLayoutInflater, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onPrimaryNavigationFragmentChanged, onSaveInstanceState, onStart, onStop, onViewStateRestored, postponeEnterTransition, postponeEnterTransition, registerForContextMenu, requestPermissions, requireActivity, requireArguments, requireContext, requireFragmentManager, requireHost, requireParentFragment, requireView, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu
public void onCreate(@Nullable android.os.Bundle savedInstanceState)
onCreate
在类中 DirectShareUIFragment
public void onActivityResult(int requestCode, int resultCode, android.content.Intent data)
onActivityResult
在类中 SnsBaseFragment
public com.app.live.activity.VideoDataInfo getVideoInfo()
getVideoInfo
在类中 DirectShareUIFragment
@Nullable public android.view.View onCreateView(android.view.LayoutInflater inflater, @Nullable android.view.ViewGroup container, @Nullable android.os.Bundle savedInstanceState)
onCreateView
在类中 androidx.fragment.app.Fragment
public void onViewCreated(android.view.View view, @Nullable android.os.Bundle savedInstanceState)
onViewCreated
在类中 BaseFra
public void onResume()
onResume
在类中 androidx.fragment.app.Fragment
public void onDestroy()
onDestroy
在类中 DirectShareUIFragment
public void onShareSuccess(int type)
onShareSuccess
在类中 DirectShareUIFragment
type
- 分享类型public void onResult(boolean success, int type)
onResult
在接口中 BaseShareModule.IShareResult
onResult
在类中 DirectShareUIFragment
success
- type
- public void showShareTaskReward(boolean show)
showShareTaskReward
在类中 DirectShareUIFragment
show
- public int getSourceFrom()
getSourceFrom
在类中 SnsBaseFragment
public void show(java.lang.Boolean isShow)
show
在类中 DirectShareUIFragment
public void showLoading(boolean show)
showLoading
在类中 DirectShareUIFragment
public static java.lang.String getContent()
public boolean parseJSParam(java.lang.String jsonStr)
jsonStr
- public void initialShareData()
public int getShareScenes()
getShareScenes
在类中 DirectShareUIFragment
public int getVidType()
getVidType
在类中 DirectShareUIFragment
public void setH5Url(java.lang.String url)
url
-