Commit 7bd18f12 by 万齐军

user模块暴露一键登录检查环境的方法

parent cc8b1ca2
...@@ -116,6 +116,8 @@ interface IUserService : IProvider { ...@@ -116,6 +116,8 @@ interface IUserService : IProvider {
* */ * */
fun loginByOneKeyLogin(context: Context, isOpenDialog: Boolean) :Boolean fun loginByOneKeyLogin(context: Context, isOpenDialog: Boolean) :Boolean
fun checkOneLoginEnvAvailable(): Boolean
/** /**
* 调用优先使用一键登录,并返回调用时的登录状态, * 调用优先使用一键登录,并返回调用时的登录状态,
* @param isOpenDialog true:一键登录使用弹窗展示 false:一键登录使用全屏模式 * @param isOpenDialog true:一键登录使用弹窗展示 false:一键登录使用全屏模式
......
...@@ -21,7 +21,6 @@ import android.widget.TextView ...@@ -21,7 +21,6 @@ import android.widget.TextView
import com.alibaba.android.arouter.facade.annotation.Route import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter import com.alibaba.android.arouter.launcher.ARouter
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
import com.mobile.auth.gatewayauth.PhoneNumberAuthHelper
import com.tbruyelle.rxpermissions2.RxPermissions import com.tbruyelle.rxpermissions2.RxPermissions
import com.tencent.qcloud.tuicore.calling.trtccalling.model.TRTCCalling import com.tencent.qcloud.tuicore.calling.trtccalling.model.TRTCCalling
import com.tencent.qcloud.tuicore.calling.videocall.Constant import com.tencent.qcloud.tuicore.calling.videocall.Constant
...@@ -56,7 +55,6 @@ import com.yidianling.tests.home.NewTestHomeActivity ...@@ -56,7 +55,6 @@ import com.yidianling.tests.home.NewTestHomeActivity
import com.yidianling.user.api.service.IUserService import com.yidianling.user.api.service.IUserService
import com.yidianling.user.ui.collect.CollectSexAndBirthActivity import com.yidianling.user.ui.collect.CollectSexAndBirthActivity
import com.yidianling.user.ui.login.OneKeyLoginHelp import com.yidianling.user.ui.login.OneKeyLoginHelp
import com.yidianling.user.widget.SecretDescriptionDialog
import com.yidianling.user.widget.SecretDialog import com.yidianling.user.widget.SecretDialog
import com.yidianling.user.widget.SecretDialog.OnSecretDialogListener import com.yidianling.user.widget.SecretDialog.OnSecretDialogListener
import de.greenrobot.event.EventBus import de.greenrobot.event.EventBus
...@@ -120,7 +118,7 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>( ...@@ -120,7 +118,7 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
OneKeyLoginHelp.sdkInit( OneKeyLoginHelp.sdkInit(
this, this,
OneKeyLoginHelp.YDL_USER_APP, OneKeyLoginHelp.YDL_USER_APP,
PhoneNumberAuthHelper.SERVICE_TYPE_LOGIN 2
) )
bindService() bindService()
......
...@@ -4,8 +4,8 @@ import android.annotation.SuppressLint ...@@ -4,8 +4,8 @@ import android.annotation.SuppressLint
import android.app.Activity import android.app.Activity
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
import androidx.fragment.app.Fragment
import android.text.TextUtils import android.text.TextUtils
import androidx.fragment.app.Fragment
import com.alibaba.android.arouter.facade.annotation.Route import com.alibaba.android.arouter.facade.annotation.Route
import com.ydl.ydlcommon.base.BaseApp import com.ydl.ydlcommon.base.BaseApp
import com.ydl.ydlcommon.bean.VersionData import com.ydl.ydlcommon.bean.VersionData
...@@ -319,6 +319,10 @@ public class UserServiceImp : IUserService { ...@@ -319,6 +319,10 @@ public class UserServiceImp : IUserService {
return OneKeyLoginHelp.startLoginByStatus(context,isOpenDialog) return OneKeyLoginHelp.startLoginByStatus(context,isOpenDialog)
} }
override fun checkOneLoginEnvAvailable(): Boolean {
return OneKeyLoginHelp.mPhoneNumberAuthHelper!!.checkEnvAvailable()
}
override fun loginByOneKeyLoginCallBack( override fun loginByOneKeyLoginCallBack(
context: Context, context: Context,
isOpenDialog: Boolean, isOpenDialog: Boolean,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment