初始化代码
1
app/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/build
|
||||
121
app/build.gradle
Normal file
@@ -0,0 +1,121 @@
|
||||
plugins {
|
||||
alias(libs.plugins.android.application)
|
||||
alias(libs.plugins.kotlin.android)
|
||||
}
|
||||
|
||||
android {
|
||||
namespace 'com.qxcm.qxlive'
|
||||
compileSdk 35
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.qxcm.qxlive"
|
||||
minSdk 24
|
||||
targetSdk 35
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
}
|
||||
signingConfigs {
|
||||
|
||||
debug {
|
||||
storeFile file("my-release-key.jks")
|
||||
storePassword "123456"
|
||||
keyAlias "mykey"
|
||||
keyPassword "123456"
|
||||
}
|
||||
|
||||
release {
|
||||
storeFile file("my-release-key.jks")
|
||||
storePassword "123456"
|
||||
keyAlias "mykey"
|
||||
keyPassword "123456"
|
||||
}
|
||||
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled true
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
signingConfig signingConfigs.release
|
||||
|
||||
applicationVariants.all { variant ->
|
||||
if (variant.buildType.name == 'release') {
|
||||
variant.outputs.each { output ->
|
||||
def outputFile = output.outputFile
|
||||
if (outputFile != null && outputFile.name.endsWith('.apk')) {
|
||||
def versionName = variant.versionName
|
||||
def versionCode = variant.versionCode
|
||||
def fileName = "羽声_${versionName}_${versionCode}.apk"
|
||||
output.outputFileName = fileName
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
debug {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
signingConfig signingConfigs.debug
|
||||
|
||||
applicationVariants.all { variant ->
|
||||
if (variant.buildType.name == 'debug') {
|
||||
variant.outputs.each { output ->
|
||||
def outputFile = output.outputFile
|
||||
if (outputFile != null && outputFile.name.endsWith('.apk')) {
|
||||
def versionName = variant.versionName
|
||||
def versionCode = variant.versionCode
|
||||
def fileName = "app-debug-sr_${versionName}_${versionCode}.apk"
|
||||
output.outputFileName = fileName
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
}
|
||||
buildFeatures {
|
||||
dataBinding true
|
||||
}
|
||||
dataBinding {
|
||||
enabled = true
|
||||
}
|
||||
packagingOptions {
|
||||
exclude 'META-INF/gradle/incremental.annotation.processors'
|
||||
exclude 'META-INF/LICENSE.txt'
|
||||
exclude 'META-INF/NOTICE.txt'
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = '11'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar','*.aar'])
|
||||
|
||||
implementation libs.appcompat
|
||||
implementation libs.material
|
||||
implementation libs.activity
|
||||
implementation libs.constraintlayout
|
||||
implementation project(':modulemain')
|
||||
testImplementation libs.junit
|
||||
androidTestImplementation libs.ext.junit
|
||||
androidTestImplementation libs.espresso.core
|
||||
|
||||
api project(":moduleUtil")
|
||||
api project(":moduleLogin")
|
||||
|
||||
implementation files('libs/auth_number_product-2.14.7-log-online-standard-cuum-release.aar')
|
||||
implementation files('libs/logger-2.2.2-release.aar')
|
||||
implementation files('libs/main-2.2.3-release.aar')
|
||||
|
||||
|
||||
}
|
||||
BIN
app/libs/logger-2.2.2-release.aar
Normal file
BIN
app/libs/main-2.2.3-release.aar
Normal file
BIN
app/my-release-key.jks
Normal file
768
app/proguard-rules.pro
vendored
Normal file
@@ -0,0 +1,768 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# By default, the flags in this file are appended to flags specified
|
||||
# in E:\work\android_sdk\android-sdk-windows/tools/proguard/proguard-android.txt
|
||||
# You can edit the include path and order by changing the proguardFiles
|
||||
# directive in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# Add any project specific keep options here:
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
|
||||
-keep class com.mob.**{*;}
|
||||
-keep class cn.smssdk.**{*;}
|
||||
-dontwarn com.mob.**
|
||||
-dontwarn cn.smssdk.**
|
||||
|
||||
|
||||
-ignorewarnings
|
||||
-keep class javax.ws.rs.** { *; }
|
||||
-dontwarn com.alibaba.fastjson.**
|
||||
-keep class com.alibaba.fastjson.** { *; }
|
||||
|
||||
#环信
|
||||
-keep class org.xmlpull.** {*;}
|
||||
-keep class com.hyphenate.** {*;}
|
||||
-keep class com.hyphenate.chat.** {*;}
|
||||
-dontwarn com.hyphenate.**
|
||||
-keep class org.jivesoftware.** {*;}
|
||||
-keep class org.apache.** {*;}
|
||||
#2.0.9后加入语音通话功能,如需使用此功能的api,加入以下keep
|
||||
-keep class net.java.sip.** {*;}
|
||||
-keep class org.webrtc.voiceengine.** {*;}
|
||||
-keep class org.bitlet.** {*;}
|
||||
-keep class org.slf4j.** {*;}
|
||||
-keep class ch.imvs.** {*;}
|
||||
-keep class com.superrtc.** { *; }
|
||||
|
||||
|
||||
#-------------- okhttp3 start-------------
|
||||
# OkHttp3
|
||||
# https://github.com/square/okhttp
|
||||
# okhttp
|
||||
-keep class com.squareup.okhttp.* { *; }
|
||||
-keep interface com.squareup.okhttp.** { *; }
|
||||
-dontwarn com.squareup.okhttp.**
|
||||
|
||||
# okhttp 3
|
||||
-keepattributes Signature
|
||||
-keepattributes *Annotation*
|
||||
-keep class okhttp3.** { *; }
|
||||
-keep interface okhttp3.** { *; }
|
||||
-dontwarn okhttp3.**
|
||||
|
||||
# Okio
|
||||
-dontwarn com.squareup.**
|
||||
-dontwarn okio.**
|
||||
-keep public class org.codehaus.* { *; }
|
||||
-keep public class java.nio.* { *; }
|
||||
#----------okhttp end--------------
|
||||
|
||||
|
||||
-keep class org.greenrobot.greendao.**{*;}
|
||||
-keepclassmembers class * extends org.greenrobot.greendao.AbstractDao {
|
||||
public static java.lang.String TABLENAME;
|
||||
}
|
||||
-keep class **$Properties
|
||||
|
||||
|
||||
|
||||
-dontwarn javax.annotation.**
|
||||
-dontwarn javax.inject.**
|
||||
# OkHttp3
|
||||
-dontwarn okhttp3.logging.**
|
||||
-keep class okhttp3.internal.**{*;}
|
||||
-dontwarn okio.**
|
||||
# Retrofit
|
||||
-dontwarn retrofit2.**
|
||||
-keep class retrofit2.** { *; }
|
||||
# RxJava RxAndroid
|
||||
-dontwarn sun.misc.**
|
||||
-keepclassmembers class rx.internal.util.unsafe.*ArrayQueue*Field* {
|
||||
long producerIndex;
|
||||
long consumerIndex;
|
||||
}
|
||||
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef {
|
||||
rx.internal.util.atomic.LinkedQueueNode producerNode;
|
||||
}
|
||||
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef {
|
||||
rx.internal.util.atomic.LinkedQueueNode consumerNode;
|
||||
}
|
||||
|
||||
# Gson
|
||||
-keep class com.google.gson.stream.** { *; }
|
||||
-keepattributes EnclosingMethod
|
||||
|
||||
|
||||
##Glide
|
||||
-dontwarn com.bumptech.glide.**
|
||||
-keep class com.bumptech.glide.**{*;}
|
||||
-keep public class * implements com.bumptech.glide.module.GlideModule
|
||||
-keep public class * extends com.bumptech.glide.AppGlideModule
|
||||
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
|
||||
**[] $VALUES;
|
||||
public *;
|
||||
}
|
||||
-keep class jp.wasabeef.glide.transformations.**
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
############ --------以下通用--------###########
|
||||
#指定代码的压缩级别
|
||||
-optimizationpasses 5
|
||||
|
||||
#包明不混合大小写
|
||||
|
||||
-dontusemixedcaseclassnames
|
||||
|
||||
#不去忽略非公共的库类
|
||||
|
||||
-dontskipnonpubliclibraryclasses
|
||||
|
||||
#优化 不优化输入的类文件
|
||||
|
||||
-dontoptimize
|
||||
|
||||
#预校验
|
||||
|
||||
-dontpreverify
|
||||
|
||||
#混淆时是否记录日志
|
||||
|
||||
-verbose
|
||||
|
||||
# 混淆时所采用的算法
|
||||
|
||||
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
|
||||
|
||||
# 保持哪些类不被混淆
|
||||
|
||||
-keep public class * extends android.app.Fragment
|
||||
|
||||
-keep public class * extends android.app.Activity
|
||||
|
||||
-keep public class * extends androidx.appcompat.app.AppCompatActivity
|
||||
|
||||
-keep public class * extends android.app.Application
|
||||
|
||||
-keep public class * extends android.app.Service
|
||||
|
||||
-keep public class * extends android.content.BroadcastReceiver
|
||||
|
||||
-keep public class * extends android.content.ContentProvider
|
||||
|
||||
-keep public class * extends android.app.backup.BackupAgentHelper
|
||||
|
||||
-keep public class * extends android.preference.Preference
|
||||
|
||||
-keep public class com.android.vending.licensing.ILicensingService
|
||||
|
||||
#如果有引用v4包可以添加下面这行
|
||||
|
||||
-keep public class * extends androidx.fragment.app.Fragment
|
||||
|
||||
|
||||
#忽略警告
|
||||
|
||||
-ignorewarnings
|
||||
|
||||
##记录生成的日志数据,gradle build时在本项目根目录输出##
|
||||
|
||||
#apk 包内所有 class 的内部结构
|
||||
|
||||
#-dump proguard/class_files.txt
|
||||
|
||||
#未混淆的类和成员
|
||||
|
||||
-printseeds proguard/seeds.txt
|
||||
|
||||
#列出从 apk 中删除的代码
|
||||
|
||||
-printusage proguard/unused.txt
|
||||
|
||||
#混淆前后的映射
|
||||
|
||||
-printmapping proguard/mapping.txt
|
||||
|
||||
########记录生成的日志数据,gradle build时 在本项目根目录输出-end######
|
||||
|
||||
#如果引用了v4或者v7包
|
||||
|
||||
-dontwarn android.support.**
|
||||
|
||||
####混淆保护自己项目的部分代码以及引用的第三方jar包library-end####
|
||||
|
||||
#保持自定义控件类不被混淆
|
||||
|
||||
-keepclassmembers class * extends android.app.Activity
|
||||
|
||||
-keep public class * extends android.view.View
|
||||
|
||||
#保持 Parcelable 不被混淆
|
||||
|
||||
-keep class * implements android.os.Parcelable
|
||||
|
||||
#保持 Serializable 不被混淆
|
||||
|
||||
-keepnames class * implements java.io.Serializable
|
||||
|
||||
#保持 Serializable 不被混淆并且enum 类也不被混淆
|
||||
|
||||
-keepclassmembers class * implements java.io.Serializable
|
||||
|
||||
#保持枚举 enum 类不被混淆
|
||||
|
||||
#-keepclassmembers enum *
|
||||
|
||||
|
||||
|
||||
#不混淆资源类
|
||||
|
||||
-keepclassmembers class **.R$*
|
||||
|
||||
|
||||
# 针对android-support-v4.jar的解决方案androidx.fragment.app.Fragment
|
||||
|
||||
-dontwarn android.support.v4.**
|
||||
#
|
||||
-keep class android.support.v4.** { *; }
|
||||
#
|
||||
-keep interface android.support.v4.app.** { *; }
|
||||
#
|
||||
-keep public class * extends android.support.v4.**
|
||||
#
|
||||
-keep public class * extends android.app.Fragmen
|
||||
|
||||
#talkingdata START
|
||||
-dontwarn com.tendcloud.tenddata.**
|
||||
-keep class com.tendcloud.** {*;}
|
||||
-keep public class com.tendcloud.tenddata.** { public protected *;}
|
||||
-keepclassmembers class com.tendcloud.tenddata.**{
|
||||
public void *(***);
|
||||
}
|
||||
-keep class com.talkingdata.sdk.TalkingDataSDK {public *;}
|
||||
-keep class com.apptalkingdata.** {*;}
|
||||
#talkingdata END
|
||||
|
||||
#talkingdata 广告 START
|
||||
-keep class com.talkingdata.sdk.** {*;}
|
||||
-keep class com.tendcloud.** {*;}
|
||||
-keep public class com.tendcloud.** { public protected *;}
|
||||
#talkingdata END
|
||||
|
||||
-dontwarn com.cmic.sso.sdk.**
|
||||
-keep public class com.cmic.sso.sdk.**{*;}
|
||||
-keep class cn.com.chinatelecom.account.api.**{*;}
|
||||
-keep class com.netease.nis.quicklogin.entity.**{*;}
|
||||
-keep class com.netease.nis.quicklogin.listener.**{*;}
|
||||
-keep class com.netease.nis.quicklogin.QuickLogin{
|
||||
public <methods>;
|
||||
public <fields>;
|
||||
}
|
||||
-keep class com.netease.nis.quicklogin.helper.UnifyUiConfig{*;}
|
||||
-keep class com.netease.nis.quicklogin.helper.UnifyUiConfig$Builder{
|
||||
public <methods>;
|
||||
public <fields>;
|
||||
}
|
||||
-keep class com.netease.nis.quicklogin.utils.LoginUiHelper$CustomViewListener{
|
||||
public <methods>;
|
||||
public <fields>;
|
||||
}
|
||||
-dontwarn com.sdk.**
|
||||
-keep class com.sdk.** { *;}
|
||||
|
||||
#阿里云一键登录
|
||||
-keep class cn.com.chinatelecom.** {*;}
|
||||
-keep class com.unicom.xiaowo.login.** {*;}
|
||||
-keep class com.cmic.sso.sdk.** {*;}
|
||||
-keep class com.mobile.auth.** {*;}
|
||||
-keep class com.nirvana.** {*;}
|
||||
-keep class com.alibaba.fastjson.** {*;}
|
||||
-keepclasseswithmembernames class * {
|
||||
native <methods>;
|
||||
}
|
||||
-keepclassmembers class * {
|
||||
@android.support.annotation.Keep <fields>;
|
||||
@android.support.annotation.Keep <methods>;
|
||||
}
|
||||
-keep @android.support.annotation.Keep class * {*;}
|
||||
-dontwarn
|
||||
|
||||
# --- uc crash start ----(如果集成了UC crash收集组件需要增加这个配置)
|
||||
-keep class com.uc.crashsdk.** { *; }
|
||||
-keep interface com.uc.crashsdk.** { *; }
|
||||
# --- uc crash end ---
|
||||
-keepattributes Signature
|
||||
-keepattributes *Annotation*
|
||||
#阿里云一键登录 END
|
||||
|
||||
#阿里ARoute
|
||||
-keep public class com.alibaba.android.arouter.routes.**{*;}
|
||||
-keep public class com.alibaba.android.arouter.facade.**{*;}
|
||||
-keep class * implements com.alibaba.android.arouter.facade.template.ISyringe{*;}
|
||||
|
||||
# If you use the byType method to obtain Service, add the following rules to protect the interface:
|
||||
-keep interface * implements com.alibaba.android.arouter.facade.template.IProvider
|
||||
|
||||
# If single-type injection is used, that is, no interface is defined to implement IProvider, the following rules need to be added to protect the implementation
|
||||
# -keep class * implements com.alibaba.android.arouter.facade.template.IProvider
|
||||
#阿里ARoute END
|
||||
|
||||
#MobSDK
|
||||
-keep class com.mob.**{*;}
|
||||
|
||||
-dontwarn com.mob.**
|
||||
#MobSDK END
|
||||
|
||||
#ZEGO
|
||||
-keep class **.zego.**{*;}
|
||||
#ZEGO END
|
||||
|
||||
#不需混淆的Android类
|
||||
-keep public class * extends android.app.Fragment
|
||||
-keep public class * extends android.app.Activity
|
||||
-keep public class * extends android.app.Application
|
||||
-keep public class * extends android.app.Service
|
||||
-keep public class * extends android.content.BroadcastReceiver
|
||||
-keep public class * extends android.preference.Preference
|
||||
-keep public class * extends android.content.ContentProvider
|
||||
-keep public class * extends android.support.v4.**
|
||||
-keep public class * extends android.support.annotation.**
|
||||
-keep public class * extends android.support.v7.**
|
||||
-keep public class * extends android.app.backup.BackupAgentHelper
|
||||
-keep public class * extends android.preference.Preference
|
||||
-keep public class * extends android.view.View
|
||||
-keep public class com.android.vending.licensing.ILicensingService
|
||||
-keep class android.support.** {*;}
|
||||
|
||||
#support-v4包
|
||||
-dontwarn android.support.v4.**
|
||||
-keep class android.support.v4.app.** { *; }
|
||||
-keep interface android.support.v4.app.** { *; }
|
||||
-keep class android.support.v4.** { *; }
|
||||
|
||||
#support-v7包
|
||||
-dontwarn android.support.v7.**
|
||||
-keep class android.support.v7.internal.** { *; }
|
||||
-keep interface android.support.v7.internal.** { *; }
|
||||
-keep class android.support.v7.** { *; }
|
||||
|
||||
#support design
|
||||
-dontwarn android.support.design.**
|
||||
-keep class android.support.design.** { *; }
|
||||
-keep interface android.support.design.** { *; }
|
||||
-keep public class android.support.design.R$* { *; }
|
||||
|
||||
#避免混淆自定义控件类的 get/set 方法和构造函数
|
||||
-keep public class * extends android.view.View{
|
||||
*** get*();
|
||||
void set*(***);
|
||||
public <init>(android.content.Context);
|
||||
public <init>(android.content.Context, android.util.AttributeSet);
|
||||
public <init>(android.content.Context, android.util.AttributeSet, int);
|
||||
}
|
||||
|
||||
#关闭 Log日志
|
||||
-assumenosideeffects class android.util.Log {
|
||||
public static boolean isLoggable(java.lang.String, int);
|
||||
public static int v(...);
|
||||
public static int i(...);
|
||||
public static int w(...);
|
||||
public static int d(...);
|
||||
public static int e(...);
|
||||
}
|
||||
|
||||
#避免资源混淆
|
||||
-keep class **.R$* {*;}
|
||||
|
||||
#避免layout中onclick方法(android:onclick="onClick")混淆
|
||||
-keepclassmembers class * extends android.app.Activity{
|
||||
public void *(android.view.View);
|
||||
}
|
||||
|
||||
#避免回调函数 onXXEvent 混淆
|
||||
-keepclassmembers class * {
|
||||
void *(*Event);
|
||||
}
|
||||
|
||||
#避免混淆枚举类
|
||||
-keepclassmembers enum * {
|
||||
public static **[] values();
|
||||
public static ** valueOf(java.lang.String);
|
||||
}
|
||||
|
||||
#Natvie 方法不混淆
|
||||
-keepclasseswithmembernames class * {
|
||||
native <methods>;
|
||||
}
|
||||
|
||||
#避免Parcelable混淆
|
||||
-keep class * implements android.os.Parcelable {
|
||||
public static final android.os.Parcelable$Creator *;
|
||||
}
|
||||
|
||||
#避免Serializable接口的子类中指定的某些成员变量和方法混淆
|
||||
-keepclassmembers class * implements java.io.Serializable {
|
||||
static final long serialVersionUID;
|
||||
private static final java.io.ObjectStreamField[] serialPersistentFields;
|
||||
!static !transient <fields>;
|
||||
private void writeObject(java.io.ObjectOutputStream);
|
||||
private void readObject(java.io.ObjectInputStream);
|
||||
java.lang.Object writeReplace();
|
||||
java.lang.Object readResolve();
|
||||
}
|
||||
|
||||
#WebView混淆配置
|
||||
-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
public *;
|
||||
}
|
||||
-keepclassmembers class * extends android.webkit.webViewClient {
|
||||
public void *(android.webkit.WebView, java.lang.String, android.graphics.Bitmap);
|
||||
public boolean *(android.webkit.WebView, java.lang.String);
|
||||
}
|
||||
-keepclassmembers class * extends android.webkit.webViewClient {
|
||||
public void *(android.webkit.webView, jav.lang.String);
|
||||
}
|
||||
|
||||
#ButterKnife混淆配置
|
||||
-keep class butterknife.** { *; }
|
||||
-dontwarn butterknife.internal.**
|
||||
-keep class **$$ViewBinder { *; }
|
||||
-keepclasseswithmembernames class * {
|
||||
@butterknife.* <fields>;
|
||||
}
|
||||
-keepclasseswithmembernames class * {
|
||||
@butterknife.* <methods>;
|
||||
}
|
||||
|
||||
#OkHttp3混淆配置
|
||||
-dontwarn com.squareup.okhttp3.**
|
||||
-keep class com.squareup.okhttp3.** { *;}
|
||||
-dontwarn okio.**
|
||||
|
||||
#Retrofit2混淆配置
|
||||
-dontwarn retrofit2.**
|
||||
-keep class retrofit2.** { *; }
|
||||
-keepattributes Signature
|
||||
-keepattributes Exceptions
|
||||
|
||||
#RxJava、RxAndroid混淆配置
|
||||
-dontwarn sun.misc.**
|
||||
-keepclassmembers class rx.internal.util.unsafe.*ArrayQueue*Field* {
|
||||
long producerIndex;
|
||||
long consumerIndex;
|
||||
}
|
||||
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef {
|
||||
rx.internal.util.atomic.LinkedQueueNode producerNode;
|
||||
}
|
||||
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef {
|
||||
rx.internal.util.atomic.LinkedQueueNode consumerNode;
|
||||
}
|
||||
|
||||
#Glide混淆配置
|
||||
#Glide 3
|
||||
-keep public class * implements com.bumptech.glide.module.GlideModule
|
||||
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
|
||||
**[] $VALUES;
|
||||
public *;
|
||||
}
|
||||
|
||||
#Glide 4
|
||||
-keep public class * implements com.bumptech.glide.module.AppGlideModule
|
||||
-keep public class * implements com.bumptech.glide.module.LibraryGlideModule
|
||||
-keep public enum com.bumptech.glide.load.ImageHeaderParser$** {
|
||||
**[] $VALUES;
|
||||
public *;
|
||||
}
|
||||
|
||||
#Picasso混淆配置
|
||||
-keep class com.parse.*{ *; }
|
||||
-dontwarn com.parse.**
|
||||
-dontwarn com.squareup.picasso.**
|
||||
-keepclasseswithmembernames class * {
|
||||
native <methods>;
|
||||
}
|
||||
|
||||
#Fresco混淆配置
|
||||
# Keep our interfaces so they can be used by other ProGuard rules.
|
||||
# See http://sourceforge.net/p/proguard/bugs/466/
|
||||
-keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip
|
||||
-keep,allowobfuscation @interface com.facebook.soloader.DoNotOptimize
|
||||
|
||||
# Do not strip any method/class that is annotated with @DoNotStrip
|
||||
-keep @com.facebook.common.internal.DoNotStrip class *
|
||||
-keepclassmembers class * {
|
||||
@com.facebook.common.internal.DoNotStrip *;
|
||||
}
|
||||
|
||||
# Do not strip any method/class that is annotated with @DoNotOptimize
|
||||
-keep @com.facebook.soloader.DoNotOptimize class *
|
||||
-keepclassmembers class * {
|
||||
@com.facebook.soloader.DoNotOptimize *;
|
||||
}
|
||||
|
||||
# Keep native methods
|
||||
-keepclassmembers class * {
|
||||
native <methods>;
|
||||
}
|
||||
|
||||
-dontwarn okio.**
|
||||
-dontwarn com.squareup.okhttp.**
|
||||
-dontwarn okhttp3.**
|
||||
-dontwarn javax.annotation.**
|
||||
-dontwarn com.android.volley.toolbox.**
|
||||
-dontwarn com.facebook.infer.**
|
||||
|
||||
#Fastjson混淆配置
|
||||
-dontwarn com.alibaba.fastjson.**
|
||||
-keep class com.alibaba.fastjson.**{*; }
|
||||
|
||||
#Gson混淆配置
|
||||
-keep class com.google.gson.** {*;}
|
||||
-keep class com.google.**{*;}
|
||||
-keep class sun.misc.Unsafe { *; }
|
||||
-keep class com.google.gson.stream.** { *; }
|
||||
-keep class com.google.gson.examples.android.model.** { *; }
|
||||
|
||||
#Banner混淆配置
|
||||
-keep class com.youth.banner.** {
|
||||
*;
|
||||
}
|
||||
|
||||
# GreenDao混淆配置
|
||||
#GreenDAO 2:
|
||||
-keep class de.greenrobot.dao.** {*;}
|
||||
-keepclassmembers class * extends de.greenrobot.dao.AbstractDao {
|
||||
public static Java.lang.String TABLENAME;
|
||||
}
|
||||
-keep class **$Properties
|
||||
|
||||
#GreenDAO 3:
|
||||
-keepclassmembers class * extends org.greenrobot.greendao.AbstractDao {
|
||||
public static java.lang.String TABLENAME;
|
||||
}
|
||||
-keep class **$Properties
|
||||
|
||||
# If you do not use SQLCipher:
|
||||
-dontwarn org.greenrobot.greendao.database.**
|
||||
# If you do not use Rx:
|
||||
-dontwarn rx.**
|
||||
|
||||
#百度定位混淆配置
|
||||
-keep class vi.com.gdi.** { *; }
|
||||
-keep public class com.baidu.** {*;}
|
||||
-keep public class com.mobclick.** {*;}
|
||||
-dontwarn com.baidu.mapapi.utils.*
|
||||
-dontwarn com.baidu.platform.comapi.b.*
|
||||
-dontwarn com.baidu.platform.comapi.map.*
|
||||
|
||||
#百度地图混淆配置
|
||||
-keep class com.baidu.** {*;}
|
||||
-keep class vi.com.** {*;}
|
||||
-dontwarn com.baidu.**
|
||||
|
||||
#高徳地图混淆配置
|
||||
-dontwarn com.amap.api.**
|
||||
-dontwarn com.a.a.**
|
||||
-dontwarn com.autonavi.**
|
||||
-keep class com.amap.api.** {*;}
|
||||
-keep class com.autonavi.** {*;}
|
||||
-keep class com.a.a.** {*;}
|
||||
|
||||
#Bugly SDK
|
||||
-dontwarn com.tencent.bugly.**
|
||||
-keep public class com.tencent.bugly.**{*;}
|
||||
-keep class android.support.**{*;}
|
||||
|
||||
#EventBus混淆配置
|
||||
#EventBus 2:
|
||||
-keepclassmembers class ** {
|
||||
public void onEvent*(***);
|
||||
}
|
||||
|
||||
# Only required if you use AsyncExecutor
|
||||
-keepclassmembers class * extends de.greenrobot.event.util.ThrowableFailureEvent {
|
||||
<init>(java.lang.Throwable);
|
||||
}
|
||||
|
||||
#EventBus 3:
|
||||
-keepattributes *Annotation*
|
||||
-keepclassmembers class ** {
|
||||
@org.greenrobot.eventbus.Subscribe <methods>;
|
||||
}
|
||||
-keep enum org.greenrobot.eventbus.ThreadMode { *; }
|
||||
|
||||
# Only required if you use AsyncExecutor
|
||||
-keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {
|
||||
<init>(java.lang.Throwable);
|
||||
}
|
||||
|
||||
#友盟分享混淆配置
|
||||
-dontshrink
|
||||
-dontoptimize
|
||||
-dontwarn com.google.android.maps.**
|
||||
-dontwarn android.webkit.WebView
|
||||
-dontwarn com.umeng.**
|
||||
-dontwarn com.tencent.weibo.sdk.**
|
||||
-dontwarn com.facebook.**
|
||||
-keep public class javax.**
|
||||
-keep public class android.webkit.**
|
||||
-dontwarn android.support.v4.**
|
||||
-keep enum com.facebook.**
|
||||
-keepattributes Exceptions,InnerClasses,Signature
|
||||
-keepattributes *Annotation*
|
||||
-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
-keep public interface com.facebook.**
|
||||
-keep public interface com.tencent.**
|
||||
-keep public interface com.umeng.socialize.**
|
||||
-keep public interface com.umeng.socialize.sensor.**
|
||||
-keep public interface com.umeng.scrshot.**
|
||||
|
||||
-keep public class com.umeng.socialize.* {*;}
|
||||
|
||||
-keep class com.facebook.**
|
||||
-keep class com.facebook.** { *; }
|
||||
-keep class com.umeng.scrshot.**
|
||||
-keep public class com.tencent.** {*;}
|
||||
-keep class com.umeng.socialize.sensor.**
|
||||
-keep class com.umeng.socialize.handler.**
|
||||
-keep class com.umeng.socialize.handler.*
|
||||
-keep class com.umeng.weixin.handler.**
|
||||
-keep class com.umeng.weixin.handler.*
|
||||
-keep class com.umeng.qq.handler.**
|
||||
-keep class com.umeng.qq.handler.*
|
||||
-keep class UMMoreHandler{*;}
|
||||
-keep class com.tencent.mm.sdk.modelmsg.WXMediaMessage {*;}
|
||||
-keep class com.tencent.mm.sdk.modelmsg.** implements com.tencent.mm.sdk.modelmsg.WXMediaMessage$IMediaObject {*;}
|
||||
-keep class im.yixin.sdk.api.YXMessage {*;}
|
||||
-keep class im.yixin.sdk.api.** implements im.yixin.sdk.api.YXMessage$YXMessageData{*;}
|
||||
-keep class com.tencent.mm.sdk.** {
|
||||
*;
|
||||
}
|
||||
-keep class com.tencent.mm.opensdk.** {
|
||||
*;
|
||||
}
|
||||
-keep class com.tencent.wxop.** {
|
||||
*;
|
||||
}
|
||||
-keep class com.tencent.mm.sdk.** {
|
||||
*;
|
||||
}
|
||||
-dontwarn twitter4j.**
|
||||
-keep class twitter4j.** { *; }
|
||||
|
||||
-keep class com.tencent.** {*;}
|
||||
-dontwarn com.tencent.**
|
||||
-keep class com.kakao.** {*;}
|
||||
-dontwarn com.kakao.**
|
||||
-keep public class com.umeng.com.umeng.soexample.R$*{
|
||||
public static final int *;
|
||||
}
|
||||
-keep public class com.linkedin.android.mobilesdk.R$*{
|
||||
public static final int *;
|
||||
}
|
||||
-keepclassmembers enum * {
|
||||
public static **[] values();
|
||||
public static ** valueOf(java.lang.String);
|
||||
}
|
||||
|
||||
-keep class com.tencent.open.TDialog$*
|
||||
-keep class com.tencent.open.TDialog$* {*;}
|
||||
-keep class com.tencent.open.PKDialog
|
||||
-keep class com.tencent.open.PKDialog {*;}
|
||||
-keep class com.tencent.open.PKDialog$*
|
||||
-keep class com.tencent.open.PKDialog$* {*;}
|
||||
-keep class com.umeng.socialize.impl.ImageImpl {*;}
|
||||
-keep class com.sina.** {*;}
|
||||
-dontwarn com.sina.**
|
||||
-keep class com.alipay.share.sdk.** {
|
||||
*;
|
||||
}
|
||||
|
||||
-keepnames class * implements android.os.Parcelable {
|
||||
public static final ** CREATOR;
|
||||
}
|
||||
|
||||
-keep class com.linkedin.** { *; }
|
||||
-keep class com.android.dingtalk.share.ddsharemodule.** { *; }
|
||||
-keepattributes Signature
|
||||
|
||||
#友盟推送混淆配置
|
||||
-dontwarn com.umeng.**
|
||||
-dontwarn com.taobao.**
|
||||
-dontwarn anet.channel.**
|
||||
-dontwarn anetwork.channel.**
|
||||
-dontwarn org.android.**
|
||||
-dontwarn org.apache.thrift.**
|
||||
-dontwarn com.xiaomi.**
|
||||
-dontwarn com.huawei.**
|
||||
-dontwarn com.meizu.**
|
||||
|
||||
-keepattributes *Annotation*
|
||||
|
||||
-keep class com.taobao.** {*;}
|
||||
-keep class org.android.** {*;}
|
||||
-keep class anet.channel.** {*;}
|
||||
-keep class com.umeng.** {*;}
|
||||
-keep class com.xiaomi.** {*;}
|
||||
-keep class com.huawei.** {*;}
|
||||
-keep class com.meizu.** {*;}
|
||||
-keep class org.apache.thrift.** {*;}
|
||||
|
||||
-keep class com.alibaba.sdk.android.**{*;}
|
||||
-keep class com.ut.**{*;}
|
||||
-keep class com.ta.**{*;}
|
||||
|
||||
-keep public class **.R$*{
|
||||
public static final int *;
|
||||
}
|
||||
|
||||
#android 混淆打包报错Error java.lang.RuntimeException: Stub!??解决方案
|
||||
-keep class org.apache.**{*;}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-keep class java.net.** { *; }
|
||||
-keep class android.net.** { *; }
|
||||
-keep class com.hln.xqipao.data.** { *; }
|
||||
-keep class com.qpyy.libcommon.bean.** { *; }
|
||||
-keep class com.qpyy.libcommon.event.** { *; }
|
||||
-keep class com.qpyy.libcommon.api.** { *; }
|
||||
-keep class com.qpyy.libcommon.http.** { *; }
|
||||
-keep class com.qpyy.room.bean.** { *; }
|
||||
-keep class com.qpyy.room.api.** { *; }
|
||||
-keep class com.qpyy.module.index.bean.** { *; }
|
||||
-keep class com.qpyy.module.index.api.** { *; }
|
||||
-keep class com.qpyy.module.me.bean.** { *; }
|
||||
-keep class com.qpyy.module.me.api.** { *; }
|
||||
-keep class com.luck.picture.lib.entity.** { *; }
|
||||
-keep class com.qpyy.module_news.bean.** { *; }
|
||||
-keep class com.qpyy.module_news.api.** { *; }
|
||||
|
||||
#ShareSDK 混淆
|
||||
-keep class cn.sharesdk.**{*;}
|
||||
-keep class com.sina.**{*;}
|
||||
-keep class **.R$* {*;}
|
||||
-keep class **.R{*;}
|
||||
-keep class com.mob.**{*;}
|
||||
-dontwarn com.mob.**
|
||||
-dontwarn cn.sharesdk.**
|
||||
-dontwarn **.R$*
|
||||
-keep class com.hln.game.grabmarbles.**{*;}
|
||||
|
||||
|
||||
351713
app/proguard/mapping.txt
Normal file
83034
app/proguard/seeds.txt
Normal file
BIN
app/release/baselineProfiles/0/羽声_1.0_1.dm
Normal file
BIN
app/release/baselineProfiles/1/羽声_1.0_1.dm
Normal file
37
app/release/output-metadata.json
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"version": 3,
|
||||
"artifactType": {
|
||||
"type": "APK",
|
||||
"kind": "Directory"
|
||||
},
|
||||
"applicationId": "com.qxcm.qxlive",
|
||||
"variantName": "release",
|
||||
"elements": [
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 1,
|
||||
"versionName": "1.0",
|
||||
"outputFile": "羽声_1.0_1.apk"
|
||||
}
|
||||
],
|
||||
"elementType": "File",
|
||||
"baselineProfiles": [
|
||||
{
|
||||
"minApi": 28,
|
||||
"maxApi": 30,
|
||||
"baselineProfiles": [
|
||||
"baselineProfiles/1/羽声_1.0_1.dm"
|
||||
]
|
||||
},
|
||||
{
|
||||
"minApi": 31,
|
||||
"maxApi": 2147483647,
|
||||
"baselineProfiles": [
|
||||
"baselineProfiles/0/羽声_1.0_1.dm"
|
||||
]
|
||||
}
|
||||
],
|
||||
"minSdkVersionForDexing": 24
|
||||
}
|
||||
BIN
app/release/羽声_1.0_1.apk
Normal file
@@ -0,0 +1,26 @@
|
||||
package com.qxcm.qxlive;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class ExampleInstrumentedTest {
|
||||
@Test
|
||||
public void useAppContext() {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
|
||||
assertEquals("com.qxcm.qxlive", appContext.getPackageName());
|
||||
}
|
||||
}
|
||||
99
app/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1,99 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.qxcm.qxlive">
|
||||
|
||||
<!-- Features -->
|
||||
<uses-feature
|
||||
android:name="android.hardware.telephony"
|
||||
android:required="false" />
|
||||
<uses-feature
|
||||
android:name="android.hardware.camera"
|
||||
android:required="false" />
|
||||
|
||||
<!-- Tools override -->
|
||||
<uses-sdk xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:overrideLibrary="cn.sharesdk.onekeyshare" />
|
||||
|
||||
<!-- Permissions -->
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
||||
<uses-permission android:name="android.permission.NETWORK_PROVIDER" />
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
<uses-permission android:name="android.permission.FLASHLIGHT" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
|
||||
<uses-permission android:name="android.permission.GET_TASKS" />
|
||||
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
<uses-permission android:name="android.permission.REORDER_TASKS" />
|
||||
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" />
|
||||
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
|
||||
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
|
||||
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
|
||||
<uses-permission android:name="${applicationId}.permission.JPUSH_MESSAGE" />
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
||||
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/>
|
||||
|
||||
|
||||
<application
|
||||
android:name="AppContext"
|
||||
android:allowBackup="true"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
android:fullBackupContent="@xml/backup_rules"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme"
|
||||
tools:replace="android:theme"
|
||||
tools:targetApi="31">
|
||||
<activity
|
||||
android:name=".LaunchPageActivity"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||
android:exported="true"
|
||||
android:screenOrientation="behind"
|
||||
android:launchMode="singleTop">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
|
||||
<activity
|
||||
android:name="com.mobile.auth.gatewayauth.LoginAuthActivity"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||
android:exported="false"
|
||||
android:launchMode="singleTop"
|
||||
android:screenOrientation="behind"
|
||||
android:theme="@style/authsdk_activity_dialog" />
|
||||
|
||||
<activity
|
||||
android:name="com.mobile.auth.gatewayauth.activity.AuthWebVeiwActivity"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||
android:exported="false"
|
||||
android:launchMode="singleTop"
|
||||
android:screenOrientation="behind" />
|
||||
|
||||
<activity
|
||||
android:name="com.cmic.sso.sdk.activity.LoginAuthActivity"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||
android:launchMode="singleTop"
|
||||
android:screenOrientation="behind"
|
||||
android:theme="@style/authsdk_activity_dialog" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
96
app/src/main/java/com/qxcm/qxlive/AppContext.java
Normal file
@@ -0,0 +1,96 @@
|
||||
package com.qxcm.qxlive;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.hjq.toast.IToastInterceptor;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.qxcm.moduleutil.utils.config.EnvironmentEnum;
|
||||
import com.qxcm.moduleutil.utils.config.EnvironmentPrefs;
|
||||
import com.qxcm.moduleutil.widget.CommonAppConfig;
|
||||
import com.qxcm.moduleutil.widget.CommonAppContext;
|
||||
|
||||
|
||||
/**
|
||||
* Created by cxf on 2017/8/3.
|
||||
*/
|
||||
|
||||
public class AppContext extends CommonAppContext {
|
||||
|
||||
private boolean mBeautyInited;
|
||||
private EnvironmentEnum currentEnvironment;
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
ToastUtils.init(this);
|
||||
// ToastUtils.setInterceptor(new IToastInterceptor() {
|
||||
// @Override
|
||||
// public boolean intercept(CharSequence charSequence) {
|
||||
// return !CommonAppContext.getInstance().isFront();
|
||||
// }
|
||||
// });
|
||||
// L.setDeBug(BuildConfig.DEBUG);
|
||||
EnvironmentPrefs prefs = new EnvironmentPrefs(this);
|
||||
currentEnvironment = prefs.getSelectedEnvironment();
|
||||
}
|
||||
public EnvironmentEnum getCurrentEnvironment() {
|
||||
return currentEnvironment;
|
||||
}
|
||||
public static void initSdk() {
|
||||
CommonAppContext context = CommonAppContext.getInstance();
|
||||
// if (BuildConfig.DEBUG) {
|
||||
// L.e("应用签名:" + context.getAppSignature());
|
||||
// //L.e("facebook散列秘钥------>" + context.getFacebookHashKey());
|
||||
// }
|
||||
// //腾讯云直播鉴权url
|
||||
// String liveLicenceUrl = "https://license.vod2.myqcloud.com/license/v2/1346816652_1/v_cube.license";
|
||||
// //腾讯云直播鉴权key
|
||||
// String liveKey = "c30f209835056ba00f738a014ca4448a";
|
||||
// //腾讯云视频鉴权url
|
||||
// String ugcLicenceUrl = "https://license.vod2.myqcloud.com/license/v2/1346816652_1/v_cube.license";
|
||||
// //腾讯云视频鉴权key
|
||||
// String ugcKey = "c30f209835056ba00f738a014ca4448a";
|
||||
// TXLiveBase.getInstance().setDebug(BuildConfig.DEBUG);
|
||||
// TXLiveBase.getInstance().setLicence(context, liveLicenceUrl, liveKey, ugcLicenceUrl, ugcKey);
|
||||
// //初始化腾讯bugly
|
||||
// CrashReport.initCrashReport(context);
|
||||
// CrashReport.setAppVersion(context, CommonAppConfig.getInstance().getVersion());
|
||||
// //初始化ShareSdk
|
||||
// MobSDK.init(context);
|
||||
// MobSDK.submitPolicyGrantResult(true);
|
||||
// //初始化IM
|
||||
// ImMessageUtil.getInstance().init();
|
||||
// //初始化腾讯TPNS 移动推送
|
||||
// TpnsUtil.register(BuildConfig.DEBUG);
|
||||
// //初始化友盟统计
|
||||
// UmengUtil.init(context, BuildConfig.DEBUG);
|
||||
// //OpenInstall
|
||||
// OpenInstall.init(context);
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化美狐
|
||||
*/
|
||||
public void initBeautySdk(String beautyAppId, String beautyKey) {
|
||||
// if (!TextUtils.isEmpty(beautyAppId) && !TextUtils.isEmpty(beautyKey)) {
|
||||
// if (!mBeautyInited) {
|
||||
// mBeautyInited = true;
|
||||
// if (CommonAppConfig.isYunBaoApp()) {
|
||||
// beautyAppId = DecryptUtil.decrypt(beautyAppId);
|
||||
// beautyKey = DecryptUtil.decrypt(beautyKey);
|
||||
// }
|
||||
// MHSDK.init(this, beautyAppId, beautyKey);
|
||||
// CommonAppConfig.getInstance().setMhBeautyEnable(true);
|
||||
// L.e("美狐初始化----AppId--->" + beautyAppId + "---AppKey--->" + beautyKey);
|
||||
// }
|
||||
// } else {
|
||||
// CommonAppConfig.getInstance().setMhBeautyEnable(false);
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startInitSdk() {
|
||||
initSdk();
|
||||
}
|
||||
|
||||
}
|
||||
18
app/src/main/java/com/qxcm/qxlive/LaunchContacter.java
Normal file
@@ -0,0 +1,18 @@
|
||||
package com.qxcm.qxlive;
|
||||
|
||||
import android.app.Activity;
|
||||
|
||||
import com.qxcm.moduleutil.activity.IPresenter;
|
||||
import com.qxcm.moduleutil.activity.IView;
|
||||
|
||||
public final class LaunchContacter {
|
||||
|
||||
public interface View extends IView<Activity> {
|
||||
|
||||
}
|
||||
|
||||
public interface ILoginPre extends IPresenter {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
305
app/src/main/java/com/qxcm/qxlive/LaunchPageActivity.java
Normal file
@@ -0,0 +1,305 @@
|
||||
package com.qxcm.qxlive;
|
||||
|
||||
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.os.Build;
|
||||
import android.os.Handler;
|
||||
import android.text.TextUtils;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.blankj.utilcode.util.ThreadUtils;
|
||||
import com.mobile.auth.gatewayauth.AuthUIConfig;
|
||||
import com.mobile.auth.gatewayauth.PhoneNumberAuthHelper;
|
||||
import com.mobile.auth.gatewayauth.PreLoginResultListener;
|
||||
import com.mobile.auth.gatewayauth.ResultCode;
|
||||
import com.mobile.auth.gatewayauth.TokenResultListener;
|
||||
import com.mobile.auth.gatewayauth.model.TokenRet;
|
||||
import com.qxcm.modulelogin.activity.LoginActivity;
|
||||
import com.qxcm.modulelogin.activity.PasswordLoginActivity;
|
||||
import com.qxcm.modulemain.activity.MainActivity;
|
||||
import com.qxcm.moduleutil.activity.BaseMvpActivity;
|
||||
import com.qxcm.moduleutil.dialog.PolicyDialog;
|
||||
import com.qxcm.moduleutil.utils.SpUtil;
|
||||
import com.qxcm.moduleutil.utils.logger.Logger;
|
||||
import com.qxcm.qxlive.databinding.ActivityLaunchPageBinding;
|
||||
|
||||
public class LaunchPageActivity extends BaseMvpActivity<LaunchPresenter, ActivityLaunchPageBinding> implements LaunchContacter.View{
|
||||
private Handler handler;
|
||||
public PhoneNumberAuthHelper phoneNumberAuthHelper;
|
||||
private TokenResultListener tokenResultListener;
|
||||
private boolean canOnePass;
|
||||
private boolean isCanOnePass=false;
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
handler = new Handler();
|
||||
// 定义一个Runnable
|
||||
Runnable runnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
initLogin();
|
||||
}
|
||||
};
|
||||
// mBinding.tvVersionName.setText(BuildConfig.VERSION_NAME + "." + BuildConfig.VERSION_CODE);
|
||||
if (SpUtil.isAgreePolicy()) {
|
||||
// UtilConfig.checkInEmulator();
|
||||
// BaseApplication.getInstance().checkInEmulator();
|
||||
// BaseApplication.getInstance().initHeartBeat();
|
||||
// //延迟1.5秒执行
|
||||
// handler.postDelayed(runnable, 100);
|
||||
initLogin();
|
||||
} else {
|
||||
PolicyDialog policyDialog = new PolicyDialog(this);
|
||||
policyDialog.setCancelable(false);
|
||||
policyDialog.setCanceledOnTouchOutside(false);
|
||||
policyDialog.setPolicyClickListener(new PolicyDialog.PolicyClickListener() {
|
||||
@Override
|
||||
public void policyAgree() {
|
||||
SpUtil.completeAgreePolicy();
|
||||
// UtilConfig.checkInEmulator();
|
||||
// BaseApplication.getInstance().checkInEmulator();
|
||||
// RetrofitManager.getInstance().init(com.qpyy.libcommon.BuildConfig.BASE_URL);
|
||||
// RetrofitManager.getInstance().init(com.qpyy.libcommon.BuildConfig.NEW_BASE_URL);
|
||||
// BaseApplication.getInstance().initHeartBeat();
|
||||
// BaseApplication.getInstance().initThirdPartySdk();
|
||||
// BaseApplication.getInstance().initOkGo();
|
||||
initLogin();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void policyExit() {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
policyDialog.show();
|
||||
}
|
||||
}
|
||||
|
||||
private void initLogin() {
|
||||
|
||||
if (isCanOnePass){
|
||||
initQuickLogin();
|
||||
checkOnePass();
|
||||
}else {
|
||||
startActivity(new Intent(this, MainActivity.class));
|
||||
}
|
||||
}
|
||||
|
||||
private void checkOnePass() {
|
||||
if (!TextUtils.isEmpty(AppContext.getInstance().getToken())) {
|
||||
isRoot();
|
||||
return;
|
||||
}
|
||||
showLoadings();
|
||||
if (phoneNumberAuthHelper != null) {
|
||||
phoneNumberAuthHelper.accelerateLoginPage(3 * 1000, new PreLoginResultListener() {
|
||||
@Override
|
||||
public void onTokenSuccess(String s) {
|
||||
Logger.e("onTokenSuccess", s);
|
||||
canOnePass = true;
|
||||
isRoot();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTokenFailed(String s, String s1) {
|
||||
Logger.e("onTokenFailed", "错误信息" + s, s1);
|
||||
isRoot();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
canOnePass = false;
|
||||
isRoot();
|
||||
}
|
||||
}
|
||||
private void isRoot() {
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
disLoadings();
|
||||
if (!LaunchPageActivity.this.isTaskRoot()) {
|
||||
Intent intent = getIntent();
|
||||
if (intent != null) {
|
||||
String action = intent.getAction();
|
||||
if (intent.hasCategory(Intent.CATEGORY_LAUNCHER) && Intent.ACTION_MAIN.equals(action)) {
|
||||
finish();
|
||||
} else {
|
||||
goNextActivity();
|
||||
}
|
||||
} else {
|
||||
goNextActivity();
|
||||
}
|
||||
} else {
|
||||
goNextActivity();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void goNextActivity() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
|
||||
if (isFinishing() || isDestroyed()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (TextUtils.isEmpty(AppContext.getInstance().getToken())) {
|
||||
Logger.e("SplashEnd", "ARouters.CODE_LOGIN");
|
||||
if (canOnePass) {
|
||||
phoneNumberAuthHelper.setAuthListener(tokenResultListener);
|
||||
doOnePass();
|
||||
} else {
|
||||
go2Login();
|
||||
}
|
||||
} else {
|
||||
Logger.e("SplashEnd", "ARouters.MAIN");
|
||||
// UserBean userBean = MyApplication.getInstance().getUser();
|
||||
// if (userBean.getSex() == 0) {
|
||||
// Intent intent = new Intent(this, ImproveInfoActivity.class);
|
||||
// intent.putExtra("nickname", String.format("用户%s", userBean.getUser_code()));
|
||||
// intent.putExtra("user_no_parent", userBean.getUser_no_parent());
|
||||
// startActivity(intent);
|
||||
// } else {
|
||||
// startActivity(new Intent(this, MainActivity.class));
|
||||
// }
|
||||
finish();
|
||||
}
|
||||
}
|
||||
private void doOnePass() {
|
||||
AuthUIConfig authUIConfig = new AuthUIConfig.Builder()
|
||||
//导航栏
|
||||
.setNavColor(Color.TRANSPARENT)
|
||||
.setNavReturnHidden(true)
|
||||
.setNavHidden(true)
|
||||
.setNavText("")
|
||||
.setNavTextColor(Color.BLACK)
|
||||
.setWebNavColor(Color.TRANSPARENT)
|
||||
.setWebNavTextColor(Color.BLACK)
|
||||
.setWebNavReturnImgPath("ic_topbar_back_dark")
|
||||
//状态栏区
|
||||
.setStatusBarColor(Color.TRANSPARENT)
|
||||
.setLightColor(false)
|
||||
.setWebViewStatusBarColor(Color.TRANSPARENT)
|
||||
.setStatusBarUIFlag(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN)
|
||||
//logo区
|
||||
.setLogoImgPath("login_log")
|
||||
.setLogoWidth(142)
|
||||
.setLogoHeight(142)
|
||||
.setLogoOffsetY(54)
|
||||
.setLogoHidden(false)
|
||||
.setLogoScaleType(ImageView.ScaleType.FIT_XY)
|
||||
//Slogan
|
||||
.setSloganText("本机号码")
|
||||
.setSloganTextColor(Color.parseColor("#A8A8A8"))
|
||||
.setSloganTextSize(12)
|
||||
.setSloganOffsetY(236)
|
||||
//掩码栏
|
||||
.setNumberColor(Color.BLACK)
|
||||
.setNumberSize(30)
|
||||
.setNumFieldOffsetY(263)
|
||||
.setNumberLayoutGravity(Gravity.CENTER_HORIZONTAL)
|
||||
//登录按钮
|
||||
.setLogBtnText("本机号码一键登录")
|
||||
.setLogBtnWidth(300)
|
||||
.setLogBtnHeight(42)
|
||||
.setLogBtnOffsetY(325)
|
||||
.setLogBtnTextSize(14)
|
||||
.setLogBtnTextColor(getResources().getColor(R.color.black))
|
||||
.setLogBtnBackgroundPath("cs")
|
||||
//切换到其他方式
|
||||
.setSwitchAccText("其他登录方式")
|
||||
.setSwitchAccTextColor(Color.parseColor("#333333"))
|
||||
.setSwitchAccTextSize(12)
|
||||
.setSwitchOffsetY(390)
|
||||
//协议栏
|
||||
.setAppPrivacyOne("《用户协议》", "")
|
||||
.setAppPrivacyTwo("《隐私协议》", "")
|
||||
.setAppPrivacyColor(Color.parseColor("#A8A8A8"), Color.parseColor("#FFBC00"))
|
||||
.setPrivacyBefore("登录即代表同意")
|
||||
.setPrivacyEnd("并授权获得号码")
|
||||
.setPrivacyTextSize(11)
|
||||
.setPrivacyMargin(39)
|
||||
.setPrivacyState(true)
|
||||
.setCheckboxHidden(false)
|
||||
.setCheckedImgPath("ic_agreement_selected")
|
||||
.setUncheckedImgPath("ic_agreement_unselect")
|
||||
.setPrivacyOffsetX(2)
|
||||
.setVendorPrivacyPrefix("《")
|
||||
.setVendorPrivacySuffix("》")
|
||||
//全页面属性
|
||||
.setAuthPageActIn("in_activity", "out_activity")
|
||||
.setAuthPageActOut("in_activity", "out_activity")
|
||||
.setPageBackgroundPath("log_bj")
|
||||
.create();
|
||||
phoneNumberAuthHelper.setAuthUIConfig(authUIConfig);
|
||||
phoneNumberAuthHelper.getLoginToken(getApplicationContext(), 5000);
|
||||
}
|
||||
private void initQuickLogin() {
|
||||
tokenResultListener = new TokenResultListener() {
|
||||
@Override
|
||||
public void onTokenSuccess(String s) {
|
||||
Logger.e("onTokenSuccess", s);
|
||||
ThreadUtils.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
TokenRet tokenRet = null;
|
||||
try {
|
||||
tokenRet = JSON.parseObject(s, TokenRet.class);
|
||||
if (tokenRet != null && ("600000").equals(tokenRet.getCode())) {
|
||||
phoneNumberAuthHelper.hideLoginLoading();
|
||||
//获取成功 dimiss就去登录、登录成功
|
||||
phoneNumberAuthHelper.quitLoginPage();
|
||||
// MvpPre.oauthLogin(null, tokenRet.getToken(), 4);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
go2Login();
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTokenFailed(String s) {
|
||||
Logger.e("onTokenFailed", s);
|
||||
ThreadUtils.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
phoneNumberAuthHelper.hideLoginLoading();
|
||||
phoneNumberAuthHelper.quitLoginPage();
|
||||
go2Login();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
try {
|
||||
phoneNumberAuthHelper = PhoneNumberAuthHelper.getInstance(getApplicationContext(),tokenResultListener);
|
||||
phoneNumberAuthHelper.getReporter().setLoggerEnable(true);
|
||||
LogUtils.e("initAuthSDK", ((AppContext) getApplication()).getCurrentEnvironment().getALI_AUTH_KEY());
|
||||
phoneNumberAuthHelper.setAuthSDKInfo("6rdWuz058oq5OahdbFiGEybUcdahd12J83L34Uc7MrPIrxtFG+rXiwDvRcqNvjwbClbbmvMrmxKVkIysFByBsl0Qe9kqd2w8T/nhK5G6eXXlk2V9AjYCieIU+jRnjZBB+Cfechr6rCGJ2aeBARIsXcRPW7wm9WFK9euh5T+v6Pyte68yNaNdcYCll3+U4/uCEog7HygCnMIbAU+kqoPdmn2H+51YOHW+VsnsHd4w1+I3f8Tt0xLIXGM4GWnQueZ5GR46GTWiSYMy8dCIh9SPIMRyC91GosVcfGPMJSdcXqc=");
|
||||
phoneNumberAuthHelper.checkEnvAvailable(2);
|
||||
|
||||
} catch (Throwable ignored) {
|
||||
Logger.e("initAuthSDK", ignored);
|
||||
}
|
||||
}
|
||||
private void go2Login() {
|
||||
startActivity(new Intent(this, PasswordLoginActivity.class));
|
||||
finish();
|
||||
}
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_launch_page;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected LaunchPresenter bindPresenter() {
|
||||
return new LaunchPresenter( this,this);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
13
app/src/main/java/com/qxcm/qxlive/LaunchPresenter.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package com.qxcm.qxlive;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.qxcm.moduleutil.activity.IPresenter;
|
||||
import com.qxcm.qxlive.presenter.BasePresenter;
|
||||
|
||||
public class LaunchPresenter extends BasePresenter<LaunchContacter.View> implements LaunchContacter.ILoginPre {
|
||||
|
||||
public LaunchPresenter(LaunchContacter.View view, Context context) {
|
||||
super(view, context);
|
||||
}
|
||||
}
|
||||
110
app/src/main/java/com/qxcm/qxlive/presenter/BasePresenter.java
Normal file
@@ -0,0 +1,110 @@
|
||||
package com.qxcm.qxlive.presenter;
|
||||
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
|
||||
import com.qxcm.moduleutil.activity.IPresenter;
|
||||
import com.qxcm.moduleutil.activity.IView;
|
||||
|
||||
import java.lang.ref.Reference;
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
import io.reactivex.disposables.CompositeDisposable;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
public abstract class BasePresenter<V extends IView> implements IPresenter {
|
||||
protected CompositeDisposable mDisposables = new CompositeDisposable();
|
||||
// private RemoteDataSource api;
|
||||
protected Reference<V> MvpRef;
|
||||
protected Context mContext;
|
||||
|
||||
@Deprecated
|
||||
public BasePresenter(V view) {
|
||||
attachView(view);
|
||||
}
|
||||
|
||||
public BasePresenter(V view, Context context) {
|
||||
attachView(view);
|
||||
mContext = context;
|
||||
}
|
||||
|
||||
private void attachView(V view) {
|
||||
MvpRef = new WeakReference<V>(view);
|
||||
}
|
||||
|
||||
protected V getView() {
|
||||
if (MvpRef != null) {
|
||||
return MvpRef.get();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// protected RemoteDataSource getApi() {
|
||||
// if (api == null) {
|
||||
// api = RemoteDataSource.getInstance();
|
||||
// }
|
||||
// return api;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 主要用于判断IView的生命周期是否结束,防止出现内存泄露状况
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isViewAttach() {
|
||||
return MvpRef != null && MvpRef.get() != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detachView() {
|
||||
cancelRequest();
|
||||
if (MvpRef != null) {
|
||||
MvpRef.clear();
|
||||
MvpRef = null;
|
||||
}
|
||||
// if (api != null) {
|
||||
// api = null;
|
||||
// }
|
||||
unBindView();
|
||||
}
|
||||
|
||||
|
||||
public void unBindView() {
|
||||
if (MvpRef != null) {
|
||||
MvpRef.clear();
|
||||
}
|
||||
mContext=null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 加入订阅对象
|
||||
*
|
||||
* @param disposable
|
||||
*/
|
||||
public void addDisposable(Disposable disposable) {
|
||||
mDisposables.add(disposable);
|
||||
}
|
||||
|
||||
/**
|
||||
* 移除订阅对象
|
||||
*
|
||||
* @param disposable
|
||||
*/
|
||||
public void removeDisposable(Disposable disposable) {
|
||||
mDisposables.remove(disposable);
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消所有请求
|
||||
*/
|
||||
public void cancelRequest() {
|
||||
if (mDisposables != null) {
|
||||
mDisposables.clear(); // clear时网络请求会随即cancel
|
||||
mDisposables = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
5
app/src/main/res/drawable/bg_launcher_ad_tip.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="20dp"/>
|
||||
<solid android:color="#80000000"/>
|
||||
</shape>
|
||||
4
app/src/main/res/drawable/bg_launcher_skip.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape android:shape="oval" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#80000000"/>
|
||||
</shape>
|
||||
6
app/src/main/res/drawable/bg_launcher_skip_2.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="12sp"/>
|
||||
<stroke android:color="@color/white" android:width="1dp"/>
|
||||
<solid android:color="#80000000"/>
|
||||
</shape>
|
||||
170
app/src/main/res/drawable/ic_launcher_background.xml
Normal file
@@ -0,0 +1,170 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:fillColor="#3DDC84"
|
||||
android:pathData="M0,0h108v108h-108z" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M9,0L9,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,0L19,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,0L29,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,0L39,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,0L49,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,0L59,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,0L69,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,0L79,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M89,0L89,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M99,0L99,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,9L108,9"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,19L108,19"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,29L108,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,39L108,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,49L108,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,59L108,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,69L108,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,79L108,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,89L108,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,99L108,99"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,29L89,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,39L89,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,49L89,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,59L89,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,69L89,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,79L89,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,19L29,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,19L39,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,19L49,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,19L59,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,19L69,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,19L79,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
</vector>
|
||||
30
app/src/main/res/drawable/ic_launcher_foreground.xml
Normal file
@@ -0,0 +1,30 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:endX="85.84757"
|
||||
android:endY="92.4963"
|
||||
android:startX="42.9492"
|
||||
android:startY="49.59793"
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#44000000"
|
||||
android:offset="0.0" />
|
||||
<item
|
||||
android:color="#00000000"
|
||||
android:offset="1.0" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#00000000" />
|
||||
</vector>
|
||||
BIN
app/src/main/res/drawable/ic_topbar_back_dark.png
Normal file
|
After Width: | Height: | Size: 705 B |
BIN
app/src/main/res/drawable/log_bj.png
Normal file
|
After Width: | Height: | Size: 609 KiB |
BIN
app/src/main/res/drawable/login_log.png
Normal file
|
After Width: | Height: | Size: 562 KiB |
101
app/src/main/res/layout/activity_launch_page.xml
Normal file
@@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<data></data>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#000" />
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/btn_skip_img"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="right"
|
||||
android:layout_marginTop="37dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:background="@drawable/bg_launcher_skip"
|
||||
android:visibility="invisible">
|
||||
|
||||
<com.qxcm.moduleutil.custon.CircleProgress
|
||||
android:id="@+id/progress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:cp_bg_color="@color/white"
|
||||
app:cp_cur_progress="0"
|
||||
app:cp_fg_color="#ff7200"
|
||||
app:cp_stroke_width="2dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="@string/recommend_skip"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="11sp" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_skip_video"
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="26dp"
|
||||
android:layout_gravity="right"
|
||||
android:layout_marginTop="37dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:background="@drawable/bg_launcher_skip_2"
|
||||
android:gravity="center"
|
||||
android:text="@string/recommend_skip"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="11sp"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ad_tip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="bottom|center_horizontal"
|
||||
android:layout_marginBottom="50dp"
|
||||
android:background="@drawable/bg_launcher_ad_tip"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="20dp"
|
||||
android:paddingRight="20dp"
|
||||
android:visibility="invisible">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/a_067"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="13dp"
|
||||
android:layout_height="13dp"
|
||||
android:src="@mipmap/icon_arrow_right_3" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/cover"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clickable="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/screen"
|
||||
android:visibility="visible" />
|
||||
|
||||
</FrameLayout>
|
||||
</layout>
|
||||
6
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
6
app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
BIN
app/src/main/res/mipmap-hdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 982 B |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 7.6 KiB |
5
app/src/main/res/values-en-rUs/strings.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation">
|
||||
<string name="app_name">Vespa</string>
|
||||
<string name="recommend_skip">Skip</string>
|
||||
<string name="a_067">Click to jump to third-party applications</string>
|
||||
</resources>
|
||||
16
app/src/main/res/values-night/themes.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Theme.QxLive" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
||||
<!-- Primary brand color. -->
|
||||
<item name="colorPrimary">@color/purple_200</item>
|
||||
<item name="colorPrimaryVariant">@color/purple_700</item>
|
||||
<item name="colorOnPrimary">@color/black</item>
|
||||
<!-- Secondary brand color. -->
|
||||
<item name="colorSecondary">@color/teal_200</item>
|
||||
<item name="colorSecondaryVariant">@color/teal_200</item>
|
||||
<item name="colorOnSecondary">@color/black</item>
|
||||
<!-- Status bar color. -->
|
||||
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
</resources>
|
||||
32
app/src/main/res/values/colors.xml
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="purple_200">#FFBB86FC</color>
|
||||
<color name="purple_500">#FF6200EE</color>
|
||||
<color name="purple_700">#FF3700B3</color>
|
||||
<color name="teal_200">#FF03DAC5</color>
|
||||
<color name="teal_700">#FF018786</color>
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
|
||||
<color name="global">#ff5878</color>
|
||||
<color name="background">@color/gray2</color>
|
||||
<color name="transparent">#00000000</color>
|
||||
<color name="textColor">#282828</color>
|
||||
<color name="gray1">#969696</color>
|
||||
<color name="gray2">#f5f5f5</color>
|
||||
<color name="gray3">#c8c8c8</color>
|
||||
<color name="gray4">#B4B4B4</color>
|
||||
<color name="gray5">#dcdcdc</color>
|
||||
<color name="yellow">#fffa37</color>
|
||||
<color name="yellow2">#f0cd08</color>
|
||||
<color name="yellow3">#FFF34D</color>
|
||||
<color name="yellow4">#ffdd00</color>
|
||||
<color name="textColor2">#646464</color>
|
||||
<color name="red">#ff0000</color>
|
||||
<color name="pk_red">#FF205E</color>
|
||||
<color name="pk_blue">#169AFF</color>
|
||||
<color name="black1">#e6323232</color>
|
||||
<color name="blue1">#1FC8F8</color>
|
||||
<color name="blue2">#4998F7</color>
|
||||
<color name="blue3">#32A0FF</color>
|
||||
</resources>
|
||||
5
app/src/main/res/values/strings.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<resources>
|
||||
<string name="app_name" translatable="false">羽声</string>
|
||||
<string name="recommend_skip">跳过</string>
|
||||
<string name="a_067">点击跳转第三方应用</string>
|
||||
</resources>
|
||||
77
app/src/main/res/values/themes.xml
Normal file
@@ -0,0 +1,77 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="@style/Theme.AppCompat.Light.NoActionBar">
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
<item name="android:colorBackground">@color/background</item>
|
||||
</style>
|
||||
|
||||
<style name="LauncherAppTheme" parent="AppTheme">
|
||||
<item name="android:navigationBarColor">@android:color/transparent</item>
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
</style>
|
||||
|
||||
<style name="dialog" parent="AppTheme">
|
||||
<item name="android:windowFrame">@null</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:windowIsFloating">true</item>
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
<item name="android:windowBackground">@color/transparent</item>
|
||||
<item name="android:backgroundDimAmount">0.5</item>
|
||||
<!--显示区域以外是否使用黑色半透明背景-->
|
||||
<item name="android:backgroundDimEnabled">true</item>
|
||||
</style>
|
||||
|
||||
<style name="dialog2" parent="AppTheme">
|
||||
<item name="android:windowFrame">@null</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:windowIsFloating">true</item>
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
<item name="android:windowBackground">@color/transparent</item>
|
||||
<!--显示区域以外是否使用黑色半透明背景-->
|
||||
<item name="android:backgroundDimEnabled">false</item>
|
||||
</style>
|
||||
|
||||
<style name="bottomToTopAnim" parent="android:Animation">
|
||||
<item name="android:windowEnterAnimation">@anim/bottomview_anim_enter</item>
|
||||
<item name="android:windowExitAnimation">@anim/bottomview_anim_exit</item>
|
||||
</style>
|
||||
|
||||
<style name="bottomToTopAnim2" parent="android:Animation">
|
||||
<item name="android:windowEnterAnimation">@anim/bottomview_anim_enter_2</item>
|
||||
<item name="android:windowExitAnimation">@anim/bottomview_anim_exit_2</item>
|
||||
</style>
|
||||
|
||||
<style name="leftToRightAnim" parent="android:Animation">
|
||||
<item name="android:windowEnterAnimation">@anim/left_anim_enter</item>
|
||||
<item name="android:windowExitAnimation">@anim/left_anim_exit</item>
|
||||
</style>
|
||||
|
||||
<style name="animCenter" parent="android:Animation">
|
||||
<item name="android:windowEnterAnimation">@anim/anim_center_enter</item>
|
||||
<item name="android:windowExitAnimation">@anim/anim_center_exit</item>
|
||||
</style>
|
||||
|
||||
<style name="groupLast" parent="AppTheme">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">1dp</item>
|
||||
<item name="android:layout_marginLeft">15dp</item>
|
||||
<item name="android:layout_marginRight">15dp</item>
|
||||
<item name="android:background">@color/gray2</item>
|
||||
</style>
|
||||
|
||||
<style name="line2" parent="AppTheme">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">1dp</item>
|
||||
<item name="android:background">@color/gray2</item>
|
||||
</style>
|
||||
|
||||
<style name="edit_profile_group" parent="AppTheme">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">60dp</item>
|
||||
<item name="android:paddingLeft">15dp</item>
|
||||
<item name="android:paddingRight">15dp</item>
|
||||
</style>
|
||||
</resources>
|
||||
13
app/src/main/res/xml/backup_rules.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Sample backup rules file; uncomment and customize as necessary.
|
||||
See https://developer.android.com/guide/topics/data/autobackup
|
||||
for details.
|
||||
Note: This file is ignored for devices older that API 31
|
||||
See https://developer.android.com/about/versions/12/backup-restore
|
||||
-->
|
||||
<full-backup-content>
|
||||
<!--
|
||||
<include domain="sharedpref" path="."/>
|
||||
<exclude domain="sharedpref" path="device.xml"/>
|
||||
-->
|
||||
</full-backup-content>
|
||||
19
app/src/main/res/xml/data_extraction_rules.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Sample data extraction rules file; uncomment and customize as necessary.
|
||||
See https://developer.android.com/about/versions/12/backup-restore#xml-changes
|
||||
for details.
|
||||
-->
|
||||
<data-extraction-rules>
|
||||
<cloud-backup>
|
||||
<!-- TODO: Use <include> and <exclude> to control what is backed up.
|
||||
<include .../>
|
||||
<exclude .../>
|
||||
-->
|
||||
</cloud-backup>
|
||||
<!--
|
||||
<device-transfer>
|
||||
<include .../>
|
||||
<exclude .../>
|
||||
</device-transfer>
|
||||
-->
|
||||
</data-extraction-rules>
|
||||
17
app/src/test/java/com/qxcm/qxlive/ExampleUnitTest.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package com.qxcm.qxlive;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
public class ExampleUnitTest {
|
||||
@Test
|
||||
public void addition_isCorrect() {
|
||||
assertEquals(4, 2 + 2);
|
||||
}
|
||||
}
|
||||