Commit 811afb2a authored by mengcuiguang's avatar mengcuiguang

添加一键登录

parent d90937f3
...@@ -11,8 +11,8 @@ android { ...@@ -11,8 +11,8 @@ android {
applicationId "com.mints.highgold" applicationId "com.mints.highgold"
minSdkVersion rootProject.ext.androidMinSdkVersion minSdkVersion rootProject.ext.androidMinSdkVersion
targetSdkVersion rootProject.ext.androidTargetSdkVersion targetSdkVersion rootProject.ext.androidTargetSdkVersion
versionCode 15 versionCode 16
versionName "1.1.4" versionName "1.1.5"
flavorDimensions "default" flavorDimensions "default"
// dex突破65535的限制 // dex突破65535的限制
...@@ -217,8 +217,9 @@ dependencies { ...@@ -217,8 +217,9 @@ dependencies {
implementation(name: 'open_ad_sdk', ext: 'aar') implementation(name: 'open_ad_sdk', ext: 'aar')
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.6' implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.6'
// 极光推送 // 极光推送
implementation 'cn.jiguang.sdk:jpush:3.0.9' implementation 'cn.jiguang.sdk:jpush:3.6.6'
implementation 'cn.jiguang.sdk:jcore:1.1.7' implementation 'cn.jiguang.sdk:jcore:2.3.8'
implementation 'cn.jiguang.sdk:jverification:2.6.4'
// 支付宝 SDK AAR 包所需的配置 // 支付宝 SDK AAR 包所需的配置
implementation(name: 'alipaySdk-15.7.4-20200228192319-noUtdid', ext: 'aar') implementation(name: 'alipaySdk-15.7.4-20200228192319-noUtdid', ext: 'aar')
// 广点通广告 腾讯 // 广点通广告 腾讯
......
...@@ -347,21 +347,21 @@ ...@@ -347,21 +347,21 @@
# ===================== 极光推送 START ================ # ===================== 极光推送 START ================
# -dontoptimize -keep class * extends cn.jpush.android.helpers.JPushMessageReceiver { *; }
# -dontpreverify
# # ===================== 极光一键登录 ================
# -dontwarn cn.jpush.** -dontoptimize
# -keep class cn.jpush.** { *; } -dontpreverify
# -keep class * extends cn.jpush.android.helpers.JPushMessageReceiver { *; } -dontwarn cn.jpush.**
# -keep class cn.jpush.** { *; }
# -dontwarn cn.jiguang.** -dontwarn cn.jiguang.**
# -keep class cn.jiguang.** { *; } -keep class cn.jiguang.** { *; }
# -dontwarn com.cmic.**
# -dontwarn com.google.** -keep class com.cmic.** { *; }
# -keep class com.google.gson.** {*;} -dontwarn com.unicom.**
# -keep class com.unicom.** { *; }
# -dontwarn com.google.** -dontwarn cn.com.chinatelecom.**
# -keep class com.google.protobuf.** {*;} -keep class cn.com.chinatelecom.** { *; }
# ======================= 极光推送 END ================ # ======================= 极光推送 END ================
......
...@@ -299,6 +299,32 @@ ...@@ -299,6 +299,32 @@
android:name="android.support.FILE_PROVIDER_PATHS" android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths" /> android:resource="@xml/provider_paths" />
</provider> </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> </application>
</manifest> </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; ...@@ -59,6 +59,8 @@ import com.yilan.sdk.ui.configs.YLUIConfig;
import java.util.Map; 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.BasicPushNotificationBuilder;
import cn.jpush.android.api.JPushInterface; import cn.jpush.android.api.JPushInterface;
import rx.Scheduler; import rx.Scheduler;
...@@ -231,10 +233,10 @@ public class MintsApplication extends MultiDexApplication { ...@@ -231,10 +233,10 @@ public class MintsApplication extends MultiDexApplication {
// 创神广告 // 创神广告
initChuangshen(); initChuangshen();
}
// 极光一键登录
initJLogin();
}
/** /**
* 移动安装联盟 获取OAID等设备标识符 * 移动安装联盟 获取OAID等设备标识符
...@@ -463,6 +465,20 @@ public class MintsApplication extends MultiDexApplication { ...@@ -463,6 +465,20 @@ public class MintsApplication extends MultiDexApplication {
.build()); .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退出 * app退出
*/ */
......
...@@ -1041,34 +1041,34 @@ public class VersusFragment extends BaseFragment ...@@ -1041,34 +1041,34 @@ public class VersusFragment extends BaseFragment
viewVersusWeixin.setVisibility(View.GONE); viewVersusWeixin.setVisibility(View.GONE);
} }
//绑定手机号 Complete 0-未完成 1-完成 2-领取 // //绑定手机号 Complete 0-未完成 1-完成 2-领取
int challengeMobileComplete = data.getChallenge_mobile_complete(); // int challengeMobileComplete = data.getChallenge_mobile_complete();
if (challengeMobileComplete == 0) { // if (challengeMobileComplete == 0) {
llVersusMobile.setVisibility(View.VISIBLE); // llVersusMobile.setVisibility(View.VISIBLE);
viewVersusMobile.setVisibility(View.VISIBLE); // viewVersusMobile.setVisibility(View.VISIBLE);
tvVersusMobileGold.setText("+" + data.getChallenge_mobile_coin()); // tvVersusMobileGold.setText("+" + data.getChallenge_mobile_coin());
// if (!userManager.userIsLogin()) {
// tvVersusMobile.setText("去完成");
// tvVersusMobile.setBackground(getResources().getDrawable(R.drawable.shape_main_water));
// //
// } else { //// if (!userManager.userIsLogin()) {
// tvVersusMobile.setText("立即领取"); //// tvVersusMobile.setText("去完成");
// tvVersusMobile.setBackground(getResources().getDrawable(R.drawable.shape_tv_gold)); //// tvVersusMobile.setBackground(getResources().getDrawable(R.drawable.shape_main_water));
// ////
// } //// } else {
tvVersusMobile.setText("去完成"); //// tvVersusMobile.setText("立即领取");
tvVersusMobile.setBackground(getResources().getDrawable(R.drawable.shape_main_water)); //// tvVersusMobile.setBackground(getResources().getDrawable(R.drawable.shape_tv_gold));
} else if (challengeMobileComplete == 1) { ////
llVersusMobile.setVisibility(View.VISIBLE); //// }
viewVersusMobile.setVisibility(View.VISIBLE); // tvVersusMobile.setText("去完成");
tvVersusMobileGold.setText("+" + data.getChallenge_mobile_coin()); // tvVersusMobile.setBackground(getResources().getDrawable(R.drawable.shape_main_water));
tvVersusMobile.setText("立即领取"); // } else if (challengeMobileComplete == 1) {
tvVersusMobile.setBackground(getResources().getDrawable(R.drawable.shape_tv_gold)); // llVersusMobile.setVisibility(View.VISIBLE);
} else { // viewVersusMobile.setVisibility(View.VISIBLE);
llVersusMobile.setVisibility(View.GONE); // tvVersusMobileGold.setText("+" + data.getChallenge_mobile_coin());
viewVersusMobile.setVisibility(View.GONE); // tvVersusMobile.setText("立即领取");
} // tvVersusMobile.setBackground(getResources().getDrawable(R.drawable.shape_tv_gold));
// } else {
// llVersusMobile.setVisibility(View.GONE);
// viewVersusMobile.setVisibility(View.GONE);
// }
//首次提现 Complete 0-未完成 1-完成 2-领取 //首次提现 Complete 0-未完成 1-完成 2-领取
......
...@@ -38,6 +38,19 @@ ...@@ -38,6 +38,19 @@
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="14sp" /> 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 <TextView
android:id="@+id/tv_mobile_login" android:id="@+id/tv_mobile_login"
android:layout_width="match_parent" android:layout_width="match_parent"
......
...@@ -119,4 +119,5 @@ ...@@ -119,4 +119,5 @@
<item name="android:textColor">#cb4a39</item> <item name="android:textColor">#cb4a39</item>
<item name="android:fontFamily">sans-serif-condensed</item> <item name="android:fontFamily">sans-serif-condensed</item>
</style> </style>
</resources> </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