项目架构
2018-04-26 14:12:53 15 举报
安卓项目架构
作者其他创作
大纲/内容
SDKEntry.pay(PayCallback...)
- SDK初始化- 登录- 921登录- 登出- 支付逻辑- 上传角色信息- 跳转用户中心- 是否已经登录- 处理支付Pay921回调
UserCenter
- RequestShowFloatView
LoginMethod.login(LoginDialog.LoginCallback...)
- SDK初始化- 支付- 获取传入状态回调
- SDK初始化 - 第三方登录- 第三方SDK支付逻辑
Init
- SDKEntry.initSdk(InitCallback...)
RequsetInit.requestInit(InitCallback...)——AdvertiseManager.active()InitCallback.onInitSuccess()/onInitFailed()
持有ActivitySdk状态回调
Pay
- SDKEntry.pay(PayCallback...)
AdvertisePaymentInfo.callPayment() ——
SDKCallback
- onInitCallback()- onLoginCallback()- onLogOutCallback()- onPayInitCallback()- onPayFinishCallback()- onUserCenterCallback()- onExiGameCallback()- onUploadInfoCallback()- onPayExtParamCallback()
new QuickLoginLayout(LoginDialog...)
Login
- SDKEntry.login(LoginCallback...)
SdkCallback.onInitCallback()
SDKEntry.login(LoginCallback...)
生命周期
初始化
PayWith921
PayWith921.requestInitPay(PayCallback...)——doPost(pay/ini) —— doPay(PayCallback...) ——
初始化Callback
登录Callback
- 调用SDK初始化- 传入生命周期
持有
LoginMethod
Pay921WithWebViewWindow
MD5.getMD5(payParam) ——loadPayUrl —— success —— resultSuccessCode —— MainActivity.onActivityResult ——SDKEntry.handleResult() ——
Advertise
- AdvertiseManager.advertiseInit()- AdvertiseManager.active()
支付Callback
BaseSDK
- mActivity- mSdkCallback
- SDKInit()- SDKLogin()- SDKLogout()- SDKPay()- SDKUserCenter()- SDKUploadInfo()- SDKExit()- getSdkCallback()- getActivity()- setSDKLogoutListener()- onStart()- onResume()- onCreate()- onPause()- onStop()- onDestroy()- onRestart()- onNewIntent()- onConfigurationChanged()- onActivityResult()
- 持有SDK实例- 持有SDK回调供外部使用- SDK初始化回调- 登录回调- 登出回调- 支付回调- 退出回调- 登录处理方法- 广告管理
ThirdSDK
- SDKInit()- SDKLogin()- SDKPay()
支付
RequsetInit
- requestInit(SdkCallback...) ==game_id+\
SDKEntry
- mBaseSDK- mSdkCallback- mInitCallback- mLoginCallback- mLogoutCallback- mPayCallback- mExitCallback- mActivity- mLoginMethod- mAdvertiseManager
- initSdk(InitCallback...)- login()- loginWith921()- logOut()- pay()- setSDKLogoutListener()- exitGame()- uploadUserInfo()- showUserCenter()- isLogined()- sdkOnCreate()- sdkOnStart()- sdkOnResume()- sdkOnPause()- sdkOnStop()- sdkOnDestroy()- sdkOnRestart()- sdkOnNewIntent ()- onConfigurationChanged()- handleResult()
SDKEntry.initSdk(InitCallback...)
- 初始化状态- 支付初始化状态- 支付完成状态- 退出游戏- 上传角色信息状态
QuickLoginLayout
QuickLoginLayout ——LoginMethod.login(LoginDialog.LoginCallback...) ——
登录
PayWith921.requestInitPay(PayCallback...)
RequsetInit.requestInit(SdkCallback...)
MainActivity
- SDKEntry.initSdk()- SDKEntry.sdkOnCreate()- onStart()- onResume()- onCreate()- onPause()- onStop()- onDestroy()- onRestart()- onNewIntent()- onConfigurationChanged()- onActivityResult()
SDKEntry.SDKCallback
InitCallback.onInitSuccess()/onInitFailed()
extends
- 登录- 登出- 处理ActivityResult回调
SdkCallback.onPayInitCallback()
BaseSDK.SDKInit()
0 条评论
下一页
为你推荐
查看更多