lmw
2025-01-10 601f14db94013373df700e007095f7f2f5ecbe24
app/src/main/java/com/sinata/xqmuse/ui/SplashActivity.kt
@@ -23,6 +23,7 @@
import com.sinata.xqmuse.network.request
import com.sinata.xqmuse.ui.guide.GuideActivity
import com.sinata.xqmuse.utils.Const
import com.umeng.commonsdk.UMConfigure
import kotlinx.android.synthetic.main.activity_splash.*
import org.jetbrains.anko.startActivity
import java.io.ByteArrayInputStream
@@ -48,19 +49,19 @@
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_splash)
        getImg()
//        val data = intent.data
//        if (data!=null){
//            val url = data.toString()
//            Log.e("mmp","路径:${url}")
//            if (url.startsWith("jkfitness://jkcyl.cn?code=")){
        val data = intent.data
        if (data!=null){
            val url = data.toString()
            Log.e("mmp","路径:${url}")
//            if (url.startsWith("xqmuse://xqmuse.cn?mid=")){ //何健豪:不做跳转详情
//                code = url.substring(url.indexOf("=")+1)
//                Log.e("mmp","解析参数:code=${code}")
//                Log.e("mmp","解析参数:音频id=${code}")
//            }
//        }
        AMapLocationClient.updatePrivacyShow(this,true,true)
        AMapLocationClient.updatePrivacyAgree(this,true)
        }
        AMapUtilCoreApi.setCollectInfoEnable(false)
        if (SPUtils.instance().getBoolean(Const.User.IS_AGREE)){
            AMapLocationClient.updatePrivacyShow(this,true,true)
            AMapLocationClient.updatePrivacyAgree(this,true)
            startNext()
        }else{
            getAgreement()
@@ -88,9 +89,11 @@
            userRuleDialog.arguments = bundleOf("privacy" to privacy, "user" to user)
            userRuleDialog.setDismissCallback(object : UserRuleDialog.OnDismiss {
                override fun onDismiss() {
                    if (!SPUtils.instance().getBoolean(Const.User.IS_AGREE, false))
                    if (!SPUtils.instance().getBoolean(Const.User.IS_AGREE, false)){
                        finish()
                    else
                        AMapLocationClient.updatePrivacyShow(this@SplashActivity,true,true)
                        AMapLocationClient.updatePrivacyAgree(this@SplashActivity,true)
                    } else
                        startNext()
                }
            })
@@ -150,6 +153,7 @@
     * 判断是否第一次启动
     */
    private fun startNext(){
        UMConfigure.preInit(this,  Const.UMENG_KEY, "")
        (application as JkApplication).initSdk()
        if (SPUtils.instance().getBoolean(Const.FIRST_LAUNCH,true)){ //第一次启动显示引导页
            SPUtils.instance().put(Const.FIRST_LAUNCH,false).apply()