初次提交
15
.gitignore
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
*.iml
|
||||
.gradle
|
||||
/local.properties
|
||||
/.idea/caches
|
||||
/.idea/libraries
|
||||
/.idea/modules.xml
|
||||
/.idea/workspace.xml
|
||||
/.idea/navEditor.xml
|
||||
/.idea/assetWizardSettings.xml
|
||||
.DS_Store
|
||||
/build
|
||||
/captures
|
||||
.externalNativeBuild
|
||||
.cxx
|
||||
local.properties
|
||||
3
.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
1
.idea/.name
generated
Normal file
@@ -0,0 +1 @@
|
||||
qxLive
|
||||
6
.idea/appInsightsSettings.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="AppInsightsSettings">
|
||||
<option name="selectedTabId" value="Android Vitals" />
|
||||
</component>
|
||||
</project>
|
||||
117
.idea/codeStyles/Project.xml
generated
Normal file
@@ -0,0 +1,117 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<code_scheme name="Project" version="173">
|
||||
<codeStyleSettings language="XML">
|
||||
<option name="FORCE_REARRANGE_MODE" value="1" />
|
||||
<indentOptions>
|
||||
<option name="CONTINUATION_INDENT_SIZE" value="4" />
|
||||
</indentOptions>
|
||||
<arrangement>
|
||||
<rules>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>xmlns:android</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>xmlns:.*</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
<order>BY_NAME</order>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>.*:id</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>.*:name</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>name</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>style</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>.*</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>^$</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
<order>BY_NAME</order>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>.*</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
<order>ANDROID_ATTRIBUTE_ORDER</order>
|
||||
</rule>
|
||||
</section>
|
||||
<section>
|
||||
<rule>
|
||||
<match>
|
||||
<AND>
|
||||
<NAME>.*</NAME>
|
||||
<XML_ATTRIBUTE />
|
||||
<XML_NAMESPACE>.*</XML_NAMESPACE>
|
||||
</AND>
|
||||
</match>
|
||||
<order>BY_NAME</order>
|
||||
</rule>
|
||||
</section>
|
||||
</rules>
|
||||
</arrangement>
|
||||
</codeStyleSettings>
|
||||
</code_scheme>
|
||||
</component>
|
||||
6
.idea/compiler.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel target="17" />
|
||||
</component>
|
||||
</project>
|
||||
18
.idea/deploymentTargetSelector.xml
generated
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="deploymentTargetSelector">
|
||||
<selectionStates>
|
||||
<SelectionState runConfigName="app">
|
||||
<option name="selectionMode" value="DROPDOWN" />
|
||||
<DropdownSelection timestamp="2025-08-08T09:42:40.742364300Z">
|
||||
<Target type="DEFAULT_BOOT">
|
||||
<handle>
|
||||
<DeviceId pluginId="PhysicalDevice" identifier="serial=6705124a" />
|
||||
</handle>
|
||||
</Target>
|
||||
</DropdownSelection>
|
||||
<DialogSelection />
|
||||
</SelectionState>
|
||||
</selectionStates>
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/encodings.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" defaultCharsetForPropertiesFiles="UTF-8">
|
||||
<file url="PROJECT" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
||||
33
.idea/gradle.xml
generated
Normal file
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="testRunner" value="CHOOSE_PER_TEST" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleJvm" value="jbr-17" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/app" />
|
||||
<option value="$PROJECT_DIR$/moduleLogin" />
|
||||
<option value="$PROJECT_DIR$/moduleUtil" />
|
||||
<option value="$PROJECT_DIR$/modulecircle" />
|
||||
<option value="$PROJECT_DIR$/modulemain" />
|
||||
<option value="$PROJECT_DIR$/modulenews" />
|
||||
<option value="$PROJECT_DIR$/moduleroom" />
|
||||
<option value="$PROJECT_DIR$/moduletablayout" />
|
||||
<option value="$PROJECT_DIR$/modulevocal" />
|
||||
<option value="$PROJECT_DIR$/modulevoice" />
|
||||
<option value="$PROJECT_DIR$/timcommon" />
|
||||
<option value="$PROJECT_DIR$/tuichat" />
|
||||
<option value="$PROJECT_DIR$/tuiconversation" />
|
||||
<option value="$PROJECT_DIR$/tuicore" />
|
||||
</set>
|
||||
</option>
|
||||
<option name="resolveExternalAnnotations" value="false" />
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
60
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
@@ -0,0 +1,60 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="ComposePreviewDimensionRespectsLimit" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="composableFile" value="true" />
|
||||
<option name="previewFile" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="ComposePreviewMustBeTopLevelFunction" enabled="true" level="ERROR" enabled_by_default="true">
|
||||
<option name="composableFile" value="true" />
|
||||
<option name="previewFile" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="ComposePreviewNeedsComposableAnnotation" enabled="true" level="ERROR" enabled_by_default="true">
|
||||
<option name="composableFile" value="true" />
|
||||
<option name="previewFile" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="ComposePreviewNotSupportedInUnitTestFiles" enabled="true" level="ERROR" enabled_by_default="true">
|
||||
<option name="composableFile" value="true" />
|
||||
<option name="previewFile" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="GlancePreviewDimensionRespectsLimit" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="composableFile" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="GlancePreviewMustBeTopLevelFunction" enabled="true" level="ERROR" enabled_by_default="true">
|
||||
<option name="composableFile" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="GlancePreviewNeedsComposableAnnotation" enabled="true" level="ERROR" enabled_by_default="true">
|
||||
<option name="composableFile" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="GlancePreviewNotSupportedInUnitTestFiles" enabled="true" level="ERROR" enabled_by_default="true">
|
||||
<option name="composableFile" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="JavadocDeclaration" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="ADDITIONAL_TAGS" value="data,description:" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PreviewAnnotationInFunctionWithParameters" enabled="true" level="ERROR" enabled_by_default="true">
|
||||
<option name="composableFile" value="true" />
|
||||
<option name="previewFile" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PreviewApiLevelMustBeValid" enabled="true" level="ERROR" enabled_by_default="true">
|
||||
<option name="composableFile" value="true" />
|
||||
<option name="previewFile" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PreviewDeviceShouldUseNewSpec" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
||||
<option name="composableFile" value="true" />
|
||||
<option name="previewFile" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PreviewFontScaleMustBeGreaterThanZero" enabled="true" level="ERROR" enabled_by_default="true">
|
||||
<option name="composableFile" value="true" />
|
||||
<option name="previewFile" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PreviewMultipleParameterProviders" enabled="true" level="ERROR" enabled_by_default="true">
|
||||
<option name="composableFile" value="true" />
|
||||
<option name="previewFile" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PreviewPickerAnnotation" enabled="true" level="ERROR" enabled_by_default="true">
|
||||
<option name="composableFile" value="true" />
|
||||
<option name="previewFile" value="true" />
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
||||
6
.idea/kotlinc.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="KotlinJpsPluginSettings">
|
||||
<option name="version" value="1.9.24" />
|
||||
</component>
|
||||
</project>
|
||||
10
.idea/migrations.xml
generated
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectMigrations">
|
||||
<option name="MigrateToGradleLocalJavaHome">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
55
.idea/misc.xml
generated
Normal file
@@ -0,0 +1,55 @@
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="NullableNotNullManager">
|
||||
<option name="myDefaultNullable" value="androidx.annotation.Nullable" />
|
||||
<option name="myDefaultNotNull" value="androidx.annotation.NonNull" />
|
||||
<option name="myNullables">
|
||||
<value>
|
||||
<list size="15">
|
||||
<item index="0" class="java.lang.String" itemvalue="org.jspecify.annotations.Nullable" />
|
||||
<item index="1" class="java.lang.String" itemvalue="com.android.annotations.Nullable" />
|
||||
<item index="2" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNullable" />
|
||||
<item index="3" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableDecl" />
|
||||
<item index="4" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
|
||||
<item index="5" class="java.lang.String" itemvalue="androidx.annotation.Nullable" />
|
||||
<item index="6" class="java.lang.String" itemvalue="org.eclipse.jdt.annotation.Nullable" />
|
||||
<item index="7" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
|
||||
<item index="8" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
|
||||
<item index="9" class="java.lang.String" itemvalue="jakarta.annotation.Nullable" />
|
||||
<item index="10" class="java.lang.String" itemvalue="javax.annotation.CheckForNull" />
|
||||
<item index="11" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
|
||||
<item index="12" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.Nullable" />
|
||||
<item index="13" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableType" />
|
||||
<item index="14" class="java.lang.String" itemvalue="android.annotation.Nullable" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
<option name="myNotNulls">
|
||||
<value>
|
||||
<list size="15">
|
||||
<item index="0" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNonNull" />
|
||||
<item index="1" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.NonNull" />
|
||||
<item index="2" class="java.lang.String" itemvalue="org.jspecify.annotations.NonNull" />
|
||||
<item index="3" class="java.lang.String" itemvalue="jakarta.annotation.Nonnull" />
|
||||
<item index="4" class="java.lang.String" itemvalue="androidx.annotation.NonNull" />
|
||||
<item index="5" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullType" />
|
||||
<item index="6" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
|
||||
<item index="7" class="java.lang.String" itemvalue="com.android.annotations.NonNull" />
|
||||
<item index="8" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
|
||||
<item index="9" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullDecl" />
|
||||
<item index="10" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
|
||||
<item index="11" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
|
||||
<item index="12" class="java.lang.String" itemvalue="org.eclipse.jdt.annotation.NonNull" />
|
||||
<item index="13" class="java.lang.String" itemvalue="android.annotation.NonNull" />
|
||||
<item index="14" class="java.lang.String" itemvalue="lombok.NonNull" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
<option name="id" value="Android" />
|
||||
</component>
|
||||
</project>
|
||||
17
.idea/runConfigurations.xml
generated
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RunConfigurationProducerService">
|
||||
<option name="ignoredProducers">
|
||||
<set>
|
||||
<option value="com.intellij.execution.junit.AbstractAllInDirectoryConfigurationProducer" />
|
||||
<option value="com.intellij.execution.junit.AllInPackageConfigurationProducer" />
|
||||
<option value="com.intellij.execution.junit.PatternConfigurationProducer" />
|
||||
<option value="com.intellij.execution.junit.TestInClassConfigurationProducer" />
|
||||
<option value="com.intellij.execution.junit.UniqueIdConfigurationProducer" />
|
||||
<option value="com.intellij.execution.junit.testDiscovery.JUnitTestDiscoveryConfigurationProducer" />
|
||||
<option value="org.jetbrains.kotlin.idea.junit.KotlinJUnitRunConfigurationProducer" />
|
||||
<option value="org.jetbrains.kotlin.idea.junit.KotlinPatternConfigurationProducer" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
1
app/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/build
|
||||
166
app/build.gradle
Normal file
@@ -0,0 +1,166 @@
|
||||
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 33
|
||||
versionCode Integer.parseInt(project.findProperty("APP_VERSION_CODE"))
|
||||
versionName project.findProperty("APP_VERSION_NAME")
|
||||
multiDexEnabled true
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
ndk {
|
||||
//设置支持的so库
|
||||
abiFilters 'arm64-v8a' ,'armeabi'
|
||||
// abiFilters 'armeabi-v7a', 'arm64-v8a'
|
||||
}
|
||||
|
||||
javaCompileOptions {
|
||||
annotationProcessorOptions {
|
||||
arguments = [
|
||||
AROUTER_MODULE_NAME: project.getName()
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
// signingConfig signingConfigs.release
|
||||
// proguardFiles 'proguard-rules.pro'
|
||||
|
||||
}
|
||||
|
||||
|
||||
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 {
|
||||
debuggable true
|
||||
minifyEnabled true
|
||||
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_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
buildFeatures {
|
||||
dataBinding true
|
||||
}
|
||||
dataBinding {
|
||||
enabled = true
|
||||
}
|
||||
packagingOptions {
|
||||
exclude 'META-INF/gradle/incremental.annotation.processors'
|
||||
exclude 'META-INF/LICENSE.txt'
|
||||
exclude 'META-INF/NOTICE.txt'
|
||||
// exclude 'lib/arm64-v8a/libagora-ffmpeg.so'
|
||||
// exclude 'lib/arm64-v8a/libagora-fdkaac.so'
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = '17'
|
||||
}
|
||||
dexOptions {
|
||||
dexInProcess true
|
||||
preDexLibraries true
|
||||
javaMaxHeapSize "6g"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
|
||||
// implementation fileTree(dir: '../LocalAar/aar_libs', include: ['*.jar', '*.aar'] dir: 'libs')
|
||||
|
||||
implementation libs.appcompat
|
||||
implementation libs.material
|
||||
implementation libs.activity
|
||||
implementation libs.constraintlayout
|
||||
|
||||
testImplementation libs.junit
|
||||
androidTestImplementation libs.ext.junit
|
||||
androidTestImplementation libs.espresso.core
|
||||
|
||||
|
||||
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')
|
||||
|
||||
implementation files('libs/WbCloudFaceLiveSdk-face-v6.6.2-8e4718fc.aar')
|
||||
implementation files('libs/WbCloudNormal-v5.1.10-4e3e198.aar')
|
||||
|
||||
|
||||
implementation (libs.arouter.api.v150)
|
||||
//annotationProcessor
|
||||
annotationProcessor libs.arouter.compiler
|
||||
implementation project(':modulevocal') // 必须
|
||||
annotationProcessor project(':modulevocal') // 关键!
|
||||
|
||||
api project(":moduleUtil")
|
||||
api project(":moduleLogin")
|
||||
implementation project(':modulemain')
|
||||
|
||||
//aar的名称,例如:WbCloudFaceLiveSdk-v6.0.0-1234567.aar,填入'WbCloudFaceLiveSdk-v6.0.0-1234567'
|
||||
// implementation(name: 'WbCloudFaceLiveSdk-face-v6.6.2-8e4718fc', ext: 'aar')
|
||||
////2. 云normal SDK,
|
||||
////aar的名称,例如:WbCloudNormal-v5.1.10-123456789.aar,填入 'WbCloudNormal-v5.1.10-123456789.aar'
|
||||
// implementation(name: 'WbCloudNormal-v5.1.10-4e3e198', ext: 'aar')
|
||||
}
|
||||
BIN
app/certificate.cer
Normal file
BIN
app/libs/WbCloudFaceLiveSdk-face-v6.6.2-8e4718fc.aar
Normal file
BIN
app/libs/WbCloudNormal-v5.1.10-4e3e198.aar
Normal file
BIN
app/libs/logger-2.2.2-release.aar
Normal file
BIN
app/libs/main-2.2.3-release.aar
Normal file
15
app/lint-baseline.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<issues format="6" by="lint 8.8.0" type="baseline" client="gradle" dependencies="false" name="AGP (8.8.0)" variant="fatal" version="8.8.0">
|
||||
|
||||
<issue
|
||||
id="ExpiredTargetSdkVersion"
|
||||
message="Google Play requires that apps target API level 33 or higher."
|
||||
errorLine1=" targetSdk 28"
|
||||
errorLine2=" ~~~~~~~~~~~~">
|
||||
<location
|
||||
file="build.gradle"
|
||||
line="13"
|
||||
column="9"/>
|
||||
</issue>
|
||||
|
||||
</issues>
|
||||
BIN
app/my-release-key.jks
Normal file
BIN
app/my-release-key.jks.old
Normal file
900
app/proguard-rules.pro
vendored
Normal file
@@ -0,0 +1,900 @@
|
||||
# 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.**{*;}
|
||||
|
||||
-keep class com.alibaba.sdk.android.oss.** { *; }
|
||||
-dontwarn okio.**
|
||||
-dontwarn org.apache.commons.codec.binary.**
|
||||
|
||||
|
||||
-keep class com.tencent.mm.opensdk.** {
|
||||
|
||||
*;
|
||||
|
||||
}
|
||||
|
||||
-keep class com.tencent.wxop.** {
|
||||
|
||||
*;
|
||||
|
||||
}
|
||||
|
||||
-keep class com.tencent.mm.sdk.** {
|
||||
|
||||
*;
|
||||
|
||||
}
|
||||
|
||||
# 避免删除代码逻辑
|
||||
-dontshrink
|
||||
-dontoptimize
|
||||
# 避免混淆 TUIKit
|
||||
-keep class com.tencent.qcloud.** { *; }
|
||||
-keep class com.tencent.imsdk.** { *; }
|
||||
-keep class * implements com.tencent.qcloud.tuicore.interfaces.TUIInitializer {}
|
||||
|
||||
######################云刷脸混淆规则 faceverify-BEGIN#######################
|
||||
####
|
||||
#不混淆内部类
|
||||
-keepattributes InnerClasses
|
||||
|
||||
#不混淆jni调用类
|
||||
-keepclasseswithmembers class *{
|
||||
native <methods>;
|
||||
}
|
||||
|
||||
###################### faceverify-BEGIN ###########################
|
||||
-ignorewarnings
|
||||
-keep public class com.tencent.ytcommon.**{*;}
|
||||
-keep class com.tencent.turingfd.sdk.mfa.TNative$aa { public *; }
|
||||
-keep class com.tencent.turingfd.sdk.mfa.TNative$aa$bb { public *;}
|
||||
-keep class com.tencent.turingcam.** {*;}
|
||||
-keep class com.tencent.turingfd.** {*;}
|
||||
|
||||
-keep public class com.tencent.youtu.ytagreflectlivecheck.jni.**{*;}
|
||||
-keep public class com.tencent.youtu.ytagreflectlivecheck.YTAGReflectLiveCheckInterface{
|
||||
public <methods>;
|
||||
}
|
||||
-keep public class com.tencent.youtu.ytposedetect.jni.**{*;}
|
||||
-keep public class com.tencent.youtu.ytposedetect.data.**{*;}
|
||||
-keep public class com.tencent.youtu.liveness.YTFaceTracker{*;}
|
||||
-keep public class com.tencent.youtu.liveness.YTFaceTracker$*{*;}
|
||||
|
||||
-keep public class com.tencent.cloud.huiyansdkface.facelight.net.*$*{
|
||||
*;
|
||||
}
|
||||
-keep public class com.tencent.cloud.huiyansdkface.facelight.net.**{
|
||||
*;
|
||||
}
|
||||
-keep public class com.tencent.cloud.huiyansdkface.facelight.config.cdn.WbUiTips{
|
||||
*;
|
||||
}
|
||||
|
||||
#================数据上报混淆规则 start===========================
|
||||
#实体类
|
||||
-keep class com.tencent.cloud.huiyansdkface.analytics.EventSender{
|
||||
*;
|
||||
}
|
||||
-keep class com.tencent.cloud.huiyansdkface.analytics.EventSender$*{
|
||||
*;
|
||||
}
|
||||
-keep class com.tencent.cloud.huiyansdkface.analytics.WBSAEvent{
|
||||
*;
|
||||
}
|
||||
-keep class com.tencent.cloud.huiyansdkface.analytics.WBSAParam{
|
||||
*;
|
||||
}
|
||||
#================数据上报混淆规则 end===========================
|
||||
|
||||
#######################faceverify-END#############################
|
||||
|
||||
####################### normal混淆规则-BEGIN#############################
|
||||
#不混淆内部类
|
||||
-keepattributes InnerClasses
|
||||
-keepattributes *Annotation*
|
||||
-keepattributes Signature
|
||||
-keepattributes Exceptions
|
||||
|
||||
-keep public class com.tencent.cloud.huiyansdkface.normal.net.*$*{
|
||||
*;
|
||||
}
|
||||
-keep public class com.tencent.cloud.huiyansdkface.normal.net.*{
|
||||
*;
|
||||
}
|
||||
#bugly
|
||||
-keep class com.tencent.bugly.idasc.**{
|
||||
*;
|
||||
}
|
||||
#wehttp混淆规则
|
||||
-dontwarn com.tencent.cloud.huiyansdkface.okio.**
|
||||
-keep class com.tencent.cloud.huiyansdkface.okio.**{
|
||||
*;
|
||||
}
|
||||
-dontwarn com.tencent.cloud.huiyansdkface.okhttp3.OkHttpClient$Builder
|
||||
|
||||
####################### normal混淆规则-END#############################
|
||||
|
||||
# 保留 BaseModel 和其子类的字段名
|
||||
-keep class com.qxcm.moduleutil.http.BaseModel { *; }
|
||||
-keep class com.qxcm.moduleutil.bean.** { *; }
|
||||
|
||||
# 保留所有作为 API 响应体的类
|
||||
-keep class com.qxcm.moduleutil.bean.**.*Response { *; }
|
||||
|
||||
# 保留 Gson 使用的字段
|
||||
-keepclassmembers class * {
|
||||
@com.google.gson.annotations.SerializedName <fields>;
|
||||
}
|
||||
|
||||
# 避免 Retrofit 接口被混淆
|
||||
-keep interface com.qxcm.moduleutil.http.ApiServer { *; }
|
||||
|
||||
# 保留 retrofit 相关类
|
||||
-keep class retrofit2.** { *; }
|
||||
-keep class okhttp3.** { *; }
|
||||
|
||||
-keep class com.qxcm.moduleutil.utils.location.** { *; }
|
||||
-keep class io.agora.**{*;}
|
||||
910322
app/proguard/mapping.txt
Normal file
266591
app/proguard/seeds.txt
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": 6,
|
||||
"versionName": "1.0.5",
|
||||
"outputFile": "羽声_1.0.5_6.apk"
|
||||
}
|
||||
],
|
||||
"elementType": "File",
|
||||
"baselineProfiles": [
|
||||
{
|
||||
"minApi": 28,
|
||||
"maxApi": 30,
|
||||
"baselineProfiles": [
|
||||
"baselineProfiles/1/羽声_1.0.5_6.dm"
|
||||
]
|
||||
},
|
||||
{
|
||||
"minApi": 31,
|
||||
"maxApi": 2147483647,
|
||||
"baselineProfiles": [
|
||||
"baselineProfiles/0/羽声_1.0.5_6.dm"
|
||||
]
|
||||
}
|
||||
],
|
||||
"minSdkVersionForDexing": 24
|
||||
}
|
||||
37
app/release/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": 20,
|
||||
"versionName": "1.0.2.8",
|
||||
"outputFile": "羽声_1.0.2.8_20.apk"
|
||||
}
|
||||
],
|
||||
"elementType": "File",
|
||||
"baselineProfiles": [
|
||||
{
|
||||
"minApi": 28,
|
||||
"maxApi": 30,
|
||||
"baselineProfiles": [
|
||||
"baselineProfiles/1/羽声_1.0.2.8_20.dm"
|
||||
]
|
||||
},
|
||||
{
|
||||
"minApi": 31,
|
||||
"maxApi": 2147483647,
|
||||
"baselineProfiles": [
|
||||
"baselineProfiles/0/羽声_1.0.2.8_20.dm"
|
||||
]
|
||||
}
|
||||
],
|
||||
"minSdkVersionForDexing": 24
|
||||
}
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
221
app/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1,221 @@
|
||||
<?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 -->
|
||||
<!-- Features -->
|
||||
<uses-feature
|
||||
android:name="android.hardware.telephony"
|
||||
android:required="false" />
|
||||
<uses-feature
|
||||
android:name="android.hardware.camera"
|
||||
android:required="false" />
|
||||
|
||||
<!-- <uses-permission android:name="android.permission.READ_PHONE_STATE" />-->
|
||||
|
||||
<!-- <uses-permission-->
|
||||
<!-- android:name="android.permission.GET_ACCOUNTS"-->
|
||||
<!-- tools:node="remove" />-->
|
||||
<!-- <uses-permission-->
|
||||
<!-- android:name="android.permission.CALL_PHONE"-->
|
||||
<!-- tools:node="remove" />-->
|
||||
<!-- <uses-permission-->
|
||||
<!-- android:name="android.permission.READ_LOGS"-->
|
||||
<!-- tools:node="remove" />-->
|
||||
<!-- <uses-permission-->
|
||||
<!-- android:name="android.permission.READ_CALL_LOG"-->
|
||||
<!-- tools:node="remove" />-->
|
||||
<!-- <uses-permission-->
|
||||
<!-- android:name="android.permission.WRITE_CALL_LOG"-->
|
||||
<!-- tools:node="remove" />-->
|
||||
<!-- <uses-permission-->
|
||||
<!-- android:name="android.permission.READ_SMS"-->
|
||||
<!-- tools:node="remove" />-->
|
||||
<!-- <uses-permission-->
|
||||
<!-- android:name="android.permission.SEND_SMS"-->
|
||||
<!-- tools:node="remove" />-->
|
||||
<!-- <uses-permission-->
|
||||
<!-- android:name="android.permission.WRITE_SMS"-->
|
||||
<!-- tools:node="remove" />-->
|
||||
<!-- <uses-permission-->
|
||||
<!-- android:name="android.permission.RECEIVE_SMS"-->
|
||||
<!-- tools:node="remove" />-->
|
||||
<!-- <uses-permission-->
|
||||
<!-- android:name="android.permission.RECEIVE_WAP_PUSH"-->
|
||||
<!-- tools:node="remove" />-->
|
||||
<!-- <uses-permission-->
|
||||
<!-- android:name="android.permission.RECEIVE_MMS"-->
|
||||
<!-- tools:node="remove" />-->
|
||||
<!-- <uses-permission-->
|
||||
<!-- android:name="android.permission.SEND_MMS"-->
|
||||
<!-- tools:node="remove" />-->
|
||||
<!-- <uses-permission-->
|
||||
<!-- android:name="android.permission.PROCESS_OUTGOING_CALLS"-->
|
||||
<!-- tools:node="remove" />-->
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
<!-- <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.WRITE_EXTERNAL_STORAGE" <-- 访问存储权限–>-->
|
||||
<!-- android:maxSdkVersion="32"-->
|
||||
<!-- />-->
|
||||
<!-- <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.CHANGE_NETWORK_STATE" />
|
||||
<!-- <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.READ_MEDIA_AUDIO"/>
|
||||
|
||||
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
|
||||
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO"/>
|
||||
|
||||
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
||||
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
|
||||
|
||||
<queries>
|
||||
<package android:name="com.tencent.mm" />
|
||||
</queries>
|
||||
|
||||
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"
|
||||
tools:ignore="ProtectedPermissions"/>
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.CAMERA"/>
|
||||
<!-- <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"-->
|
||||
<!-- android:required="false"-->
|
||||
<!-- android:maxSdkVersion="32"/>-->
|
||||
|
||||
|
||||
<!-- <uses-permission android:name="android.permission.BLUETOOTH"/>-->
|
||||
<!-- <uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/>-->
|
||||
|
||||
<!-- <uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" /> 自定义权限 -->
|
||||
<!-- <uses-permission android:name="android.permission.POST_NOTIFICATIONS" /> 自定义权限 -->
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" />
|
||||
<!-- <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" 读写系统安全设置-->
|
||||
<!-- tools:ignore="ProtectedPermissions" />-->
|
||||
|
||||
<!-- 声明前台服务权限 -->
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_CAMERA" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
|
||||
|
||||
<application
|
||||
android:name="AppContext"
|
||||
android:allowBackup="true"
|
||||
android:extractNativeLibs="true"
|
||||
android:largeHeap="true"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
android:fullBackupContent="@xml/backup_rules"
|
||||
android:requestLegacyExternalStorage="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme"
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
android:usesCleartextTraffic="true"
|
||||
tools:targetApi="tiramisu"
|
||||
tools:ignore="SelectedPhotoAccess"
|
||||
tools:replace="android:theme,android:allowBackup"
|
||||
android:enableOnBackInvokedCallback="true"
|
||||
android:requestRawExternalStorageAccess="true"
|
||||
>
|
||||
<activity
|
||||
android:name=".LaunchPageActivity"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||
android:exported="true"
|
||||
android:screenOrientation="behind"
|
||||
android:launchMode="singleTask">
|
||||
<intent-filter>
|
||||
<action android:name="com.example.action.LAUNCH_PAGE" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<!-- 配置APP ID -->
|
||||
<meta-data
|
||||
android:name="BUGLY_APPID"
|
||||
android:value="865cfe9555" />
|
||||
<!-- <!– 配置APP版本号 –>-->
|
||||
<!-- <meta-data-->
|
||||
<!-- android:name="BUGLY_APP_VERSION"-->
|
||||
<!-- android:value="<APP_Version>" />-->
|
||||
<!-- <!– 配置APP渠道号 –>-->
|
||||
<!-- <meta-data-->
|
||||
<!-- android:name="BUGLY_APP_CHANNEL"-->
|
||||
<!-- android:value="<APP_Channel>" />-->
|
||||
<!-- 配置Bugly调试模式(true或者false)-->
|
||||
<meta-data
|
||||
android:name="BUGLY_ENABLE_DEBUG"
|
||||
android:value="false" />
|
||||
|
||||
<activity
|
||||
android:name="com.mobile.auth.gatewayauth.LoginAuthActivity"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||
android:exported="false"
|
||||
android:launchMode="singleTask"
|
||||
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" />
|
||||
|
||||
<activity
|
||||
android:name=".wxapi.WXEntryActivity"
|
||||
android:theme="@android:style/Theme.Translucent.NoTitleBar"
|
||||
android:exported="true"
|
||||
android:taskAffinity="com.qxcm.qxlive"
|
||||
android:launchMode="singleTask">
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".RealNameActivity"
|
||||
android:exported="false" />
|
||||
|
||||
<activity
|
||||
android:name=".PasswordLoginActivity"
|
||||
android:exported="true" />
|
||||
</application>
|
||||
<!-- <queries>-->
|
||||
<!-- <!– 支付宝 scheme –>-->
|
||||
<!-- <intent>-->
|
||||
<!-- <action android:name="android.intent.action.VIEW" />-->
|
||||
<!-- <data android:scheme="alipays" />-->
|
||||
<!-- </intent>-->
|
||||
|
||||
<!-- <!– 微信 scheme –>-->
|
||||
<!-- <intent>-->
|
||||
<!-- <action android:name="android.intent.action.VIEW" />-->
|
||||
<!-- <data android:scheme="weixin" />-->
|
||||
<!-- </intent>-->
|
||||
<!-- </queries>-->
|
||||
|
||||
</manifest>
|
||||
BIN
app/src/main/assets/ripple.svga
Normal file
BIN
app/src/main/ic_launcher-playstore.png
Normal file
|
After Width: | Height: | Size: 223 KiB |
105
app/src/main/java/com/qxcm/qxlive/AppContext.java
Normal file
@@ -0,0 +1,105 @@
|
||||
package com.qxcm.qxlive;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.blankj.utilcode.util.ServiceUtils;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.qxcm.moduleutil.base.CommonAppContext;
|
||||
import com.qxcm.moduleutil.service.MyMqttService;
|
||||
|
||||
|
||||
/**
|
||||
* Created by cxf on 2017/8/3.
|
||||
*/
|
||||
|
||||
public class AppContext extends CommonAppContext {
|
||||
|
||||
private boolean mBeautyInited;
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
ToastUtils.init(this);
|
||||
ARouter.init(this);
|
||||
|
||||
/* mqttClient = MyMQTTClient.getInstance(this);
|
||||
mqttClient.initialize("tcp://81.70.45.221:1883");
|
||||
new Thread(() -> {
|
||||
boolean connected = mqttClient.connect();
|
||||
runOnUiThread(() -> {
|
||||
if (connected) {
|
||||
} else {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort("MQTT连接失败");
|
||||
}
|
||||
});
|
||||
}).start();*/
|
||||
|
||||
// ToastUtils.setInterceptor(new IToastInterceptor() {
|
||||
// @Override
|
||||
// public boolean intercept(CharSequence charSequence) {
|
||||
// return !CommonAppContext.getInstance().isFront();
|
||||
// }
|
||||
// });
|
||||
// L.setDeBug(BuildConfig.DEBUG);
|
||||
}
|
||||
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();
|
||||
}
|
||||
|
||||
}
|
||||
20
app/src/main/java/com/qxcm/qxlive/LaunchContacter.java
Normal file
@@ -0,0 +1,20 @@
|
||||
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 {
|
||||
|
||||
void oauthLogin(String login_token);
|
||||
|
||||
void address_ip(String address_ip);
|
||||
}
|
||||
}
|
||||
349
app/src/main/java/com/qxcm/qxlive/LaunchPageActivity.java
Normal file
@@ -0,0 +1,349 @@
|
||||
package com.qxcm.qxlive;
|
||||
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.qxcm.moduleutil.activity.BaseMvpActivity;
|
||||
import com.qxcm.moduleutil.dialog.PolicyDialog;
|
||||
import com.qxcm.moduleutil.utils.SpUtil;
|
||||
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 = true;
|
||||
private String city1="";
|
||||
@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, 2500);
|
||||
// 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() {
|
||||
// EventBus.getDefault().register(this);
|
||||
// initQuickLogin();
|
||||
// checkOnePass();
|
||||
|
||||
startActivity(new Intent(this, PasswordLoginActivity.class));
|
||||
finish();
|
||||
//
|
||||
}
|
||||
|
||||
// private void checkOnePass() {
|
||||
// if (!TextUtils.isEmpty(AppContext.getInstance().getToken()) && !TextUtils.isEmpty(AppContext.getInstance().getUser().getTencent_im())) {
|
||||
// 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()) || TextUtils.isEmpty(AppContext.getInstance().getUser().getTencent_im())) {
|
||||
// Logger.e("SplashEnd", "ARouters.CODE_LOGIN");
|
||||
// if (canOnePass) {
|
||||
// phoneNumberAuthHelper.setAuthListener(tokenResultListener);
|
||||
// doOnePass();
|
||||
// } else {
|
||||
// go2Login();
|
||||
// }
|
||||
// } else {
|
||||
// Logger.e("SplashEnd", "ARouters.MAIN");
|
||||
//
|
||||
// UserBean userBean = CommonAppContext.getInstance().getUser();
|
||||
//
|
||||
//// TUILogin.login(getBaseContext(), CommonAppContext.getInstance().getCurrentEnvironment().getSdkAppId(), "u"+userBean.getUser_id(), userBean.getTencent_im(), new TUICallback() {
|
||||
//// @Override
|
||||
//// public void onError(final int code, final String desc) {
|
||||
//// LogUtils.e("@@@",code,"描述:",desc);
|
||||
//// }
|
||||
//// @Override
|
||||
//// public void onSuccess() {
|
||||
//// LogUtils.e("@@@","成功");
|
||||
////
|
||||
//// }
|
||||
//// });
|
||||
// if (userBean.getSex() == 0) {
|
||||
// Intent intent = new Intent(this, ImproveInfoActivity.class);
|
||||
// Bundle bundle = new Bundle();
|
||||
// bundle.putSerializable("userBean", userBean);
|
||||
// intent.putExtras(bundle);
|
||||
// startActivity(intent);
|
||||
// } else {
|
||||
// EventBus.getDefault().post(userBean);
|
||||
// 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("《用户协议》", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl()+"/api/Page/page_show?id=6")
|
||||
// .setAppPrivacyTwo("《隐私协议》", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl()+"/api/Page/page_show?id=4")
|
||||
// .setAppPrivacyColor(Color.parseColor("#A8A8A8"), Color.parseColor("#FFBC00"))
|
||||
// .setPrivacyBefore("登录即代表同意")
|
||||
// .setPrivacyEnd("并授权获得号码")
|
||||
// .setPrivacyTextSize(11)
|
||||
// .setPrivacyAlertContentVerticalMargin(20)
|
||||
// .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();
|
||||
// LogUtils.e("@@@",tokenRet.getToken());
|
||||
// MvpPre.oauthLogin(tokenRet.getToken());
|
||||
// }
|
||||
// } 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(), null);
|
||||
// phoneNumberAuthHelper.getReporter().setLoggerEnable(true);
|
||||
//// phoneNumberAuthHelper.setAuthSDKInfo("6rdWuz058oq5OahdbFiGEybUcdahd12J83L34Uc7MrPIrxtFG+rXiwDvRcqNvjwbClbbmvMrmxKVkIysFByBsl0Qe9kqd2w8T/nhK5G6eXXlk2V9AjYCieIU+jRnjZBB+Cfechr6rCGJ2aeBARIsXcRPW7wm9WFK9euh5T+v6Pyte68yNaNdcYCll3+U4/uCEog7HygCnMIbAU+kqoPdmn2H+51YOHW+VsnsHd4w1+I3f8Tt0xLIXGM4GWnQueZ5GR46GTWiSYMy8dCIh9SPIMRyC91GosVcfGPMJSdcXqc=");
|
||||
// phoneNumberAuthHelper.setAuthSDKInfo(((AppContext) getApplication()).getCurrentEnvironment().getALI_AUTH_KEY());
|
||||
// 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);
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
|
||||
// super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||
//
|
||||
// if (requestCode == 1001) {
|
||||
// LocationProvider provider = LocationServiceFactory.createBestProvider(this);
|
||||
// provider.getLastKnownLocation(this, new LocationProvider.LocationCallback() {
|
||||
// @Override
|
||||
// public void onLocationReceived(double latitude, double longitude, String city) {
|
||||
// ToastUtils.showShort("当前位置:" + city);
|
||||
// city1=city;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onFailed(String errorMessage) {
|
||||
// ToastUtils.showShort("定位失败");
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
if (!this.isTaskRoot()) {
|
||||
Intent intent = getIntent();
|
||||
if (intent != null) {
|
||||
String action = intent.getAction();
|
||||
if (intent.hasCategory(Intent.CATEGORY_LAUNCHER) && Intent.ACTION_MAIN.equals(action)) {
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
100
app/src/main/java/com/qxcm/qxlive/LaunchPresenter.java
Normal file
@@ -0,0 +1,100 @@
|
||||
package com.qxcm.qxlive;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.blankj.utilcode.util.ToastUtils;
|
||||
import com.qxcm.modulelogin.activity.ImproveInfoActivity;
|
||||
import com.qxcm.modulelogin.activity.SwitchAccountsActivity;
|
||||
import com.qxcm.modulemain.activity.MainActivity;
|
||||
import com.qxcm.moduleutil.activity.IPresenter;
|
||||
import com.qxcm.moduleutil.base.CommonAppContext;
|
||||
import com.qxcm.moduleutil.bean.UserBean;
|
||||
import com.qxcm.moduleutil.http.BaseObserver;
|
||||
import com.qxcm.moduleutil.presenter.BasePresenter;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
public class LaunchPresenter extends BasePresenter<LaunchContacter.View> implements LaunchContacter.ILoginPre {
|
||||
|
||||
public LaunchPresenter(LaunchContacter.View view, Context context) {
|
||||
super(view, context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void oauthLogin(String login_token) {
|
||||
api.oauthLogin(login_token, new BaseObserver<List<UserBean>>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(List<UserBean> userBeans) {
|
||||
loginSuccess(userBeans);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void address_ip(String address_ip) {
|
||||
api.address_ip(address_ip, new BaseObserver<String>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
// addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void loginSuccess(List<UserBean> userBean) {
|
||||
if (userBean==null) {
|
||||
ToastUtils.showShort("登录失败请重试");
|
||||
return;
|
||||
}
|
||||
if (userBean.size()==1) {
|
||||
|
||||
CommonAppContext.getInstance().setUser(userBean.get(0));
|
||||
|
||||
// PreferencesUtils.putString( CommonAppContext.getInstance(), "mobile", userBean.get());
|
||||
|
||||
if (isViewAttach()) {
|
||||
// MvpRef.get().disLoadings();
|
||||
}
|
||||
if (userBean.get(0).getSex() == 0) {
|
||||
try {
|
||||
Intent intent = new Intent(com.blankj.utilcode.util.ActivityUtils.getTopActivity(), ImproveInfoActivity.class);
|
||||
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putSerializable("userBean", userBean.get(0));
|
||||
intent.putExtras(bundle);
|
||||
com.blankj.utilcode.util.ActivityUtils.startActivity(intent);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
com.blankj.utilcode.util.ActivityUtils.startActivity(MainActivity.class);
|
||||
}
|
||||
}else {
|
||||
Intent intent=new Intent(com.blankj.utilcode.util.ActivityUtils.getTopActivity(), SwitchAccountsActivity.class);
|
||||
Bundle bundle=new Bundle();
|
||||
bundle.putSerializable("userBean", userBean.get(0));
|
||||
intent.putExtras(bundle);
|
||||
com.blankj.utilcode.util.ActivityUtils.startActivity(intent);
|
||||
|
||||
}
|
||||
EventBus.getDefault().post(userBean);
|
||||
// EventBus.getDefault().post(new SplashFinishEvent());
|
||||
// AppLog.setUserUniqueID(userBean.getUser_id()); // 设置您自己的账号体系ID, 并保证其唯一性 !
|
||||
}
|
||||
}
|
||||
607
app/src/main/java/com/qxcm/qxlive/PasswordLoginActivity.java
Normal file
@@ -0,0 +1,607 @@
|
||||
package com.qxcm.qxlive;
|
||||
|
||||
import static android.view.View.VISIBLE;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.CountDownTimer;
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.text.method.PasswordTransformationMethod;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alipay.sdk.app.AuthTask;
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.blankj.utilcode.util.ThreadUtils;
|
||||
import com.hjq.toast.ToastUtils;
|
||||
import com.mobile.auth.gatewayauth.AuthUIConfig;
|
||||
import com.mobile.auth.gatewayauth.PhoneNumberAuthHelper;
|
||||
import com.mobile.auth.gatewayauth.PreLoginResultListener;
|
||||
import com.mobile.auth.gatewayauth.TokenResultListener;
|
||||
import com.mobile.auth.gatewayauth.model.TokenRet;
|
||||
import com.qxcm.modulelogin.activity.ImproveInfoActivity;
|
||||
import com.qxcm.modulelogin.even.LoginFinishEvent;
|
||||
import com.qxcm.modulelogin.present.LoginContacter;
|
||||
import com.qxcm.modulelogin.present.LoginPresenter;
|
||||
import com.qxcm.modulemain.activity.MainActivity;
|
||||
import com.qxcm.moduleutil.activity.BaseMvpActivity;
|
||||
import com.qxcm.moduleutil.base.CommonAppContext;
|
||||
import com.qxcm.moduleutil.bean.UserBean;
|
||||
import com.qxcm.moduleutil.utils.BarUtils;
|
||||
import com.qxcm.moduleutil.utils.PreferencesUtils;
|
||||
import com.qxcm.moduleutil.utils.logger.Logger;
|
||||
import com.qxcm.qxlive.databinding.ActivityPasswordLoginBinding;
|
||||
import com.tencent.mm.opensdk.modelbase.BaseResp;
|
||||
import com.tencent.mm.opensdk.modelmsg.SendAuth;
|
||||
import com.tencent.mm.opensdk.openapi.IWXAPI;
|
||||
import com.tencent.mm.opensdk.openapi.WXAPIFactory;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class PasswordLoginActivity extends BaseMvpActivity<LoginPresenter, ActivityPasswordLoginBinding> implements LoginContacter.View, View.OnClickListener {
|
||||
|
||||
private CountDownTimer mTimer;
|
||||
public String mobile;
|
||||
private int type;//1:验证码登录2:密码登录
|
||||
boolean isPasswordVisible = false;
|
||||
public PhoneNumberAuthHelper phoneNumberAuthHelper;
|
||||
private TokenResultListener tokenResultListener;
|
||||
private boolean canOnePass;
|
||||
@Override
|
||||
protected void initData() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_password_login;
|
||||
}
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
// EventBus.getDefault().register(this);
|
||||
// AppLogUtil.reportAppLog(AppLogEvent.A0101);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
EventBus.getDefault().unregister(this);
|
||||
if (phoneNumberAuthHelper!=null) {
|
||||
phoneNumberAuthHelper.hideLoginLoading();
|
||||
//获取成功 dimiss就去登录、登录成功
|
||||
phoneNumberAuthHelper.quitLoginPage();
|
||||
}
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void finishEvent(LoginFinishEvent event) {
|
||||
finish();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
|
||||
initQuickLogin();
|
||||
checkOnePass();
|
||||
|
||||
BarUtils.setStatusBarAlpha(this, 0);
|
||||
mBinding.edPhone.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
setUpLoginBtn();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
|
||||
}
|
||||
});
|
||||
mBinding.edPhone.setOnFocusChangeListener(new View.
|
||||
OnFocusChangeListener() {
|
||||
@Override
|
||||
public void onFocusChange(View v, boolean hasFocus) {
|
||||
if (mBinding.edPhone == null) {
|
||||
return;
|
||||
}
|
||||
if (hasFocus) {
|
||||
mBinding.relPhone.setSelected(true);
|
||||
} else {
|
||||
// 此处为失去焦点时的处理内容
|
||||
mBinding.relPhone.setSelected(false);
|
||||
}
|
||||
}
|
||||
});
|
||||
mBinding.edPhone.setText(PreferencesUtils.getString(CommonAppContext.getInstance(), "mobile"));
|
||||
if (!TextUtils.isEmpty(mobile)) {
|
||||
mBinding.edPhone.setText(mobile);
|
||||
}
|
||||
mBinding.tvCodeText.setOnClickListener(this::onClick);
|
||||
mBinding.flLogin.setOnClickListener(this::onClick);
|
||||
mBinding.tvYhxy.setOnClickListener(this::onClick);
|
||||
mBinding.tvYsxy.setOnClickListener(this::onClick);
|
||||
mBinding.ivZfb.setOnClickListener(this::onClick);
|
||||
mBinding.ivWeixin.setOnClickListener(this::onClick);
|
||||
mBinding.tvSendCode.setOnClickListener(this::onClick);
|
||||
mBinding.ivEye.setOnClickListener(this::onClick);
|
||||
|
||||
if (mBinding.tvCodeText.getText().equals("切换密码登录")){
|
||||
type=1;
|
||||
}else {
|
||||
type=2;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
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())) {
|
||||
|
||||
LogUtils.e("@@@",tokenRet.getToken());
|
||||
MvpPre.oauthLoginLogin(tokenRet.getToken());
|
||||
// phoneNumberAuthHelper.hideLoginLoading();
|
||||
// //获取成功 dimiss就去登录、登录成功
|
||||
// phoneNumberAuthHelper.quitLoginPage();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTokenFailed(String s) {
|
||||
Logger.e("onTokenFailed", s);
|
||||
ThreadUtils.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
phoneNumberAuthHelper.hideLoginLoading();
|
||||
phoneNumberAuthHelper.quitLoginPage();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
try {
|
||||
phoneNumberAuthHelper = PhoneNumberAuthHelper.getInstance(getApplicationContext(), null);
|
||||
phoneNumberAuthHelper.getReporter().setLoggerEnable(true);
|
||||
// phoneNumberAuthHelper.setAuthSDKInfo("6rdWuz058oq5OahdbFiGEybUcdahd12J83L34Uc7MrPIrxtFG+rXiwDvRcqNvjwbClbbmvMrmxKVkIysFByBsl0Qe9kqd2w8T/nhK5G6eXXlk2V9AjYCieIU+jRnjZBB+Cfechr6rCGJ2aeBARIsXcRPW7wm9WFK9euh5T+v6Pyte68yNaNdcYCll3+U4/uCEog7HygCnMIbAU+kqoPdmn2H+51YOHW+VsnsHd4w1+I3f8Tt0xLIXGM4GWnQueZ5GR46GTWiSYMy8dCIh9SPIMRyC91GosVcfGPMJSdcXqc=");
|
||||
phoneNumberAuthHelper.setAuthSDKInfo(((CommonAppContext) getApplication()).getCurrentEnvironment().getALI_AUTH_KEY());
|
||||
phoneNumberAuthHelper.checkEnvAvailable(2);
|
||||
|
||||
} catch (Throwable ignored) {
|
||||
Logger.e("initAuthSDK", ignored);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void checkOnePass() {
|
||||
if (!TextUtils.isEmpty(CommonAppContext.getInstance().getToken()) && !TextUtils.isEmpty(CommonAppContext.getInstance().getUser().getTencent_im())) {
|
||||
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 (!PasswordLoginActivity.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(CommonAppContext.getInstance().getToken()) || TextUtils.isEmpty(CommonAppContext.getInstance().getUser().getTencent_im())) {
|
||||
Logger.e("SplashEnd", "ARouters.CODE_LOGIN");
|
||||
if (canOnePass) {
|
||||
phoneNumberAuthHelper.setAuthListener(tokenResultListener);
|
||||
doOnePass();
|
||||
} else {
|
||||
|
||||
}
|
||||
} else {
|
||||
Logger.e("SplashEnd", "ARouters.MAIN");
|
||||
|
||||
UserBean userBean = CommonAppContext.getInstance().getUser();
|
||||
|
||||
// TUILogin.login(getBaseContext(), CommonAppContext.getInstance().getCurrentEnvironment().getSdkAppId(), "u"+userBean.getUser_id(), userBean.getTencent_im(), new TUICallback() {
|
||||
// @Override
|
||||
// public void onError(final int code, final String desc) {
|
||||
// LogUtils.e("@@@",code,"描述:",desc);
|
||||
// }
|
||||
// @Override
|
||||
// public void onSuccess() {
|
||||
// LogUtils.e("@@@","成功");
|
||||
//
|
||||
// }
|
||||
// });
|
||||
if (userBean.getSex() == 0) {
|
||||
Intent intent = new Intent(this, ImproveInfoActivity.class);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putSerializable("userBean", userBean);
|
||||
intent.putExtras(bundle);
|
||||
startActivity(intent);
|
||||
} else {
|
||||
EventBus.getDefault().post(userBean);
|
||||
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("《用户协议》", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl()+"/api/Page/page_show?id=6")
|
||||
.setAppPrivacyTwo("《隐私协议》", CommonAppContext.getInstance().getCurrentEnvironment().getServerUrl()+"/api/Page/page_show?id=4")
|
||||
.setAppPrivacyColor(Color.parseColor("#A8A8A8"), Color.parseColor("#FFBC00"))
|
||||
.setPrivacyBefore("登录即代表同意")
|
||||
.setPrivacyEnd("并授权获得号码")
|
||||
.setPrivacyTextSize(11)
|
||||
.setPrivacyAlertContentVerticalMargin(20)
|
||||
.setPrivacyMargin(39)
|
||||
.setPrivacyState(true)
|
||||
.setCheckboxHidden(false)
|
||||
.setCheckedImgPath("ic_agreement_selected")
|
||||
.setUncheckedImgPath("ic_agreement_unselect")
|
||||
.setPrivacyOffsetX(2)
|
||||
.setVendorPrivacyPrefix("《")
|
||||
.setVendorPrivacySuffix("》")
|
||||
.setProtocolAction("com.qxcm.qxlive.PROTOCOL_WEBVIEW")//跳转到自定义的页面展示隐私协议
|
||||
.setPackageName("com.qxcm.qxlive")
|
||||
//全页面属性
|
||||
.setAuthPageActIn("in_activity", "out_activity")
|
||||
.setAuthPageActOut("in_activity", "out_activity")
|
||||
.setPageBackgroundPath("log_bj")
|
||||
.create();
|
||||
phoneNumberAuthHelper.setAuthUIConfig(authUIConfig);
|
||||
phoneNumberAuthHelper.getLoginToken(getApplicationContext(), 5000);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected LoginPresenter bindPresenter() {
|
||||
return new LoginPresenter(this, this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void showLoadings() {
|
||||
showLoading();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disLoadings() {
|
||||
disLoading();
|
||||
}
|
||||
|
||||
private void setUpLoginBtn() {
|
||||
String text = mBinding.edPhone.getText().toString();
|
||||
if (text.length() == 11) {
|
||||
mBinding.flLogin.setEnabled(true);
|
||||
mBinding.ivLoginBg.setAlpha(1f);
|
||||
} else {
|
||||
mBinding.ivLoginBg.setAlpha(0.3f);
|
||||
mBinding.flLogin.setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
int id = v.getId();
|
||||
if (id == R.id.tv_code_text) {
|
||||
// Intent intent = new Intent(this, LoginActivity.class);
|
||||
// intent.putExtra("mobile", mBinding.edPhone.getText().toString());
|
||||
// startActivity(intent);
|
||||
// finish();
|
||||
|
||||
if (mBinding.tvCodeText.getText().equals("切换密码登录")){
|
||||
mBinding.rlPassCode.setVisibility(VISIBLE);
|
||||
mBinding.rlCode.setVisibility(View.GONE);
|
||||
mBinding.tvCodeText.setText("切换验证码登录");
|
||||
mBinding.tvLoginText.setText("密码登录");
|
||||
type=2;
|
||||
}else {
|
||||
mBinding.rlPassCode.setVisibility(View.GONE);
|
||||
mBinding.rlCode.setVisibility(VISIBLE);
|
||||
mBinding.tvCodeText.setText("切换密码登录");
|
||||
mBinding.tvLoginText.setText("验证码登录");
|
||||
type=1;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else if (id == R.id.fl_login) {
|
||||
if (!mBinding.cbPrivacy.isChecked()) {
|
||||
ToastUtils.show("请先勾选服务条款");
|
||||
return;
|
||||
}
|
||||
String phone = mBinding.edPhone.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(phone)) {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort("请输入手机号");
|
||||
return;
|
||||
}
|
||||
if (type==1) {
|
||||
String code = mBinding.edPassword.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(code)) {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort("请输入验证码");
|
||||
return;
|
||||
}
|
||||
MvpPre.login(phone, "", code, 1);
|
||||
}else if (type==2) {
|
||||
String password = mBinding.edPasswordCode.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(password)) {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort("请输入密码");
|
||||
return;
|
||||
}
|
||||
MvpPre.login(phone, password, "", 2);
|
||||
}
|
||||
|
||||
} else if (id == R.id.tv_yhxy) {
|
||||
MvpPre.ysxl();
|
||||
} else if (id == R.id.tv_ysxy) {
|
||||
MvpPre.yhxy();
|
||||
} else if (id == R.id.iv_zfb) {
|
||||
if (!mBinding.cbPrivacy.isChecked()) {
|
||||
ToastUtils.show("请先勾选服务条款");
|
||||
return;
|
||||
}
|
||||
MvpPre.authorization("zfb");
|
||||
// MvpPre.authorization(SHARE_MEDIA.QQ);
|
||||
} else if (id == R.id.iv_weixin) {
|
||||
if (!mBinding.cbPrivacy.isChecked()) {
|
||||
ToastUtils.show("请先勾选服务条款");
|
||||
return;
|
||||
}
|
||||
// MvpPre.authorization("wx");
|
||||
wcLogin();
|
||||
} else if (id == R.id.tv_send_code) {
|
||||
String phone = mBinding.edPhone.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(phone)) {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort("请输入手机号");
|
||||
return;
|
||||
}
|
||||
sendCodeSuccess(phone);
|
||||
MvpPre.sendCode(phone, 1);
|
||||
}else if (id == R.id.iv_eye) {
|
||||
|
||||
if (!isPasswordVisible) {
|
||||
mBinding.edPassword.setInputType(android.text.InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD);
|
||||
mBinding.ivEye.setImageResource(com.qxcm.moduleutil.R.mipmap.eye_visible); // 设置按钮文本为隐藏密码
|
||||
} else {
|
||||
mBinding.edPassword.setInputType(android.text.InputType.TYPE_CLASS_TEXT | android.text.InputType.TYPE_TEXT_VARIATION_PASSWORD);
|
||||
mBinding.edPassword.setTransformationMethod(PasswordTransformationMethod.getInstance());
|
||||
mBinding.ivEye.setImageResource(com.qxcm.moduleutil.R.mipmap.eye_close); // 设置按钮文本为显示密码
|
||||
}
|
||||
mBinding.edPassword.setSelection(mBinding.edPassword.getText().length()); // 将光标移动到文字末尾
|
||||
isPasswordVisible = !isPasswordVisible; // 切换状态
|
||||
}
|
||||
}
|
||||
private void wcLogin() {
|
||||
//发起登陆请求前先注册微信api
|
||||
IWXAPI api = WXAPIFactory.createWXAPI(this,CommonAppContext.getInstance().getCurrentEnvironment().getWxAppId(),true);
|
||||
api.registerApp(CommonAppContext.getInstance().getCurrentEnvironment().getWxAppId());
|
||||
if (!api.isWXAppInstalled()){
|
||||
//todo 提醒未安装微信
|
||||
com.blankj.utilcode.util.ToastUtils.showShort("请安装微信客户端");
|
||||
return;
|
||||
}
|
||||
//开始发起登陆请求
|
||||
final SendAuth.Req req = new SendAuth.Req();
|
||||
req.scope = "snsapi_userinfo";
|
||||
req.state = "wechat_sdk_demo_test";
|
||||
api.sendReq(req);
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void loginEvent(BaseResp event) {
|
||||
if (event.errCode ==BaseResp.ErrCode.ERR_OK){
|
||||
SendAuth.Resp authResp = (SendAuth.Resp)event;
|
||||
LogUtils.e("@@@",authResp.code);
|
||||
MvpPre.oauthLogin(authResp.code,1);
|
||||
}
|
||||
}
|
||||
private void releaseTimer() {
|
||||
if (mTimer != null) {
|
||||
mTimer.cancel();
|
||||
mTimer = null;
|
||||
}
|
||||
}
|
||||
|
||||
public void sendCodeSuccess(String phoneNumber) {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort("短信验证码发送成功请注意查收");
|
||||
mBinding.tvSendCode.setEnabled(false);
|
||||
mBinding.tvSendCode.setAlpha(0.5f);
|
||||
releaseTimer();
|
||||
if (mTimer != null) {
|
||||
mTimer.cancel();
|
||||
}
|
||||
mTimer = new CountDownTimer(60000L, 1000L) {
|
||||
@Override
|
||||
public void onTick(long millisUntilFinished) {
|
||||
if (mBinding.tvSendCode != null) {
|
||||
mBinding.tvSendCode.setText(String.format("重新发送(%s)", millisUntilFinished / 1000));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish() {
|
||||
mBinding.tvSendCode.setAlpha(1f);
|
||||
mBinding.tvSendCode.setEnabled(true);
|
||||
mBinding.tvSendCode.setText("重新发送");
|
||||
}
|
||||
};
|
||||
mTimer.start();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendCodeSuccess1(String s) {
|
||||
LogUtils.e(s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loginSuccess(UserBean userBean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void authorizationSuccess(String s) {
|
||||
zfbLogin(s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ysxlSuccess(String s) {
|
||||
|
||||
}
|
||||
|
||||
private void zfbLogin(String s) {
|
||||
LogUtils.e("@@@",s);
|
||||
CommonAppContext.getInstance();
|
||||
if (!CommonAppContext.isAlipayInstalled(this)){
|
||||
com.blankj.utilcode.util.ToastUtils.showShort("请安装支付宝客户端");
|
||||
return;
|
||||
}
|
||||
String authInfo = s;
|
||||
// String authInfo = "apiname=com.alipay.account.auth&app_id=2021005152631691&app_name=yusheng&auth_type=AUTHACCOUNT&biz_type=openservice&method=alipay.open.auth.sdk.code.get&pid=2088170624624316&product_id=APP_FAST_LOGIN&scope=kuaijie&sign_type=RSA2&target_id=20141225xxxx&sign=fMcp4GtiM6rxSIeFnJCVePJKV43eXrUP86CQgiLhDHH2u%2FdN75eEvmywc2ulkm7qKRetkU9fbVZtJIqFdMJcJ9Yp%2BJI%2FF%2FpESafFR6rB2fRjiQQLGXvxmDGVMjPSxHxVtIqpZy5FDoKUSjQ2%2FILDKpu3%2F%2BtAtm2jRw1rUoMhgt0%3D";
|
||||
Runnable authRunnable = new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
// 构造AuthTask 对象
|
||||
AuthTask authTask = new AuthTask(PasswordLoginActivity.this);
|
||||
// 调用授权接口,获取授权结果
|
||||
Map<String, String> result = authTask.authV2(authInfo, true);
|
||||
LogUtils.e(result);
|
||||
if (result.get("resultStatus").equals("9000")){
|
||||
Pattern pattern = Pattern.compile("auth_code=([^&]*)");
|
||||
Matcher matcher = pattern.matcher(result.get("result"));
|
||||
|
||||
if (matcher.find()) {
|
||||
String authCode = matcher.group(1);
|
||||
LogUtils.e("AuthCode", authCode);
|
||||
MvpPre.oauthLogin(authCode,2);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
Thread authThread = new Thread(authRunnable);
|
||||
authThread.start();
|
||||
}
|
||||
}
|
||||
160
app/src/main/java/com/qxcm/qxlive/RealNameActivity.java
Normal file
@@ -0,0 +1,160 @@
|
||||
package com.qxcm.qxlive;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.text.SpannableString;
|
||||
import android.text.Spanned;
|
||||
import android.text.style.AbsoluteSizeSpan;
|
||||
import android.text.style.ForegroundColorSpan;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.blankj.utilcode.util.RegexUtils;
|
||||
import com.example.modulevocal.conacts.RealNameConacts;
|
||||
import com.example.modulevocal.presenter.RealNamePresenter;
|
||||
import com.qxcm.moduleutil.activity.BaseMvpActivity;
|
||||
import com.qxcm.moduleutil.bean.RealNameBean;
|
||||
import com.qxcm.moduleutil.utils.ARouteConstants;
|
||||
import com.qxcm.moduleutil.utils.SpUtil;
|
||||
import com.qxcm.qxlive.databinding.ActivityRealNameBinding;
|
||||
import com.tencent.cloud.huiyansdkface.facelight.api.WbCloudFaceContant;
|
||||
import com.tencent.cloud.huiyansdkface.facelight.api.WbCloudFaceVerifySdk;
|
||||
import com.tencent.cloud.huiyansdkface.facelight.api.listeners.WbCloudFaceVerifyLoginListener;
|
||||
import com.tencent.cloud.huiyansdkface.facelight.api.listeners.WbCloudFaceVerifyResultListener;
|
||||
import com.tencent.cloud.huiyansdkface.facelight.api.result.WbFaceError;
|
||||
import com.tencent.cloud.huiyansdkface.facelight.api.result.WbFaceVerifyResult;
|
||||
import com.tencent.cloud.huiyansdkface.facelight.process.FaceVerifyStatus;
|
||||
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/7/15
|
||||
*@description: 实名认证
|
||||
*/
|
||||
@Route(path = ARouteConstants.REAL_NAME_ACTIVITY2)
|
||||
public class RealNameActivity extends BaseMvpActivity<RealNamePresenter, ActivityRealNameBinding> implements RealNameConacts.View{
|
||||
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
mBinding.topBar.setTitle("实名认证");
|
||||
String fullText = "您知悉并同意应用提供者\n· 收集、使用您本人的身份信息和人脸图像\n· 向合法数据持有者核实您的身份信息\n· 本操作数据仅用于身份核实,安全可靠";
|
||||
SpannableString spannable = new SpannableString(fullText);
|
||||
|
||||
int firstLineEnd = fullText.indexOf('\n');
|
||||
if (firstLineEnd > 0) {
|
||||
// 设置第一行字体大小和颜色
|
||||
spannable.setSpan(
|
||||
new AbsoluteSizeSpan(16, true), // 18sp,基于 TextView 的 sp 值调整
|
||||
0,
|
||||
firstLineEnd,
|
||||
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE
|
||||
);
|
||||
|
||||
spannable.setSpan(
|
||||
new ForegroundColorSpan(Color.BLACK),
|
||||
0,
|
||||
firstLineEnd,
|
||||
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE
|
||||
);
|
||||
}
|
||||
|
||||
mBinding.tvAgreeTerms.setText(spannable);
|
||||
mBinding.btnSubmit.setOnClickListener(this::onClick);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_real_name;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected RealNamePresenter bindPresenter() {
|
||||
return new RealNamePresenter(this, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void realNameSuccess(RealNameBean msg) {
|
||||
Bundle data = new Bundle();
|
||||
WbCloudFaceVerifySdk.InputData inputData = new WbCloudFaceVerifySdk.InputData(
|
||||
msg.getFaceId(),
|
||||
msg.getOrderNo(),
|
||||
msg.getAppid(),
|
||||
msg.getApiVersion(),
|
||||
msg.getNonce(),
|
||||
msg.getUserid(),
|
||||
msg.getSign(),
|
||||
FaceVerifyStatus.Mode.GRADE,
|
||||
msg.getLicence());
|
||||
data.putSerializable(WbCloudFaceContant.INPUT_DATA, inputData);
|
||||
//设置是否打开语音提示,默认关闭,此处设置为关闭
|
||||
data.putBoolean(WbCloudFaceContant. PLAY_VOICE, true);
|
||||
|
||||
//避免用户快速点击导致二次登录,二次拉起刷脸等操作引起问题
|
||||
WbCloudFaceVerifySdk.getInstance().
|
||||
initAdvSdk(RealNameActivity.this, data, new WbCloudFaceVerifyLoginListener() {
|
||||
@Override
|
||||
public void onLoginSuccess () {
|
||||
//登录成功,拉起 sdk 页面,由 FaceVerifyResultListener 返回刷脸结果
|
||||
WbCloudFaceVerifySdk.getInstance().startWbFaceVerifySdk(RealNameActivity.this, new WbCloudFaceVerifyResultListener() {
|
||||
@Override
|
||||
public void onFinish(WbFaceVerifyResult result) {
|
||||
if (result != null) {
|
||||
if (result.isSuccess()) {
|
||||
Log.d("@@@", "刷脸成功!");
|
||||
SpUtil.setRealName(true);
|
||||
MvpPre.realNameResult(result.getOrderNo());
|
||||
|
||||
} else {
|
||||
Log.d("@@@", "刷脸失败!");
|
||||
}
|
||||
}
|
||||
//刷脸结束后,及时释放资源
|
||||
WbCloudFaceVerifySdk.getInstance().release();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
@Override
|
||||
public void onLoginFailed (WbFaceError error){
|
||||
Log.d("@@@", "刷脸失败!");
|
||||
//刷脸结束后,及时释放资源
|
||||
WbCloudFaceVerifySdk.getInstance().release();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendCodeSuccess() {
|
||||
finish();
|
||||
}
|
||||
|
||||
private void onClick(View view) {
|
||||
if (view.getId()== R.id.btnSubmit){
|
||||
if (mBinding.edName.getText().toString().isEmpty()){
|
||||
com.blankj.utilcode.util.ToastUtils.showShort("请输入姓名");
|
||||
return;
|
||||
}
|
||||
if (mBinding.edPassword.getText().toString().isEmpty()){
|
||||
com.blankj.utilcode.util.ToastUtils.showShort("请输入身份证号");
|
||||
return;
|
||||
}
|
||||
if (RegexUtils.isIDCard18Exact(mBinding.edPassword.getText().toString())) {
|
||||
if (mBinding.btnSubmit.getText().toString().equals("下一步")) {
|
||||
mBinding.stepNum1.setBackground(getResources().getDrawable(com.qxcm.moduleutil.R.mipmap.num_11));
|
||||
mBinding.stepNum2.setBackground(getResources().getDrawable(com.qxcm.moduleutil.R.mipmap.num_2));
|
||||
// mBinding.l1.setVisibility(View.GONE);
|
||||
// mBinding.l2.setVisibility(View.VISIBLE);
|
||||
// mBinding.btnSubmit.setText("立即认证");
|
||||
MvpPre.realName(mBinding.edName.getText().toString(),mBinding.edPassword.getText().toString());
|
||||
} else {
|
||||
SpUtil.setRealName(true);
|
||||
finish();
|
||||
}
|
||||
}else {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort("请输入正确的身份证号");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
233
app/src/main/java/com/qxcm/qxlive/wxapi/WXEntryActivity.java
Normal file
@@ -0,0 +1,233 @@
|
||||
package com.qxcm.qxlive.wxapi;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.blankj.utilcode.util.ToastUtils;
|
||||
import com.qxcm.moduleutil.base.CommonAppContext;
|
||||
import com.tencent.mm.opensdk.modelbase.BaseReq;
|
||||
import com.tencent.mm.opensdk.modelbase.BaseResp;
|
||||
import com.tencent.mm.opensdk.openapi.IWXAPI;
|
||||
import com.tencent.mm.opensdk.openapi.IWXAPIEventHandler;
|
||||
import com.tencent.mm.opensdk.openapi.WXAPIFactory;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
public class WXEntryActivity extends Activity implements IWXAPIEventHandler{
|
||||
// private static String TAG = "MicroMsg.WXEntryActivity";
|
||||
//
|
||||
// private IWXAPI api;
|
||||
// private MyHandler handler;
|
||||
//
|
||||
// private static class MyHandler extends Handler {
|
||||
// private final WeakReference<WXEntryActivity> wxEntryActivityWeakReference;
|
||||
//
|
||||
// public MyHandler(WXEntryActivity wxEntryActivity){
|
||||
// wxEntryActivityWeakReference = new WeakReference<WXEntryActivity>(wxEntryActivity);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void handleMessage(Message msg) {
|
||||
// int tag = msg.what;
|
||||
// switch (tag) {
|
||||
// case 0: {
|
||||
// Bundle data = msg.getData();
|
||||
// JSONObject json = null;
|
||||
// try {
|
||||
// json = new JSONObject(data.getString("result"));
|
||||
// String openId, accessToken, refreshToken, scope;
|
||||
// openId = json.getString("openid");
|
||||
// accessToken = json.getString("access_token");
|
||||
// refreshToken = json.getString("refresh_token");
|
||||
// scope = json.getString("scope");
|
||||
//// Intent intent = new Intent(wxEntryActivityWeakReference.get(), SendToWXActivity.class);
|
||||
//// intent.putExtra("openId", openId);
|
||||
//// intent.putExtra("accessToken", accessToken);
|
||||
//// intent.putExtra("refreshToken", refreshToken);
|
||||
//// intent.putExtra("scope", scope);
|
||||
//// wxEntryActivityWeakReference.get().startActivity(intent);
|
||||
// } catch (JSONException e) {
|
||||
// Log.e(TAG, e.getMessage());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onCreate(Bundle savedInstanceState) {
|
||||
// super.onCreate(savedInstanceState);
|
||||
//
|
||||
// api = WXAPIFactory.createWXAPI(this, CommonAppContext.getInstance().getCurrentEnvironment().getWxAppId(), false);
|
||||
// handler = new MyHandler(this);
|
||||
//
|
||||
// try {
|
||||
// Intent intent = getIntent();
|
||||
// api.handleIntent(intent, this);
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// protected void onNewIntent(Intent intent) {
|
||||
// super.onNewIntent(intent);
|
||||
//
|
||||
// setIntent(intent);
|
||||
// api.handleIntent(intent, this);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onReq(BaseReq req) {
|
||||
// switch (req.getType()) {
|
||||
// case ConstantsAPI.COMMAND_GETMESSAGE_FROM_WX:
|
||||
//// goToGetMsg();
|
||||
// break;
|
||||
// case ConstantsAPI.COMMAND_SHOWMESSAGE_FROM_WX:
|
||||
//// goToShowMsg((ShowMessageFromWX.Req) req);
|
||||
// break;
|
||||
// default:
|
||||
// break;
|
||||
// }
|
||||
// finish();
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onResp(BaseResp resp) {
|
||||
// int result = 0;
|
||||
//
|
||||
// switch (resp.errCode) {
|
||||
// case BaseResp.ErrCode.ERR_OK:
|
||||
//// result = com.qxcm.moduleutil.R.string.errcode_success;
|
||||
// break;
|
||||
// case BaseResp.ErrCode.ERR_USER_CANCEL:
|
||||
//// result = R.string.errcode_cancel;
|
||||
// break;
|
||||
// case BaseResp.ErrCode.ERR_AUTH_DENIED:
|
||||
//// result = R.string.errcode_deny;
|
||||
// break;
|
||||
// case BaseResp.ErrCode.ERR_UNSUPPORT:
|
||||
//// result = R.string.errcode_unsupported;
|
||||
// break;
|
||||
// default:
|
||||
//// result = R.string.errcode_unknown;
|
||||
// break;
|
||||
// }
|
||||
//
|
||||
// Toast.makeText(this, getString(result) + ", type=" + resp.getType(), Toast.LENGTH_SHORT).show();
|
||||
//
|
||||
//
|
||||
// if (resp.getType() == ConstantsAPI.COMMAND_SUBSCRIBE_MESSAGE) {
|
||||
// SubscribeMessage.Resp subscribeMsgResp = (SubscribeMessage.Resp) resp;
|
||||
// String text = String.format("openid=%s\ntemplate_id=%s\nscene=%d\naction=%s\nreserved=%s",
|
||||
// subscribeMsgResp.openId, subscribeMsgResp.templateID, subscribeMsgResp.scene, subscribeMsgResp.action, subscribeMsgResp.reserved);
|
||||
//
|
||||
// Toast.makeText(this, text, Toast.LENGTH_LONG).show();
|
||||
// }
|
||||
//
|
||||
// if (resp.getType() == ConstantsAPI.COMMAND_LAUNCH_WX_MINIPROGRAM) {
|
||||
// WXLaunchMiniProgram.Resp launchMiniProgramResp = (WXLaunchMiniProgram.Resp) resp;
|
||||
// String text = String.format("openid=%s\nextMsg=%s\nerrStr=%s",
|
||||
// launchMiniProgramResp.openId, launchMiniProgramResp.extMsg,launchMiniProgramResp.errStr);
|
||||
//
|
||||
// Toast.makeText(this, text, Toast.LENGTH_LONG).show();
|
||||
// }
|
||||
//
|
||||
// if (resp.getType() == ConstantsAPI.COMMAND_OPEN_BUSINESS_VIEW) {
|
||||
// WXOpenBusinessView.Resp launchMiniProgramResp = (WXOpenBusinessView.Resp) resp;
|
||||
// String text = String.format("openid=%s\nextMsg=%s\nerrStr=%s\nbusinessType=%s",
|
||||
// launchMiniProgramResp.openId, launchMiniProgramResp.extMsg,launchMiniProgramResp.errStr,launchMiniProgramResp.businessType);
|
||||
//
|
||||
// Toast.makeText(this, text, Toast.LENGTH_LONG).show();
|
||||
// }
|
||||
//
|
||||
// if (resp.getType() == ConstantsAPI.COMMAND_OPEN_BUSINESS_WEBVIEW) {
|
||||
// WXOpenBusinessWebview.Resp response = (WXOpenBusinessWebview.Resp) resp;
|
||||
// String text = String.format("businessType=%d\nresultInfo=%s\nret=%d",response.businessType,response.resultInfo,response.errCode);
|
||||
//
|
||||
// Toast.makeText(this, text, Toast.LENGTH_LONG).show();
|
||||
// }
|
||||
//
|
||||
// if (resp.getType() == ConstantsAPI.COMMAND_SENDAUTH) {
|
||||
// SendAuth.Resp authResp = (SendAuth.Resp)resp;
|
||||
// final String code = authResp.code;
|
||||
//// NetworkUtil.sendWxAPI(handler, String.format("https://api.weixin.qq.com/sns/oauth2/access_token?" +
|
||||
//// "appid=%s&secret=%s&code=%s&grant_type=authorization_code", "wxd930ea5d5a258f4f",
|
||||
//// "1d6d1d57a3dd063b36d917bc0b44d964", code), NetworkUtil.GET_TOKEN);
|
||||
// }
|
||||
// finish();
|
||||
// }
|
||||
//
|
||||
//// private void goToGetMsg() {
|
||||
//// Intent intent = new Intent(this, GetFromWXActivity.class);
|
||||
//// intent.putExtras(getIntent());
|
||||
//// startActivity(intent);
|
||||
//// finish();
|
||||
//// }
|
||||
////
|
||||
//// private void goToShowMsg(ShowMessageFromWX.Req showReq) {
|
||||
//// WXMediaMessage wxMsg = showReq.message;
|
||||
//// WXAppExtendObject obj = (WXAppExtendObject) wxMsg.mediaObject;
|
||||
////
|
||||
//// StringBuffer msg = new StringBuffer();
|
||||
//// msg.append("description: ");
|
||||
//// msg.append(wxMsg.description);
|
||||
//// msg.append("\n");
|
||||
//// msg.append("extInfo: ");
|
||||
//// msg.append(obj.extInfo);
|
||||
//// msg.append("\n");
|
||||
//// msg.append("filePath: ");
|
||||
//// msg.append(obj.filePath);
|
||||
////
|
||||
//// Intent intent = new Intent(this, ShowFromWXActivity.class);
|
||||
//// intent.putExtra(Constants.ShowMsgActivity.STitle, wxMsg.title);
|
||||
//// intent.putExtra(Constants.ShowMsgActivity.SMessage, msg.toString());
|
||||
//// intent.putExtra(Constants.ShowMsgActivity.BAThumbData, wxMsg.thumbData);
|
||||
//// startActivity(intent);
|
||||
//// finish();
|
||||
//// }
|
||||
|
||||
|
||||
private final String TAG = this.getClass().getSimpleName();
|
||||
public static final String APP_ID = CommonAppContext.getInstance().getCurrentEnvironment().getWxAppId();
|
||||
public static final String APP_SECRET = "请自己填写";
|
||||
private IWXAPI mApi;
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
mApi = WXAPIFactory.createWXAPI(this, APP_ID, true);
|
||||
mApi.handleIntent(this.getIntent(), this);
|
||||
}
|
||||
|
||||
//微信发送的请求将回调到onReq方法
|
||||
@Override
|
||||
public void onReq(BaseReq baseReq) {
|
||||
}
|
||||
|
||||
//发送到微信请求的响应结果
|
||||
@Override
|
||||
public void onResp(BaseResp resp) {
|
||||
switch (resp.errCode) {
|
||||
case BaseResp.ErrCode.ERR_OK:
|
||||
//发送成功
|
||||
ToastUtils.showShort("发送成功",resp.transaction);
|
||||
EventBus.getDefault().post(resp);
|
||||
break;
|
||||
case BaseResp.ErrCode.ERR_USER_CANCEL:
|
||||
//发送取消
|
||||
ToastUtils.showShort("发送取消",resp);
|
||||
break;
|
||||
case BaseResp.ErrCode.ERR_AUTH_DENIED:
|
||||
ToastUtils.showShort("发送被拒绝",resp);
|
||||
//发送被拒绝
|
||||
break;
|
||||
default:
|
||||
//发送返回
|
||||
break;
|
||||
}
|
||||
finish();
|
||||
|
||||
}
|
||||
}
|
||||
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 |
102
app/src/main/res/layout/activity_launch_page.xml
Normal file
@@ -0,0 +1,102 @@
|
||||
<?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"
|
||||
android:background="@color/transparent">
|
||||
|
||||
|
||||
<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:src="@mipmap/screen"
|
||||
android:scaleType="centerCrop"
|
||||
android:visibility="visible" />
|
||||
|
||||
</FrameLayout>
|
||||
</layout>
|
||||
380
app/src/main/res/layout/activity_password_login.xml
Normal file
@@ -0,0 +1,380 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
</data>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/log_bj" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="left|top|center"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_134"
|
||||
android:gravity="left|center"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:text="@string/login_web_title"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_login_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_27"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="@string/login_title"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rel_phone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_44"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:layout_marginLeft="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_17"
|
||||
android:layout_marginRight="@dimen/dp_16"
|
||||
android:background="@drawable/bg_r16_ffeff2f8">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_user"
|
||||
android:layout_width="@dimen/dp_20"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:src="@mipmap/icon_login_user_new" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/ed_phone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_28"
|
||||
android:layout_marginLeft="13dp"
|
||||
android:layout_marginRight="25dp"
|
||||
android:layout_toRightOf="@+id/iv_user"
|
||||
android:background="@android:color/transparent"
|
||||
android:hint="@string/login_hint_phion"
|
||||
android:inputType="phone"
|
||||
android:layout_centerInParent="true"
|
||||
android:maxLength="11"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/color_FFCCCCCC"
|
||||
android:textSize="@dimen/sp_17" />
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_code"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_44"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:background="@drawable/bg_r16_ffeff2f8">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_code"
|
||||
android:layout_width="@dimen/dp_20"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:src="@mipmap/icon_login_code" />
|
||||
|
||||
|
||||
<EditText
|
||||
android:id="@+id/ed_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_28"
|
||||
android:layout_marginLeft="13dp"
|
||||
android:layout_marginRight="25dp"
|
||||
android:layout_toRightOf="@+id/iv_code"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@android:color/transparent"
|
||||
android:hint="@string/login_hint_code"
|
||||
android:inputType="number"
|
||||
android:maxLength="20"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/color_FFCCCCCC"
|
||||
android:textSize="@dimen/sp_16" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentRight="true"
|
||||
android:gravity="center"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_send_code"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/dp_13"
|
||||
android:gravity="right"
|
||||
android:text="@string/login_send_code"
|
||||
android:textColor="#FF8ACC"
|
||||
android:textSize="@dimen/sp_16"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_pass_code"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_44"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:visibility="gone"
|
||||
android:background="@drawable/bg_r16_ffeff2f8">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_pass_code"
|
||||
android:layout_width="@dimen/dp_20"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:src="@mipmap/icon_login_lick" />
|
||||
|
||||
|
||||
<EditText
|
||||
android:id="@+id/ed_password_code"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_28"
|
||||
android:layout_marginLeft="13dp"
|
||||
android:layout_marginRight="25dp"
|
||||
android:layout_toRightOf="@+id/iv_pass_code"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@android:color/transparent"
|
||||
android:hint="@string/login_hint_pass"
|
||||
android:inputType="textPassword"
|
||||
android:maxLength="20"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/color_FFCCCCCC"
|
||||
android:textSize="@dimen/sp_16" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentRight="true"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_eye"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/eye_close"
|
||||
android:visibility="gone"/>
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_10">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_code_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginRight="16dp"
|
||||
android:drawableLeft="@mipmap/common_switch_login_icon"
|
||||
android:drawablePadding="@dimen/dp_3"
|
||||
android:gravity="center"
|
||||
android:text="@string/login_btn_switch"
|
||||
android:textColor="#666666"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_login"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_38"
|
||||
android:layout_marginTop="@dimen/dp_23"
|
||||
android:layout_marginBottom="@dimen/dp_150"
|
||||
android:layout_marginRight="@dimen/dp_38"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_login_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_42"
|
||||
android:src="@drawable/cs" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:enabled="false"
|
||||
android:gravity="center"
|
||||
android:text="@string/login_btn_login"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="14sp" />
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:paddingBottom="@dimen/dp_7"
|
||||
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_login_error"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_marginBottom="@dimen/dp_7"
|
||||
android:gravity="center"
|
||||
android:text="@string/login_btn_qt"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_12"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_other_login"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/tv_login_error"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_marginBottom="@dimen/dp_55"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="visible"
|
||||
tools:visibility="visible">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_weixin"
|
||||
android:layout_width="@dimen/dp_44"
|
||||
android:layout_height="44dp"
|
||||
android:src="@mipmap/sign_icon_wechat" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_zfb"
|
||||
android:layout_width="@dimen/dp_44"
|
||||
android:layout_height="@dimen/dp_44"
|
||||
android:layout_marginLeft="@dimen/dp_33"
|
||||
android:src="@mipmap/sign_icon_zfb"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_agreement"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/ll_other_login"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="@dimen/dp_25"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cb_privacy"
|
||||
android:layout_width="@dimen/dp_15"
|
||||
android:layout_height="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_5"
|
||||
android:background="@drawable/selector_login_agreement"
|
||||
android:button="@null" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="登录即代表同意"
|
||||
android:textColor="@color/color_FFA8A8A8"
|
||||
android:textSize="@dimen/sp_11"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_ysxy"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="《用户协议》"
|
||||
android:textColor="#7ECFFA"
|
||||
android:textSize="@dimen/sp_11"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="和"
|
||||
android:textColor="@color/color_FFA8A8A8"
|
||||
android:textSize="@dimen/sp_11"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_yhxy"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="《隐私协议》"
|
||||
android:textColor="#7ECFFA"
|
||||
android:textSize="@dimen/sp_11"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
</layout>
|
||||
247
app/src/main/res/layout/activity_real_name.xml
Normal file
@@ -0,0 +1,247 @@
|
||||
<?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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
|
||||
tools:context=".activity.RealNameActivity">
|
||||
|
||||
<data>
|
||||
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.qxcm.moduleutil.widget.CustomTopBar
|
||||
android:id="@+id/top_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/steps"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_68"
|
||||
android:layout_margin="@dimen/dp_16"
|
||||
android:background="@drawable/bg_r9_fffff"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 第一步:验证手机号 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 步骤编号 -->
|
||||
<TextView
|
||||
android:id="@+id/step_num_1"
|
||||
android:layout_width="@dimen/dp_23"
|
||||
android:layout_height="@dimen/dp_23"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:background="@mipmap/num_1"
|
||||
android:gravity="center" />
|
||||
|
||||
<!-- 步骤描述 -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="@dimen/dp_8"
|
||||
android:text="@string/fill_identity_info"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 分割线 -->
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="@dimen/dp_19"
|
||||
android:layout_weight="1"
|
||||
android:background="@mipmap/line9" />
|
||||
|
||||
<!-- 第二步:设置新密码 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 步骤编号 -->
|
||||
<TextView
|
||||
android:id="@+id/step_num_2"
|
||||
android:layout_width="@dimen/dp_23"
|
||||
android:layout_height="@dimen/dp_23"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:background="@mipmap/num_22"
|
||||
android:gravity="center" />
|
||||
|
||||
<!-- 步骤描述 -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="@dimen/dp_8"
|
||||
android:text="@string/face_recognition"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/l_1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:text="@string/real_name_authentication_tips"
|
||||
android:textColor="@color/color_FF999999"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_44"
|
||||
android:layout_marginLeft="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginRight="@dimen/dp_16"
|
||||
android:background="@drawable/bg_r16_ffeff2f8"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_send_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="@dimen/dp_14"
|
||||
android:gravity="left|center"
|
||||
android:text="@string/real_name"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_16"
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
||||
<EditText
|
||||
android:id="@+id/ed_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_28"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginLeft="13dp"
|
||||
android:layout_marginRight="25dp"
|
||||
android:layout_toRightOf="@+id/tv_send_name"
|
||||
android:background="@android:color/transparent"
|
||||
android:hint="@string/please_enter_real_name"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/color_FF9b9b9b"
|
||||
android:textSize="@dimen/sp_16" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/rl_code"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_44"
|
||||
android:layout_marginLeft="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginRight="@dimen/dp_16"
|
||||
android:background="@drawable/bg_r16_ffeff2f8"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_send_code"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="@dimen/dp_14"
|
||||
android:gravity="left|center"
|
||||
android:text="@string/id_number"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_16"
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
||||
<EditText
|
||||
android:id="@+id/ed_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_28"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_marginLeft="13dp"
|
||||
android:layout_marginRight="25dp"
|
||||
android:layout_toRightOf="@+id/tv_send_code"
|
||||
android:background="@android:color/transparent"
|
||||
android:hint="@string/please_enter_id_number"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/color_FF9b9b9b"
|
||||
android:textSize="@dimen/sp_16" />
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/l_2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:text="为了保证本人操作,请进行人脸验证"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/real_img"
|
||||
android:layout_gravity="center"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_agree_terms"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_54"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_54"
|
||||
android:lineSpacingExtra="@dimen/dp_5"
|
||||
android:text="您知悉并同意应用提供者 \n· 收集、使用您本人的身份信息和人脸图像 \n· 向合法数据持有者核实您的身份信息 \n· 本操作数据仅用于身份核实,安全可靠"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
|
||||
</LinearLayout>
|
||||
<!-- 提交按钮 -->
|
||||
<Button
|
||||
android:id="@+id/btnSubmit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_42"
|
||||
android:layout_marginStart="@dimen/dp_38"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:layout_marginEnd="@dimen/dp_38"
|
||||
android:background="@drawable/cs"
|
||||
android:gravity="center"
|
||||
android:text="下一步"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
5
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/ic_launcher_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
||||
5
app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/ic_launcher_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
||||
BIN
app/src/main/res/mipmap-hdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp
Normal file
|
After Width: | Height: | Size: 47 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
Normal file
|
After Width: | Height: | Size: 25 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="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>
|
||||
4
app/src/main/res/values/ic_launcher_background.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="ic_launcher_background">#FFFFFF</color>
|
||||
</resources>
|
||||
5
app/src/main/res/values/strings.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<resources>
|
||||
|
||||
<string name="recommend_skip">跳过</string>
|
||||
<string name="a_067">点击跳转第三方应用</string>
|
||||
</resources>
|
||||
94
app/src/main/res/values/themes.xml
Normal file
@@ -0,0 +1,94 @@
|
||||
<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>
|
||||
<item name="android:textColor">@color/color_1F1C1F</item>
|
||||
<item name="android:textColorHint">@color/color_FF999999</item>
|
||||
<item name="android:windowBackground">@color/color_F9FAFA</item>
|
||||
<item name="android:windowTranslucentStatus">false</item>
|
||||
<item name="android:windowLightStatusBar">true</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="AppthemeActivity" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<item name="android:windowEnableSplitTouch">false</item>
|
||||
<item name="android:windowAllowReturnTransitionOverlap">false</item>
|
||||
<item name="android:windowEnterTransition">@null</item>
|
||||
<item name="android:windowExitTransition">@null</item>
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
|
||||
<item name="android:windowTranslucentStatus">false</item>
|
||||
<item name="android:windowLightStatusBar">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);
|
||||
}
|
||||
}
|
||||
BIN
app/yuslive.jks
Normal file
31
build.gradle
Normal file
@@ -0,0 +1,31 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
|
||||
// build.gradle (Project-level)
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.9.24' // 根据你使用的 Kotlin 版本调整
|
||||
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
jcenter() // 已废弃,仅限旧项目使用
|
||||
gradlePluginPortal()
|
||||
maven { url "https://maven.aliyun.com/repository/gradle-plugin" }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath libs.gradle // 或你使用的 Android Gradle 插件版本
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
|
||||
// ✅ 添加 ARouter 插件依赖
|
||||
classpath 'com.alibaba:arouter-register:1.0.2'
|
||||
}
|
||||
}
|
||||
plugins {
|
||||
alias(libs.plugins.android.application) apply false
|
||||
alias(libs.plugins.android.library) apply false
|
||||
alias(libs.plugins.kotlin.android) apply false
|
||||
}
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
51
gradle.properties
Normal file
@@ -0,0 +1,51 @@
|
||||
# Project-wide Gradle settings.
|
||||
# IDE (e.g. Android Studio) users:
|
||||
# Gradle settings configured through the IDE *will override*
|
||||
# any settings specified in this file.
|
||||
# For more details on how to configure your build environment visit
|
||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||
# Specifies the JVM arguments used for the daemon process.
|
||||
# The setting is particularly useful for tweaking memory settings.
|
||||
org.gradle.jvmargs=-Xmx3072m -XX:MaxPermsize=512m -Xx:+HeapDumponOutofMemoryError -Dfile.encoding=UTF-8
|
||||
# When configured, Gradle will run in incubating parallel mode.
|
||||
# This option should only be used with decoupled projects. For more details, visit
|
||||
# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
|
||||
# org.gradle.parallel=true
|
||||
# AndroidX package structure to make it clearer which packages are bundled with the
|
||||
# Android operating system, and which are packaged with your app's APK
|
||||
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
# Enables namespacing of each library's R class so that its R class includes only the
|
||||
# resources declared in the library itself and none from the library's dependencies,
|
||||
# thereby reducing the size of the R class for that library
|
||||
android.nonTransitiveRClass=true
|
||||
|
||||
arouter.register.auto=true
|
||||
|
||||
isBuildModule=false
|
||||
|
||||
#org.gradle.parallel=false
|
||||
#org.gradle.deamon=false
|
||||
android.injected.testOnly=false
|
||||
|
||||
APP_VERSION_NAME=1.0.2.9
|
||||
APP_VERSION_CODE=21
|
||||
|
||||
org.gradle.jvm.toolchain.useLegacyAdapters=false
|
||||
#org.gradle.java.home=C\:\\Users\\qx\\.jdks\\ms-17.0.15
|
||||
org.gradle.parallel=true
|
||||
org.gradel.daemon=true
|
||||
org.gradel.configureondemand=true
|
||||
aaptOptions.cruncherEnabled false
|
||||
aaptOptions.useNewCruncher false
|
||||
|
||||
#android.enableR8=true
|
||||
#isModule
|
||||
modulevoice=false
|
||||
# <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>
|
||||
beta=false
|
||||
|
||||
org.gradle.caching=false
|
||||
# ??APT????
|
||||
kapt.incremental.apt=false
|
||||
163
gradle/libs.versions.toml
Normal file
@@ -0,0 +1,163 @@
|
||||
[versions]
|
||||
agp = "8.4.0"
|
||||
alipayAlipaysdkAndroid = "15.8.33"
|
||||
arouterApiVersion = "1.5.2"
|
||||
comJacktuotuoCustomviewVerificationcodeview2 = "1.0.5"
|
||||
comLiulishuoOkdownloadOkdownload4 = "1.0.7"
|
||||
comLiulishuoOkdownloadSqlite3 = "1.0.7"
|
||||
comLiulishuoOkdownloadOkhttp3 = "1.0.7"
|
||||
comLiulishuoOkdownloadFiledownloader3 = "1.0.7"
|
||||
custompopwindow = "2.1.1"
|
||||
databindingRuntimeVersion = "7.0.2"
|
||||
easypermissions = "3.0.0"
|
||||
easyProtectorRelease = "1.1.2"
|
||||
egameAnimplayer = "2.0.8"
|
||||
flexboxVersion = "1.0.0"
|
||||
githubBannerviewpagerVersion = "3.5.12"
|
||||
githubGlide = "4.12.0"
|
||||
githubNiceSpinnerVersion = "1.4.4"
|
||||
githubPhotoview = "2.3.0"
|
||||
githubRealtimeblurviewVersion = "1.2.1"
|
||||
githubShadowlayout = "3.3.1"
|
||||
gradle = "8.8.0"
|
||||
junit = "4.13.2"
|
||||
junitVersion = "1.1.5"
|
||||
espressoCore = "3.5.1"
|
||||
appcompat = "1.6.1"
|
||||
libraryVersion = "1.4"
|
||||
lombok = "1.18.32"
|
||||
marqueeview = "1.1.0"
|
||||
material = "1.10.0"
|
||||
activity = "1.8.0"
|
||||
constraintlayout = "2.1.4"
|
||||
arouter = "1.0.2"
|
||||
|
||||
arouterAnnotation = "1.0.6"
|
||||
arouterCompiler = "1.5.2"
|
||||
arouterApi = "1.5.2"
|
||||
comSquareupRetrofit2Retrofit3 = "2.9.0"
|
||||
fastjson = "1.2.60"
|
||||
githubBaserecyclerviewadapterhelper = "2.9.30"
|
||||
gsonVersion = "2.10.1"
|
||||
eventbusAnnotationProcessorVersion = "3.3.1"
|
||||
eventbusVersion = "3.3.1"
|
||||
logger = "2.2.0"
|
||||
loggingInterceptorVersion = "3.10.0"
|
||||
multidex = "2.0.1"
|
||||
ossAndroidSdkVersion = "2.9.21"
|
||||
persistentcookiejar = "v1.0.1"
|
||||
picture_libraryVersion = "v2.6.0"
|
||||
reactivexRxjava = "2.2.21"
|
||||
retrofit2KotlinCoroutinesAdapterVersion = "0.9.2"
|
||||
roundedimageview = "2.3.0"
|
||||
rxandroid = "2.1.1"
|
||||
scwangSmartrefreshlayout = "1.1.0-alpha-20"
|
||||
scwangSmartrefreshheader = "1.1.0-alpha-20"
|
||||
singledateandtimepicker = "2.2.7"
|
||||
svgaplayerAndroid = "2.5.13"
|
||||
toastVersion = "8.2"
|
||||
togglebuttonLibraryVersion = "1.0.0"
|
||||
utilcode = "1.30.6"
|
||||
databindingRuntime = "8.8.0"
|
||||
datastoreCoreAndroid = "1.1.5"
|
||||
kotlin = "2.0.0"
|
||||
lifecycleRuntimeKtx = "2.6.1"
|
||||
activityCompose = "1.8.0"
|
||||
composeBom = "2024.04.01"
|
||||
kotlinVersion = "1.9.24"
|
||||
coreKtx = "1.10.1"
|
||||
lifecycleLivedataKtx = "2.6.1"
|
||||
lifecycleViewmodelKtx = "2.6.1"
|
||||
webpdecoder = "1.6.4.9.0"
|
||||
wechatSdkAndroid = "6.8.30"
|
||||
xbanner = "1.7.0"
|
||||
appcompatVersion = "1.3.1"
|
||||
|
||||
[libraries]
|
||||
alipay-alipaysdk-android = { module = "com.alipay.sdk:alipaysdk-android", version.ref = "alipayAlipaysdkAndroid" }
|
||||
android-flexbox = { module = "com.google.android:flexbox", version.ref = "flexboxVersion" }
|
||||
arouter-api-v150 = { module = "com.alibaba:arouter-api", version.ref = "arouterApiVersion" }
|
||||
com-github-arcadefire-nice-spinner = { module = "com.github.arcadefire:nice-spinner", version.ref = "githubNiceSpinnerVersion" }
|
||||
com-github-bumptech-glide-glide = { module = "com.github.bumptech.glide:glide", version.ref = "githubGlide" }
|
||||
com-github-mmin18-realtimeblurview = { module = "com.github.mmin18:realtimeblurview", version.ref = "githubRealtimeblurviewVersion" }
|
||||
com-github-zhpanvip-bannerviewpager = { module = "com.github.zhpanvip:bannerviewpager", version.ref = "githubBannerviewpagerVersion" }
|
||||
com-jacktuotuo-customview-verificationcodeview3 = { module = "com.jacktuotuo.customview:verificationcodeview", version.ref = "comJacktuotuoCustomviewVerificationcodeview2" }
|
||||
#com-liulishuo-okdownload-filedownloader4 = { module = "com.liulishuo.okdownload:filedownloader", version.ref = "comLiulishuoOkdownloadFiledownloader3" }
|
||||
#com-liulishuo-okdownload-okhttp4 = { module = "com.liulishuo.okdownload:okhttp", version.ref = "comLiulishuoOkdownloadOkhttp3" }
|
||||
#com-liulishuo-okdownload-sqlite4 = { module = "com.liulishuo.okdownload:sqlite", version.ref = "comLiulishuoOkdownloadSqlite3" }
|
||||
#com-liulishuo-okdownload-okdownload6 = { module = "com.liulishuo.okdownload:okdownload", version.ref = "comLiulishuoOkdownloadOkdownload4" }
|
||||
#custompopwindow = { module = "com.github.pinguo-zhouwei:CustomPopwindow", version.ref = "custompopwindow" }
|
||||
databinding-runtime-v702 = { module = "androidx.databinding:databinding-runtime", version.ref = "databindingRuntimeVersion" }
|
||||
dpa-oss-android-sdk = { module = "com.aliyun.dpa:oss-android-sdk", version.ref = "ossAndroidSdkVersion" }
|
||||
easy-protector-release = { module = "com.lahm.library:easy-protector-release", version.ref = "easyProtectorRelease" }
|
||||
easypermissions = { module = "pub.devrel:easypermissions", version.ref = "easypermissions" }
|
||||
#egame-animplayer = { module = "com.egame.vap:animplayer", version.ref = "egameAnimplayer" }
|
||||
github-photoview = { module = "com.github.chrisbanes:PhotoView", version.ref = "githubPhotoview" }
|
||||
github-shadowlayout = { module = "com.github.lihangleo2:ShadowLayout", version.ref = "githubShadowlayout" }
|
||||
#glide-compiler = { module = "com.github.bumptech.glide:compiler", version.ref = "githubGlide" }
|
||||
gradle = { module = "com.android.tools.build:gradle", version.ref = "gradle" }
|
||||
junit = { group = "junit", name = "junit", version.ref = "junit" }
|
||||
ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
|
||||
espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
|
||||
appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
|
||||
lombok = { module = "org.projectlombok:lombok", version.ref = "lombok" }
|
||||
marqueeview = { module = "com.sunfusheng:marqueeview", version.ref = "marqueeview" }
|
||||
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
|
||||
activity = { group = "androidx.activity", name = "activity", version.ref = "activity" }
|
||||
constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
|
||||
#arouter-api = { module = "com.alibaba:arouter-api", version.ref = "arouterApi" }
|
||||
arouter-compiler = { module = "com.alibaba:arouter-compiler", version.ref = "arouterCompiler" }
|
||||
arouter-annotation = { module = "com.alibaba:arouter-annotation", version.ref = "arouterAnnotation" }
|
||||
com-scwang-smartrefresh-smartrefreshheader = { module = "com.scwang.smartrefresh:SmartRefreshHeader", version.ref = "scwangSmartrefreshheader" }
|
||||
com-scwang-smartrefresh-smartrefreshlayout = { module = "com.scwang.smartrefresh:SmartRefreshLayout", version.ref = "scwangSmartrefreshlayout" }
|
||||
com-squareup-retrofit2-retrofit4 = { module = "com.squareup.retrofit2:retrofit", version.ref = "comSquareupRetrofit2Retrofit3" }
|
||||
fastjson = { module = "com.alibaba:fastjson", version.ref = "fastjson" }
|
||||
github-baserecyclerviewadapterhelper = { module = "com.github.CymChad:BaseRecyclerViewAdapterHelper", version.ref = "githubBaserecyclerviewadapterhelper" }
|
||||
hjq-toast = { module = "com.hjq:toast", version.ref = "toastVersion" }
|
||||
jakewharton-retrofit2-kotlin-coroutines-adapter = { module = "com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter", version.ref = "retrofit2KotlinCoroutinesAdapterVersion" }
|
||||
greenrobot-eventbus = { module = "org.greenrobot:eventbus", version.ref = "eventbusVersion" }
|
||||
#greenrobot-eventbus-annotation-processor = { module = "org.greenrobot:eventbus-annotation-processor", version.ref = "eventbusAnnotationProcessorVersion" }
|
||||
google-gson = { module = "com.google.code.gson:gson", version.ref = "gsonVersion" }
|
||||
logger = { module = "com.orhanobut:logger", version.ref = "logger" }
|
||||
multidex = { module = "androidx.multidex:multidex", version.ref = "multidex" }
|
||||
#numberprogressbar-library = { module = "com.daimajia.numberprogressbar:library", version.ref = "libraryVersion" }
|
||||
okhttp3-logging-interceptor = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "loggingInterceptorVersion" }
|
||||
persistentcookiejar = { module = "com.github.franmontiel:PersistentCookieJar", version.ref = "persistentcookiejar" }
|
||||
#pictureselector-picture_library = { module = "com.github.LuckSiege.PictureSelector:picture_library", version.ref = "picture_libraryVersion" }
|
||||
reactivex-rxjava = { module = "io.reactivex.rxjava2:rxjava", version.ref = "reactivexRxjava" }
|
||||
roundedimageview = { module = "com.makeramen:roundedimageview", version.ref = "roundedimageview" }
|
||||
rxandroid = { module = "io.reactivex.rxjava2:rxandroid", version.ref = "rxandroid" }
|
||||
#singledateandtimepicker = { module = "com.github.florent37:singledateandtimepicker", version.ref = "singledateandtimepicker" }
|
||||
squareup-converter-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "comSquareupRetrofit2Retrofit3" }
|
||||
retrofit2-adapter-rxjava2 = { module = "com.squareup.retrofit2:adapter-rxjava2", version.ref = "comSquareupRetrofit2Retrofit3" }
|
||||
svgaplayer-android = { module = "com.github.yyued:SVGAPlayer-Android", version.ref = "svgaplayerAndroid" }
|
||||
utilcode = { module = "com.blankj:utilcode", version.ref = "utilcode" }
|
||||
#databinding-runtime = { group = "androidx.databinding", name = "databinding-runtime", version.ref = "databindingRuntime" }
|
||||
#datastore-core-android = { group = "androidx.datastore", name = "datastore-core-android", version.ref = "datastoreCoreAndroid" }
|
||||
#lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" }
|
||||
#activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" }
|
||||
#compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" }
|
||||
#ui = { group = "androidx.compose.ui", name = "ui" }
|
||||
#ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" }
|
||||
#ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }
|
||||
#ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" }
|
||||
#ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" }
|
||||
#ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" }
|
||||
#material3 = { group = "androidx.compose.material3", name = "material3" }
|
||||
core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
|
||||
lifecycle-livedata-ktx = { group = "androidx.lifecycle", name = "lifecycle-livedata-ktx", version.ref = "lifecycleLivedataKtx" }
|
||||
lifecycle-viewmodel-ktx = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version.ref = "lifecycleViewmodelKtx" }
|
||||
#webpdecoder = { module = "com.zlc.glide:webpdecoder", version.ref = "webpdecoder" }
|
||||
wechat-sdk-android = { module = "com.tencent.mm.opensdk:wechat-sdk-android", version.ref = "wechatSdkAndroid" }
|
||||
xbanner = { module = "com.github.xiaohaibin:XBanner", version.ref = "xbanner" }
|
||||
zcw-togglebutton-library = { module = "com.zcw:togglebutton-library", version.ref = "togglebuttonLibraryVersion" }
|
||||
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompatVersion" }
|
||||
|
||||
|
||||
[plugins]
|
||||
android-application = { id = "com.android.application", version.ref = "agp" }
|
||||
android-library = { id = "com.android.library", version.ref = "agp" }
|
||||
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlinVersion" }
|
||||
#kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlinVersion" }
|
||||
#alibaba-arouter = { id = "com.alibaba.arouter", version.ref = "arouter" }
|
||||
|
||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
8
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
#Wed May 07 09:31:48 CST 2025
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
#distributionUrl=https\://mirrors.cloud.tencent.com/gradle/gradle-8.7-all.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
#distributionUrl=file:///D:/Greadle/gradle-8.10.2-all.zip
|
||||
distributionUrl=file:///D:/Gradle/gradle-8.10.2-bin.zip
|
||||
185
gradlew
vendored
Normal file
@@ -0,0 +1,185 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
#
|
||||
# Copyright 2015 the original author or authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
case $i in
|
||||
0) set -- ;;
|
||||
1) set -- "$args0" ;;
|
||||
2) set -- "$args0" "$args1" ;;
|
||||
3) set -- "$args0" "$args1" "$args2" ;;
|
||||
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=`save "$@"`
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
89
gradlew.bat
vendored
Normal file
@@ -0,0 +1,89 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
7448
hs_err_pid167656.log
Normal file
4085
hs_err_pid409616.log
Normal file
5498
hs_err_pid619772.log
Normal file
1
lombok.config
Normal file
@@ -0,0 +1 @@
|
||||
lombok.anyConstructor.suppressConstructorProperties=true
|
||||
75
module.build.gradle
Normal file
@@ -0,0 +1,75 @@
|
||||
if (isBuildModule.toBoolean()) {
|
||||
//作为独立App应用运行
|
||||
apply plugin: 'com.android.application'
|
||||
} else {
|
||||
//作为组件运行
|
||||
apply plugin: 'com.android.library'
|
||||
}
|
||||
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
apply plugin: 'kotlin-kapt'
|
||||
|
||||
android {
|
||||
compileSdkVersion 35
|
||||
buildToolsVersion build_versions.build_tools
|
||||
defaultConfig {
|
||||
minSdkVersion 24
|
||||
targetSdkVersion 28
|
||||
versionCode 1
|
||||
versionName 1.0
|
||||
consumerProguardFiles 'consumer-rules.pro'
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
// javaCompileOptions {
|
||||
// annotationProcessorOptions {
|
||||
// arguments = [AROUTER_MODULE_NAME: project.getName()]
|
||||
// }
|
||||
// }
|
||||
kapt {
|
||||
arguments {
|
||||
arg("AROUTER_MODULE_NAME", project.getName())
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
buildTypes {
|
||||
debug {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
sourceSets {
|
||||
main {
|
||||
//jni库统一放在libs目录下
|
||||
// jniLibs.srcDir = ['libs']
|
||||
if (isBuildModule.toBoolean()) {
|
||||
//单独运行
|
||||
manifest.srcFile 'src/main/module/AndroidManifest.xml'
|
||||
} else {
|
||||
//合并到宿主中
|
||||
manifest.srcFile 'src/main/AndroidManifest.xml'
|
||||
resources {
|
||||
|
||||
//正式版本时.剔除debug文件夹下的所有调式文件
|
||||
exclude 'src/debug/*'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation deps.arouter_api
|
||||
kapt deps.arouter_compiler
|
||||
// kapt deps.arouter_annotation
|
||||
}
|
||||
|
||||
1
moduleLogin/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/build
|
||||
51
moduleLogin/build.gradle
Normal file
@@ -0,0 +1,51 @@
|
||||
plugins {
|
||||
alias(libs.plugins.android.library)
|
||||
alias(libs.plugins.kotlin.android)
|
||||
}
|
||||
|
||||
android {
|
||||
namespace 'com.qxcm.modulelogin'
|
||||
compileSdk 35
|
||||
|
||||
defaultConfig {
|
||||
minSdk 24
|
||||
targetSdk 35
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
}
|
||||
dataBinding {
|
||||
enabled = true
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = '11'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation libs.appcompat
|
||||
implementation libs.material
|
||||
implementation libs.activity
|
||||
implementation libs.constraintlayout
|
||||
implementation project(':modulemain')
|
||||
implementation project(':modulevocal')
|
||||
testImplementation libs.junit
|
||||
androidTestImplementation libs.ext.junit
|
||||
androidTestImplementation libs.espresso.core
|
||||
|
||||
implementation project(":moduleUtil")
|
||||
}
|
||||
|
||||
apply plugin: 'com.alibaba.arouter' // ⚠️ 添加这一行
|
||||
21
moduleLogin/proguard-rules.pro
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# 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 *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.qxcm.modulelogin;
|
||||
|
||||
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.modulelogin", appContext.getPackageName());
|
||||
}
|
||||
}
|
||||
24
moduleLogin/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<application android:allowBackup="true">
|
||||
<activity
|
||||
android:name=".activity.SwitchAccountsActivity"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTask"/>
|
||||
<activity
|
||||
android:name=".activity.ImproveInfoActivity"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTask"/>
|
||||
<activity
|
||||
android:name=".activity.ForgetPasswordActivity"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTask"/>
|
||||
|
||||
<activity
|
||||
android:name=".activity.LoginActivity"
|
||||
android:launchMode="singleTask"
|
||||
android:screenOrientation="portrait" />
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -0,0 +1,139 @@
|
||||
package com.qxcm.modulelogin.activity;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.CountDownTimer;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.activity.EdgeToEdge;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.blankj.utilcode.util.ToastUtils;
|
||||
import com.qxcm.modulelogin.R;
|
||||
import com.qxcm.modulelogin.databinding.ActivityForgetPasswordBinding;
|
||||
import com.qxcm.modulelogin.databinding.ActivityLoginBinding;
|
||||
import com.qxcm.modulelogin.present.LoginContacter;
|
||||
import com.qxcm.modulelogin.present.LoginPresenter;
|
||||
import com.qxcm.moduleutil.activity.BaseMvpActivity;
|
||||
import com.qxcm.moduleutil.bean.UserBean;
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/3
|
||||
*@description: 忘记密码重新修改密码
|
||||
*/
|
||||
public class ForgetPasswordActivity extends BaseMvpActivity<LoginPresenter, ActivityForgetPasswordBinding> implements LoginContacter.View, View.OnClickListener {
|
||||
|
||||
private CountDownTimer mTimer;
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
mBinding.tvSendCode.setOnClickListener(this::onClick);
|
||||
mBinding.btnSubmit.setOnClickListener(this::onClick);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_forget_password;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (v.getId() == R.id.tv_send_code) {
|
||||
String phone = mBinding.edPhone.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(phone)) {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort("请输入手机号");
|
||||
return;
|
||||
}
|
||||
sendCodeSuccess(phone);
|
||||
MvpPre.sendCode(phone, 3);
|
||||
}
|
||||
else if (v.getId() == R.id.btnSubmit){
|
||||
String phone = mBinding.edPhone.getText().toString().trim();
|
||||
String code = mBinding.edPassword.getText().toString().trim();
|
||||
String password = mBinding.editTextNewPassword.getText().toString().trim();
|
||||
String confirmPassword = mBinding.editTextConfirmPassword.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(phone)){
|
||||
com.blankj.utilcode.util.ToastUtils.showShort("请输入手机号");
|
||||
return;
|
||||
}
|
||||
if (TextUtils.isEmpty(code)){
|
||||
com.blankj.utilcode.util.ToastUtils.showShort("请输入验证码");
|
||||
return;
|
||||
}
|
||||
if (TextUtils.isEmpty(password)){
|
||||
com.blankj.utilcode.util.ToastUtils.showShort("请输入密码");
|
||||
return;
|
||||
}
|
||||
if (TextUtils.isEmpty(confirmPassword)){
|
||||
com.blankj.utilcode.util.ToastUtils.showShort("两次密码不一致");
|
||||
return;
|
||||
}
|
||||
if (!password.equals(confirmPassword)){
|
||||
com.blankj.utilcode.util.ToastUtils.showShort("两次密码不一致");
|
||||
return;
|
||||
}
|
||||
MvpPre.forgotPassword(password,phone,code);
|
||||
|
||||
}
|
||||
}
|
||||
private void releaseTimer() {
|
||||
if (mTimer != null) {
|
||||
mTimer.cancel();
|
||||
mTimer = null;
|
||||
}
|
||||
}
|
||||
public void sendCodeSuccess(String phoneNumber) {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort("短信验证码发送成功请注意查收");
|
||||
mBinding.tvSendCode.setEnabled(false);
|
||||
mBinding.tvSendCode.setAlpha(0.5f);
|
||||
releaseTimer();
|
||||
if (mTimer != null) {
|
||||
mTimer.cancel();
|
||||
}
|
||||
mTimer = new CountDownTimer(60000L, 1000L) {
|
||||
@Override
|
||||
public void onTick(long millisUntilFinished) {
|
||||
if (mBinding.tvSendCode != null) {
|
||||
mBinding.tvSendCode.setText(String.format("重新发送(%s)", millisUntilFinished / 1000));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish() {
|
||||
mBinding.tvSendCode.setAlpha(1f);
|
||||
mBinding.tvSendCode.setEnabled(true);
|
||||
mBinding.tvSendCode.setText("重新发送");
|
||||
}
|
||||
};
|
||||
mTimer.start();
|
||||
}
|
||||
@Override
|
||||
public void sendCodeSuccess1(String phoneNumber) {
|
||||
LogUtils.e(phoneNumber);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loginSuccess(UserBean userBean) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void authorizationSuccess(String s) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ysxlSuccess(String s) {
|
||||
ToastUtils.showShort(s);
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected LoginPresenter bindPresenter() {
|
||||
return new LoginPresenter(this, this);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,321 @@
|
||||
package com.qxcm.modulelogin.activity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.blankj.utilcode.util.ToastUtils;
|
||||
import com.luck.picture.lib.basic.PictureSelector;
|
||||
import com.luck.picture.lib.config.PictureConfig;
|
||||
import com.luck.picture.lib.config.PictureMimeType;
|
||||
import com.luck.picture.lib.engine.CropEngine;
|
||||
import com.luck.picture.lib.entity.LocalMedia;
|
||||
import com.luck.picture.lib.style.PictureSelectorStyle;
|
||||
import com.qxcm.modulelogin.R;
|
||||
import com.qxcm.modulelogin.bean.UserFillResp;
|
||||
import com.qxcm.modulelogin.databinding.ActivityImproveInfoBinding;
|
||||
import com.qxcm.modulelogin.present.ImproveInfoContacts;
|
||||
import com.qxcm.modulelogin.present.ImproveInfoPresenter;
|
||||
import com.qxcm.modulemain.activity.MainActivity;
|
||||
import com.qxcm.moduleutil.activity.BaseMvpActivity;
|
||||
import com.qxcm.moduleutil.base.CommonAppContext;
|
||||
import com.qxcm.moduleutil.bean.UserBean;
|
||||
import com.qxcm.moduleutil.bean.UserPictrue;
|
||||
import com.qxcm.moduleutil.utils.DateSelectDialog;
|
||||
import com.qxcm.moduleutil.utils.GlideEngine;
|
||||
import com.qxcm.moduleutil.utils.ImageLoader;
|
||||
import com.qxcm.moduleutil.utils.ImageUtils;
|
||||
import com.qxcm.moduleutil.utils.MyPictureParameterStyle;
|
||||
import com.qxcm.moduleutil.utils.SpUtil;
|
||||
import com.qxcm.moduleutil.widget.Constants;
|
||||
import com.tencent.imsdk.v2.V2TIMCallback;
|
||||
import com.tencent.imsdk.v2.V2TIMManager;
|
||||
import com.tencent.imsdk.v2.V2TIMUserFullInfo;
|
||||
import com.tencent.imsdk.v2.V2TIMValueCallback;
|
||||
import com.tencent.qcloud.tuicore.TUIConfig;
|
||||
import com.tencent.qcloud.tuicore.TUILogin;
|
||||
import com.tencent.qcloud.tuicore.interfaces.TUICallback;
|
||||
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
public class ImproveInfoActivity extends BaseMvpActivity<ImproveInfoPresenter, ActivityImproveInfoBinding> implements
|
||||
ImproveInfoContacts.View, View.OnClickListener, DateSelectDialog.OnSelectDate {
|
||||
private String sex;
|
||||
|
||||
public String nickname;
|
||||
public String user_no_parent;
|
||||
|
||||
private long startTime = 0;//开始时间
|
||||
private long stayTime = 0;//停留时间
|
||||
private boolean isGirlSelected = false;
|
||||
private boolean isBoySelected = false;
|
||||
private DateSelectDialog mDateSelectDialog;
|
||||
private boolean isFirst = false;
|
||||
UserBean userBean;
|
||||
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
|
||||
private String avatar;
|
||||
private String birthdy;
|
||||
private String init_code;
|
||||
@Override
|
||||
protected void initData() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
super.initView();
|
||||
Bundle extras = getIntent().getExtras();
|
||||
userBean= extras != null ? (UserBean) extras.getSerializable("userBean") : null;
|
||||
assert userBean != null;
|
||||
if (userBean.getNickname()!=null&&!"".equals(userBean.getNickname())){
|
||||
MvpPre.updateNickname();
|
||||
}else {
|
||||
mBinding.edNickName.setText(userBean.getNickname());
|
||||
}
|
||||
mBinding.edNickName.setClearIconVisible(true);
|
||||
ImageUtils.loadHeadCC(userBean.getAvatar(), mBinding.rvUserHead);
|
||||
if (!TextUtils.isEmpty(user_no_parent) && !"0".equals(user_no_parent)) {
|
||||
mBinding.etInviteCode.setText(user_no_parent);
|
||||
mBinding.etInviteCode.setKeyListener(null);
|
||||
mBinding.etInviteCode.setFocusable(false);
|
||||
mBinding.etInviteCode.setFocusableInTouchMode(false);
|
||||
}
|
||||
startTime = System.currentTimeMillis();
|
||||
mBinding.flCommit.setOnClickListener(this::onClick);
|
||||
mBinding.rlNv.setOnClickListener(this::onClick);
|
||||
mBinding.rlNan.setOnClickListener(this::onClick);
|
||||
mBinding.rvUserHead.setOnClickListener(this::onClick);
|
||||
mBinding.tvUserName.setOnClickListener(this::onClick);
|
||||
mBinding.ivGirl.setOnClickListener(this::onClick);
|
||||
mBinding.ivBoy.setOnClickListener(this::onClick);
|
||||
mBinding.tvDay.setOnClickListener(this::onClick);
|
||||
mBinding.tvMonth.setOnClickListener(this::onClick);
|
||||
mBinding.tvYear.setOnClickListener(this::onClick);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_improve_info;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ImproveInfoPresenter bindPresenter() {
|
||||
return new ImproveInfoPresenter(this, this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
stayTime = (System.currentTimeMillis() - startTime) / 1000;
|
||||
// AppLogUtil.reportAppLog(AppLogEvent.A0301, "stend_time", String.valueOf(stayTime));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
int id = v.getId();
|
||||
if (id == R.id.fl_commit) {
|
||||
nickname = mBinding.edNickName.getText().toString().trim();
|
||||
String inviteCode = mBinding.etInviteCode.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(nickname)) {
|
||||
com.hjq.toast.ToastUtils.show("请输入昵称");
|
||||
// ToastUtils.showShort("请输入昵称");
|
||||
return;
|
||||
}
|
||||
if (sex==null||TextUtils.isEmpty(sex)) {
|
||||
com.hjq.toast.ToastUtils.show("请选择性别");
|
||||
// ToastUtils.showShort("请选择性别");
|
||||
return;
|
||||
}
|
||||
if (!inviteCode.isEmpty() || inviteCode != null) {
|
||||
// map.put("user_no", inviteCode);
|
||||
init_code = inviteCode;
|
||||
}
|
||||
map.put("sex", sex);
|
||||
String user_id="";
|
||||
if (userBean!=null){
|
||||
user_id = userBean.getUser_id() + "";
|
||||
}
|
||||
assert userBean != null;
|
||||
userBean.setSex(Integer.parseInt(sex));
|
||||
userBean.setNickname(nickname);
|
||||
userBean.setAvatar(avatar);
|
||||
SpUtil.saveUserBean(userBean);
|
||||
MvpPre.upDateUserInfo(nickname, birthdy, sex, avatar, init_code, user_id);
|
||||
// MvpPre.fill(inviteCode, nickname, sex);
|
||||
|
||||
// try {
|
||||
// AppLogUtil.reportAppLog(AppLogEvent.A0302, new JSONObject()
|
||||
// .put("sex", sex).put("nick_name", nickname)
|
||||
// .put("invitation_code", mBinding.etInviteCode.getText().toString()));
|
||||
// } catch (JSONException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
} else if (id == R.id.rl_nv) {
|
||||
mBinding.flCommit.setEnabled(true);
|
||||
mBinding.rlNan.setSelected(false);
|
||||
mBinding.rlNv.setSelected(true);
|
||||
sex = "2";
|
||||
} else if (id == R.id.rl_nan) {
|
||||
mBinding.flCommit.setEnabled(true);
|
||||
mBinding.rlNan.setSelected(true);
|
||||
mBinding.rlNv.setSelected(false);
|
||||
sex = "1";
|
||||
} else if (id == R.id.rv_user_head) {
|
||||
startChoosePhoto(1, PictureConfig.CHOOSE_REQUEST);
|
||||
} else if (id == R.id.tv_user_name) {
|
||||
MvpPre.updateNickname();
|
||||
} else if (id == R.id.iv_girl) {
|
||||
if (!isGirlSelected) {
|
||||
mBinding.ivGirl.setImageResource(com.qxcm.moduleutil.R.mipmap.check_girl1);
|
||||
mBinding.ivBoy.setImageResource(com.qxcm.moduleutil.R.mipmap.check_boy);
|
||||
isGirlSelected = true;
|
||||
isBoySelected = false;
|
||||
if (!isFirst) {
|
||||
MvpPre.getSexTrue("2");
|
||||
}
|
||||
sex = "2";
|
||||
}
|
||||
} else if (id == R.id.iv_boy) {
|
||||
if (!isBoySelected) {
|
||||
mBinding.ivGirl.setImageResource(com.qxcm.moduleutil.R.mipmap.check_girl);
|
||||
mBinding.ivBoy.setImageResource(com.qxcm.moduleutil.R.mipmap.check_boy1);
|
||||
isBoySelected = true;
|
||||
isGirlSelected = false;
|
||||
if (!isFirst) {
|
||||
MvpPre.getSexTrue("1");
|
||||
}
|
||||
sex = "1";
|
||||
}
|
||||
} else if (id == R.id.tv_day || id == R.id.tv_month || id == R.id.tv_year) {
|
||||
if (mDateSelectDialog == null) {
|
||||
mDateSelectDialog = new DateSelectDialog(this);
|
||||
mDateSelectDialog.setmOnSelectDate(this);
|
||||
}
|
||||
mDateSelectDialog.show();
|
||||
}
|
||||
}
|
||||
|
||||
private void startChoosePhoto(int mimeType, int requestCode) {
|
||||
|
||||
|
||||
PictureSelector.create(this)
|
||||
.openGallery(mimeType)
|
||||
.setSelectorUIStyle(new PictureSelectorStyle())
|
||||
.isGif(false)
|
||||
.setImageEngine(GlideEngine.createGlideEngine())
|
||||
.setMaxSelectNum(1)
|
||||
.isPreviewImage(true)
|
||||
.isDisplayCamera(true)
|
||||
.setOutputCameraDir(Constants.FILE_PATH)
|
||||
.isOriginalSkipCompress(true)
|
||||
.forResult(requestCode); //结果回调onActivityResult code
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if (resultCode == RESULT_OK && data != null) {
|
||||
switch (requestCode) {
|
||||
case PictureConfig.CHOOSE_REQUEST:
|
||||
List<LocalMedia> localMedia = PictureSelector.obtainSelectorList(data);
|
||||
if (localMedia != null && localMedia.size() != 0) {
|
||||
LocalMedia imgMedia = localMedia.get(0);
|
||||
String url;
|
||||
if (imgMedia.isCompressed()) {
|
||||
url = imgMedia.getCompressPath();
|
||||
} else {
|
||||
url = imgMedia.getRealPath();
|
||||
}
|
||||
MvpPre.uploadFile(new File(url), 0);
|
||||
}
|
||||
break;
|
||||
case PictureConfig.REQUEST_CAMERA:
|
||||
List<LocalMedia> localMedia1 = PictureSelector.obtainSelectorList(data);
|
||||
if (localMedia1 != null && localMedia1.size() != 0) {
|
||||
LocalMedia imgMedia = localMedia1.get(0);
|
||||
MvpPre.uploadFile(new File(imgMedia.getRealPath()), 3);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void upLoadSuccess(String url, int type) {
|
||||
// MvpPre.updateAvatar(url);
|
||||
ImageUtils.loadHeadCC(url, mBinding.rvUserHead);
|
||||
map.put("avatar", url);
|
||||
avatar=url;
|
||||
isFirst = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateAvatarSuccess(String headPicture) {
|
||||
ImageLoader.loadHead(this, mBinding.rvUserHead, headPicture);
|
||||
map.put("avatar", headPicture);
|
||||
avatar=headPicture;
|
||||
isFirst = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateNicknameSuccess(String nickname) {
|
||||
mBinding.edNickName.setText(nickname);
|
||||
map.put("nickname", nickname);
|
||||
this.nickname=nickname;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSexTrue(String sex1) {
|
||||
ImageLoader.loadHead(this, mBinding.rvUserHead,sex1);
|
||||
map.put("avatar", sex1);
|
||||
// sex=sex1;
|
||||
avatar=sex1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSuccess(UserBean userBean) {
|
||||
// SpUtil.saveUserBean(userBean);
|
||||
EventBus.getDefault().post(SpUtil.getUserBean());
|
||||
|
||||
// TUILogin.login(ImproveInfoActivity.this, CommonAppContext.getInstance().getCurrentEnvironment().getSdkAppId(), String.valueOf(userBean.getUser_code()), userBean.getTencent_im(), new TUICallback() {
|
||||
// @Override
|
||||
// public void onError(final int code, final String desc) {
|
||||
// LogUtils.e("@@@",code,"描述:",desc);
|
||||
// }
|
||||
// @Override
|
||||
// public void onSuccess() {
|
||||
// LogUtils.e("@@@","成功");
|
||||
// }
|
||||
// });
|
||||
|
||||
Intent intent = new Intent(this, MainActivity.class);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void selectDate(String year, String month, String day) {
|
||||
mBinding.tvDay.setText(day);
|
||||
mBinding.tvMonth.setText(month);
|
||||
mBinding.tvYear.setText(year);
|
||||
map.put("birthday", year + "-" + month + "-" + day);
|
||||
birthdy=year + "-" + month + "-" + day;
|
||||
}
|
||||
|
||||
}
|
||||