Commit 811afb2a authored by mengcuiguang's avatar mengcuiguang

添加一键登录

parent d90937f3
......@@ -11,8 +11,8 @@ android {
applicationId "com.mints.highgold"
minSdkVersion rootProject.ext.androidMinSdkVersion
targetSdkVersion rootProject.ext.androidTargetSdkVersion
versionCode 15
versionName "1.1.4"
versionCode 16
versionName "1.1.5"
flavorDimensions "default"
// dex突破65535的限制
......@@ -217,8 +217,9 @@ dependencies {
implementation(name: 'open_ad_sdk', ext: 'aar')
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.6'
// 极光推送
implementation 'cn.jiguang.sdk:jpush:3.0.9'
implementation 'cn.jiguang.sdk:jcore:1.1.7'
implementation 'cn.jiguang.sdk:jpush:3.6.6'
implementation 'cn.jiguang.sdk:jcore:2.3.8'
implementation 'cn.jiguang.sdk:jverification:2.6.4'
// 支付宝 SDK AAR 包所需的配置
implementation(name: 'alipaySdk-15.7.4-20200228192319-noUtdid', ext: 'aar')
// 广点通广告 腾讯
......
......@@ -347,21 +347,21 @@
# ===================== 极光推送 START ================
# -dontoptimize
# -dontpreverify
#
# -dontwarn cn.jpush.**
# -keep class cn.jpush.** { *; }
# -keep class * extends cn.jpush.android.helpers.JPushMessageReceiver { *; }
#
# -dontwarn cn.jiguang.**
# -keep class cn.jiguang.** { *; }
#
# -dontwarn com.google.**
# -keep class com.google.gson.** {*;}
#
# -dontwarn com.google.**
# -keep class com.google.protobuf.** {*;}
-keep class * extends cn.jpush.android.helpers.JPushMessageReceiver { *; }
# ===================== 极光一键登录 ================
-dontoptimize
-dontpreverify
-dontwarn cn.jpush.**
-keep class cn.jpush.** { *; }
-dontwarn cn.jiguang.**
-keep class cn.jiguang.** { *; }
-dontwarn com.cmic.**
-keep class com.cmic.** { *; }
-dontwarn com.unicom.**
-keep class com.unicom.** { *; }
-dontwarn cn.com.chinatelecom.**
-keep class cn.com.chinatelecom.** { *; }
# ======================= 极光推送 END ================
......
......@@ -299,6 +299,32 @@
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths" />
</provider>
<!-- 极光一键登录 -->
<!-- since 2.0.0 optional 可选项,使用一键登录功能必须添加 -->
<!-- since 2.1.1 optional 可选项,通过screenOrientation设置授权页面横竖屏展示 -->
<activity
android:name="com.cmic.sso.sdk.activity.OAuthActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:launchMode="singleTop">
</activity>
<!-- since 2.0.0 optional 可选项,使用一键登录功能必须添加 -->
<!-- since 2.1.1 optional 可选项,通过screenOrientation设置授权页面横竖屏展示 -->
<activity
android:name="com.cmic.sso.sdk.activity.LoginAuthActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:launchMode="singleTop">
</activity>
<!-- since 2.0.0 optional 可选项,使用一键登录功能必须添加 -->
<!-- since 2.1.1 optional 可选项,通过screenOrientation设置授权页面横竖屏展示 -->
<activity android:name="cn.jiguang.verifysdk.CtLoginActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:launchMode="singleTop">
</activity>
<!-- Required -->
<meta-data android:name="JPUSH_APPKEY" android:value="${JPUSH_APPKEY}"/>
<meta-data android:name="JPUSH_CHANNEL" android:value="${JPUSH_CHANNEL}"/>
</application>
</manifest>
\ No newline at end of file
#统计平台
PRODUCE_STATISTICAL=https://daily.m.zzx9.cn
#取号平台
PRODUCE_DZH=https://auth.wosms.cn
......@@ -59,6 +59,8 @@ import com.yilan.sdk.ui.configs.YLUIConfig;
import java.util.Map;
import cn.jiguang.verifysdk.api.JVerificationInterface;
import cn.jiguang.verifysdk.api.RequestCallback;
import cn.jpush.android.api.BasicPushNotificationBuilder;
import cn.jpush.android.api.JPushInterface;
import rx.Scheduler;
......@@ -231,10 +233,10 @@ public class MintsApplication extends MultiDexApplication {
// 创神广告
initChuangshen();
}
// 极光一键登录
initJLogin();
}
/**
* 移动安装联盟 获取OAID等设备标识符
......@@ -463,6 +465,20 @@ public class MintsApplication extends MultiDexApplication {
.build());
}
/**
* 极光一键登录
*/
private void initJLogin() {
JVerificationInterface.setDebugMode(true);
final long start = System.currentTimeMillis();
JVerificationInterface.init(this, new RequestCallback<String>() {
@Override
public void onResult(int code, String result) {
LogUtil.d(TAG, "[init] code = " + code + " result = " + result + " consists = " + (System.currentTimeMillis() - start));
}
});
}
/**
* app退出
*/
......
......@@ -1041,34 +1041,34 @@ public class VersusFragment extends BaseFragment
viewVersusWeixin.setVisibility(View.GONE);
}
//绑定手机号 Complete 0-未完成 1-完成 2-领取
int challengeMobileComplete = data.getChallenge_mobile_complete();
if (challengeMobileComplete == 0) {
llVersusMobile.setVisibility(View.VISIBLE);
viewVersusMobile.setVisibility(View.VISIBLE);
tvVersusMobileGold.setText("+" + data.getChallenge_mobile_coin());
// if (!userManager.userIsLogin()) {
// //绑定手机号 Complete 0-未完成 1-完成 2-领取
// int challengeMobileComplete = data.getChallenge_mobile_complete();
// if (challengeMobileComplete == 0) {
// llVersusMobile.setVisibility(View.VISIBLE);
// viewVersusMobile.setVisibility(View.VISIBLE);
// tvVersusMobileGold.setText("+" + data.getChallenge_mobile_coin());
//
//// if (!userManager.userIsLogin()) {
//// tvVersusMobile.setText("去完成");
//// tvVersusMobile.setBackground(getResources().getDrawable(R.drawable.shape_main_water));
////
//// } else {
//// tvVersusMobile.setText("立即领取");
//// tvVersusMobile.setBackground(getResources().getDrawable(R.drawable.shape_tv_gold));
////
//// }
// tvVersusMobile.setText("去完成");
// tvVersusMobile.setBackground(getResources().getDrawable(R.drawable.shape_main_water));
//
// } else {
// } else if (challengeMobileComplete == 1) {
// llVersusMobile.setVisibility(View.VISIBLE);
// viewVersusMobile.setVisibility(View.VISIBLE);
// tvVersusMobileGold.setText("+" + data.getChallenge_mobile_coin());
// tvVersusMobile.setText("立即领取");
// tvVersusMobile.setBackground(getResources().getDrawable(R.drawable.shape_tv_gold));
//
// } else {
// llVersusMobile.setVisibility(View.GONE);
// viewVersusMobile.setVisibility(View.GONE);
// }
tvVersusMobile.setText("去完成");
tvVersusMobile.setBackground(getResources().getDrawable(R.drawable.shape_main_water));
} else if (challengeMobileComplete == 1) {
llVersusMobile.setVisibility(View.VISIBLE);
viewVersusMobile.setVisibility(View.VISIBLE);
tvVersusMobileGold.setText("+" + data.getChallenge_mobile_coin());
tvVersusMobile.setText("立即领取");
tvVersusMobile.setBackground(getResources().getDrawable(R.drawable.shape_tv_gold));
} else {
llVersusMobile.setVisibility(View.GONE);
viewVersusMobile.setVisibility(View.GONE);
}
//首次提现 Complete 0-未完成 1-完成 2-领取
......
......@@ -38,6 +38,19 @@
android:textColor="@color/white"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_jpush_login"
android:layout_width="match_parent"
android:layout_height="86pt"
android:layout_marginLeft="70pt"
android:layout_marginTop="30pt"
android:layout_marginRight="70pt"
android:background="@drawable/rb_index_selected"
android:gravity="center"
android:text="一键登录"
android:textColor="@color/main_mints"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_mobile_login"
android:layout_width="match_parent"
......
......@@ -119,4 +119,5 @@
<item name="android:textColor">#cb4a39</item>
<item name="android:fontFamily">sans-serif-condensed</item>
</style>
</resources>
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