diff --git a/afb77au/.gitignore b/afb77au/.gitignore new file mode 100644 index 0000000..956c004 --- /dev/null +++ b/afb77au/.gitignore @@ -0,0 +1,2 @@ +/build +/release \ No newline at end of file diff --git a/afb77au/build.gradle b/afb77au/build.gradle new file mode 100644 index 0000000..5b36edd --- /dev/null +++ b/afb77au/build.gradle @@ -0,0 +1,93 @@ +plugins { + id 'com.android.application' + id 'com.google.gms.google-services' +} + +def appOutPutName = "we1win" + +android { + namespace rootProject.ext.namespace + compileSdk 36 + defaultConfig { + minSdkVersion 24 + targetSdk 36 + versionCode rootProject.ext.versionCode + versionName rootProject.ext.versionName + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + + applicationId "com.xyz.we1win" + + //app大背景色 + resValue('color', 'windows_color', '#ECF6FF') + //底部导航栏颜色 大背景颜色为 windows_color——style_color的上下渐变色 + resValue('color', 'style_color', '#2377C2') + //app 名字 + resValue('string', 'app_name', 'WE1WIN') + + + buildConfigField "String", "BASE_URL", "\"https://live22x.com/\"" + buildConfigField "int", "USERID", "120" + buildConfigField "boolean", "IS_WHITE", "false" + buildConfigField "boolean", "IS_ROUND", "true" + buildConfigField "int", "ROUND_RADIUS", "10" + buildConfigField "boolean", "HAS_CONTACT", "true" + buildConfigField "boolean", "HAS_HOOK", "false" + + } + buildFeatures { + buildConfig = true + } + + signingConfigs { + debug { + storeFile file('telur33.jks') + storePassword "android2014" + keyAlias 'key0' + keyPassword "android2014" + } + release { + storeFile file('telur33.jks') + storePassword "android2014" + keyAlias 'key0' + keyPassword "android2014" + } + } + + buildTypes { + release { + signingConfig signingConfigs.release + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility rootProject.ext.JAVA_VERSION + targetCompatibility rootProject.ext.JAVA_VERSION + } + + applicationVariants.all { variant -> + variant.outputs.all { + def outputDir = new File(rootProject.ext.outputPath) + outputDir.mkdirs() + def outputFileName = "${appOutPutName}.apk" + setOutputFileName(outputFileName) + def newOutputFile = new File(outputDir, outputFileName) + newOutputFile.parentFile.mkdirs() + variant.assemble.doLast { + try { + java.nio.file.Files.copy( + outputFile.toPath(), + newOutputFile.toPath(), + java.nio.file.StandardCopyOption.REPLACE_EXISTING + ) + } catch (java.io.IOException e) { + } + } + } + } + +} + +dependencies { + implementation project(path: ':base') +} \ No newline at end of file diff --git a/afb77au/google-services.json b/afb77au/google-services.json new file mode 100644 index 0000000..b795da1 --- /dev/null +++ b/afb77au/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "499658261788", + "project_id": "wew1wew-494b5", + "storage_bucket": "wew1wew-494b5.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:499658261788:android:d1bc33e4911c7ed34526d9", + "android_client_info": { + "package_name": "com.xyz.we1win" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyCVEvsHEC2TIlTAS_SX_z4mThfbTjKmefI" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/afb77au/justlet.jks b/afb77au/justlet.jks new file mode 100644 index 0000000..a33b839 Binary files /dev/null and b/afb77au/justlet.jks differ diff --git a/afb77au/proguard-rules.pro b/afb77au/proguard-rules.pro new file mode 100644 index 0000000..107b7ee --- /dev/null +++ b/afb77au/proguard-rules.pro @@ -0,0 +1,32 @@ +# 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 + +-dontwarn dalvik.** +-dontwarn com.tencent.smtt.** + +-keep class com.tencent.smtt.** { + *; +} + +-keep class com.tencent.tbs.** { + *; +} \ No newline at end of file diff --git a/afb77au/src/main/AndroidManifest.xml b/afb77au/src/main/AndroidManifest.xml new file mode 100644 index 0000000..7cbc0e0 --- /dev/null +++ b/afb77au/src/main/AndroidManifest.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/afb77au/src/main/java/com/webclip/base/IndexActivity.java b/afb77au/src/main/java/com/webclip/base/IndexActivity.java new file mode 100644 index 0000000..c8e4780 --- /dev/null +++ b/afb77au/src/main/java/com/webclip/base/IndexActivity.java @@ -0,0 +1,79 @@ +package com.webclip.base; + +import android.os.Bundle; + +import com.google.firebase.messaging.FirebaseMessaging; + +public class IndexActivity extends MainActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + initConfig(); + super.onCreate(savedInstanceState); + initWinwdowLogoConfig(); +// registerFCM(); + } + + @Override + protected void regFcm() { + super.regFcm(); + registerFCM(); + } + + /** + * 注册FCM + */ + private void registerFCM() { + //订阅主题 + LogUtils.i("支持FCM 去注册"); + try { + FirebaseMessaging.getInstance().subscribeToTopic("demo") + .addOnCompleteListener(task -> { + String msg = "Subscribed"; + if (!task.isSuccessful()) { + msg = "Subscribe failed"; + }else{ + checkNotify(); + } + LogUtils.i("支持FCM 结果:"+msg); + }); + }catch (Exception e){ + e.printStackTrace(); + LogUtils.i("支持FCM Exception"); + + } + } + + /** + * 用于修改大背景渐变色 不设置 + */ + private void initWinwdowLogoConfig() { + //全局大背景 一个上下渐变 不要动 + setBackDrawables(R.drawable.big_bg); + setImageView(BuildConfig.IS_ROUND,BuildConfig.ROUND_RADIUS); + getWindow().getDecorView().setBackgroundResource(R.drawable.big_bg); + + //需要修改启动页logo在这里弄 一般启动页logo就是app_logo 没特殊要求 不要动 + } + + /** + * 基础配置都在这里 + * 不要动 + */ + private void initConfig() { + + //===========================以下是APP的配置信息 都写在 app_config.xml中================================== + userId = BuildConfig.USERID; + saveInt(IndexActivity.this,"user_code",userId); + + saveString(this, "base_url",BuildConfig.BASE_URL); + styleColor = getColor(R.color.style_color); + windowsColor = getColor(R.color.windows_color); + isWhite = BuildConfig.IS_WHITE; + hasContact = BuildConfig.HAS_CONTACT; + hasHook = BuildConfig.HAS_HOOK; + + //===========================以上是APP的配置信息 都写在 app_config.xml中================================== + } + +} diff --git a/afb77au/src/main/java/com/webclip/base/MyFirebaseMessageingService.java b/afb77au/src/main/java/com/webclip/base/MyFirebaseMessageingService.java new file mode 100644 index 0000000..36f2d65 --- /dev/null +++ b/afb77au/src/main/java/com/webclip/base/MyFirebaseMessageingService.java @@ -0,0 +1,125 @@ +package com.webclip.base; + +import android.app.NotificationChannel; +import android.app.NotificationManager; +import android.app.PendingIntent; +import android.content.ComponentName; +import android.content.Context; +import android.content.Intent; +import android.os.Build; +import androidx.annotation.NonNull; +import androidx.core.app.NotificationCompat; +import com.google.firebase.messaging.FirebaseMessagingService; +import com.google.firebase.messaging.RemoteMessage; +import com.google.gson.Gson; +import com.webclip.base.GsonUtils; +import com.webclip.base.MessageInfo; +import java.util.Map; +import java.util.Random; + +public class MyFirebaseMessageingService extends FirebaseMessagingService { + + public MyFirebaseMessageingService() { + } + + @Override + public void onMessageReceived(@NonNull RemoteMessage remoteMessage) { + super.onMessageReceived(remoteMessage); + Map serviceData = remoteMessage.getData(); //后台推送数据 + if (serviceData != null && serviceData.containsKey("message")) { + String value = serviceData.get("message"); + Gson gson = new Gson(); + MessageInfo messageInfo = gson.fromJson(value, MessageInfo.class); + showNotification(messageInfo); + } else { + //收到通知 创建notify + if (remoteMessage.getNotification() != null) { + showNotification(remoteMessage.getNotification().getTitle(), remoteMessage.getNotification().getBody()); + } + } + } + + private void showNotification(MessageInfo messageInfo) { + Intent notifyIntent = new Intent(this, IndexActivity.class); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) { + ComponentName launchComponent = null; + launchComponent = getApplication() + .getPackageManager() + .getLaunchIntentForPackage(getApplication().getPackageName()) + .getComponent(); + notifyIntent.setComponent(launchComponent); + } + notifyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); + notifyIntent.setAction(Intent.ACTION_VIEW); + notifyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // 必须 + notifyIntent.putExtra("message", messageInfo); + PendingIntent pendingIntent = PendingIntent.getActivity(this, new Random().nextInt(10000), notifyIntent, PendingIntent.FLAG_IMMUTABLE); + NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); + NotificationChannel channelwinway = null; + NotificationCompat.Builder notificationBuilder = null; + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + channelwinway = new NotificationChannel(getString(R.string.app_name), "notify", NotificationManager.IMPORTANCE_DEFAULT); + channelwinway.enableLights(true); + channelwinway.enableVibration(true); + notificationManager.createNotificationChannel(channelwinway); + notificationBuilder = new NotificationCompat.Builder(this, channelwinway.getId()) + .setSmallIcon(R.mipmap.app_logo) + .setContentTitle(messageInfo.getTitle()) + .setContentText(messageInfo.getContent()) + .setAutoCancel(true) + .setContentIntent(pendingIntent); + } else { + notificationBuilder = new NotificationCompat.Builder(this, getString(R.string.app_name)) + .setSmallIcon(R.mipmap.app_logo) + .setContentTitle(messageInfo.getTitle()) + .setContentText(messageInfo.getContent()) + .setAutoCancel(true) + .setContentIntent(pendingIntent); + } + notificationManager.notify(0, notificationBuilder.build()); + } + + private void showNotification(String title, String body) { + Intent notifyIntent = new Intent(this, IndexActivity.class); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) { + ComponentName launchComponent = null; + launchComponent = getApplication() + .getPackageManager() + .getLaunchIntentForPackage(getApplication().getPackageName()) + .getComponent(); + notifyIntent.setComponent(launchComponent); + } + notifyIntent.putExtra("message", body); + notifyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); + notifyIntent.setAction(Intent.ACTION_VIEW); + notifyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // 必须 + PendingIntent pendingIntent = PendingIntent.getActivity(this, new Random().nextInt(10000), notifyIntent, PendingIntent.FLAG_IMMUTABLE); + NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); + NotificationChannel channelwinway = null; + NotificationCompat.Builder notificationBuilder = null; + MessageInfo messageInfo = GsonUtils.getObjFromJSON(body, MessageInfo.class); + if (messageInfo != null) { + body = messageInfo.getContent(); + } + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + channelwinway = new NotificationChannel(getString(R.string.app_name), "notify", NotificationManager.IMPORTANCE_DEFAULT); + channelwinway.enableLights(true); + channelwinway.enableVibration(true); + notificationManager.createNotificationChannel(channelwinway); + notificationBuilder = new NotificationCompat.Builder(this, channelwinway.getId()) + .setSmallIcon(R.mipmap.app_logo) + .setContentTitle(title) + .setContentText(body) + .setAutoCancel(true) + .setContentIntent(pendingIntent); + } else { + notificationBuilder = new NotificationCompat.Builder(this, getString(R.string.app_name)) + .setSmallIcon(R.mipmap.app_logo) + .setContentTitle(title) + .setContentText(body) + .setAutoCancel(true) + .setContentIntent(pendingIntent); + } + notificationManager.notify(0, notificationBuilder.build()); + } +} diff --git a/afb77au/src/main/java/com/webclip/base/WebApplication.java b/afb77au/src/main/java/com/webclip/base/WebApplication.java new file mode 100644 index 0000000..36e2512 --- /dev/null +++ b/afb77au/src/main/java/com/webclip/base/WebApplication.java @@ -0,0 +1,19 @@ +package com.webclip.base; + +import android.app.Application; +import android.content.Context; + +import com.webclip.base.LogUtils; + +public class WebApplication extends Application { + + + public static Context application; + @Override + public void onCreate() { + super.onCreate(); +// 设置开启优化方案 + application = this; + LogUtils.isDebug = BuildConfig.BUILD_TYPE.equals("debug"); + } +} diff --git a/afb77au/src/main/res/drawable/big_bg.xml b/afb77au/src/main/res/drawable/big_bg.xml new file mode 100644 index 0000000..aa44959 --- /dev/null +++ b/afb77au/src/main/res/drawable/big_bg.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/afb77au/src/main/res/mipmap-xxhdpi/app_logo.png b/afb77au/src/main/res/mipmap-xxhdpi/app_logo.png new file mode 100644 index 0000000..f79523a Binary files /dev/null and b/afb77au/src/main/res/mipmap-xxhdpi/app_logo.png differ diff --git a/afb77au/src/main/res/values/themes.xml b/afb77au/src/main/res/values/themes.xml new file mode 100644 index 0000000..f1ef249 --- /dev/null +++ b/afb77au/src/main/res/values/themes.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/afb77au/src/main/res/xml/app_updater_paths.xml b/afb77au/src/main/res/xml/app_updater_paths.xml new file mode 100644 index 0000000..1254450 --- /dev/null +++ b/afb77au/src/main/res/xml/app_updater_paths.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/afb77au/src/main/res/xml/network_security_config.xml b/afb77au/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..dca93c0 --- /dev/null +++ b/afb77au/src/main/res/xml/network_security_config.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/afb77au/src/main/res/xml/provider_paths.xml b/afb77au/src/main/res/xml/provider_paths.xml new file mode 100644 index 0000000..c9a897a --- /dev/null +++ b/afb77au/src/main/res/xml/provider_paths.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/afb77au/telur33.jks b/afb77au/telur33.jks new file mode 100644 index 0000000..f00434d Binary files /dev/null and b/afb77au/telur33.jks differ diff --git a/bb8au/.gitignore b/bb8au/.gitignore new file mode 100644 index 0000000..956c004 --- /dev/null +++ b/bb8au/.gitignore @@ -0,0 +1,2 @@ +/build +/release \ No newline at end of file diff --git a/bb8au/build.gradle b/bb8au/build.gradle new file mode 100644 index 0000000..c851d31 --- /dev/null +++ b/bb8au/build.gradle @@ -0,0 +1,93 @@ +plugins { + id 'com.android.application' + id 'com.google.gms.google-services' +} + +def appOutPutName = "gg66au" + +android { + namespace rootProject.ext.namespace + compileSdk 36 + defaultConfig { + minSdkVersion 24 + targetSdk 36 + versionCode rootProject.ext.versionCode + versionName rootProject.ext.versionName + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + + applicationId "com.xyz.gg66au" + + //app大背景色 + resValue('color', 'windows_color', '#04090E') + //底部导航栏颜色 大背景颜色为 windows_color——style_color的上下渐变色 + resValue('color', 'style_color', '#04090E') + //app 名字 + resValue('string', 'app_name', 'GG66AU') + + + buildConfigField "String", "BASE_URL", "\"https://live22x.com/\"" + buildConfigField "int", "USERID", "198" + buildConfigField "boolean", "IS_WHITE", "false" + buildConfigField "boolean", "IS_ROUND", "true" + buildConfigField "int", "ROUND_RADIUS", "10" + buildConfigField "boolean", "HAS_CONTACT", "true" + buildConfigField "boolean", "HAS_HOOK", "false" + + } + buildFeatures { + buildConfig = true + } + + signingConfigs { + debug { + storeFile file('telur33.jks') + storePassword "android2014" + keyAlias 'key0' + keyPassword "android2014" + } + release { + storeFile file('telur33.jks') + storePassword "android2014" + keyAlias 'key0' + keyPassword "android2014" + } + } + + buildTypes { + release { + signingConfig signingConfigs.release + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility rootProject.ext.JAVA_VERSION + targetCompatibility rootProject.ext.JAVA_VERSION + } + + applicationVariants.all { variant -> + variant.outputs.all { + def outputDir = new File(rootProject.ext.outputPath) + outputDir.mkdirs() + def outputFileName = "${appOutPutName}.apk" + setOutputFileName(outputFileName) + def newOutputFile = new File(outputDir, outputFileName) + newOutputFile.parentFile.mkdirs() + variant.assemble.doLast { + try { + java.nio.file.Files.copy( + outputFile.toPath(), + newOutputFile.toPath(), + java.nio.file.StandardCopyOption.REPLACE_EXISTING + ) + } catch (java.io.IOException e) { + } + } + } + } + +} + +dependencies { + implementation project(path: ':base') +} \ No newline at end of file diff --git a/bb8au/google-services.json b/bb8au/google-services.json new file mode 100644 index 0000000..1e8f7f1 --- /dev/null +++ b/bb8au/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "757741719996", + "project_id": "notig4g66", + "storage_bucket": "notig4g66.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:757741719996:android:6fa024af53b8cb5c45dbb9", + "android_client_info": { + "package_name": "com.xyz.gg66au" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyA9kx3l5khta7C6YXpj6GO48KXNg9LMETg" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/bb8au/justlet.jks b/bb8au/justlet.jks new file mode 100644 index 0000000..a33b839 Binary files /dev/null and b/bb8au/justlet.jks differ diff --git a/bb8au/proguard-rules.pro b/bb8au/proguard-rules.pro new file mode 100644 index 0000000..107b7ee --- /dev/null +++ b/bb8au/proguard-rules.pro @@ -0,0 +1,32 @@ +# 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 + +-dontwarn dalvik.** +-dontwarn com.tencent.smtt.** + +-keep class com.tencent.smtt.** { + *; +} + +-keep class com.tencent.tbs.** { + *; +} \ No newline at end of file diff --git a/bb8au/src/main/AndroidManifest.xml b/bb8au/src/main/AndroidManifest.xml new file mode 100644 index 0000000..7cbc0e0 --- /dev/null +++ b/bb8au/src/main/AndroidManifest.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/bb8au/src/main/java/com/webclip/base/IndexActivity.java b/bb8au/src/main/java/com/webclip/base/IndexActivity.java new file mode 100644 index 0000000..c8e4780 --- /dev/null +++ b/bb8au/src/main/java/com/webclip/base/IndexActivity.java @@ -0,0 +1,79 @@ +package com.webclip.base; + +import android.os.Bundle; + +import com.google.firebase.messaging.FirebaseMessaging; + +public class IndexActivity extends MainActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + initConfig(); + super.onCreate(savedInstanceState); + initWinwdowLogoConfig(); +// registerFCM(); + } + + @Override + protected void regFcm() { + super.regFcm(); + registerFCM(); + } + + /** + * 注册FCM + */ + private void registerFCM() { + //订阅主题 + LogUtils.i("支持FCM 去注册"); + try { + FirebaseMessaging.getInstance().subscribeToTopic("demo") + .addOnCompleteListener(task -> { + String msg = "Subscribed"; + if (!task.isSuccessful()) { + msg = "Subscribe failed"; + }else{ + checkNotify(); + } + LogUtils.i("支持FCM 结果:"+msg); + }); + }catch (Exception e){ + e.printStackTrace(); + LogUtils.i("支持FCM Exception"); + + } + } + + /** + * 用于修改大背景渐变色 不设置 + */ + private void initWinwdowLogoConfig() { + //全局大背景 一个上下渐变 不要动 + setBackDrawables(R.drawable.big_bg); + setImageView(BuildConfig.IS_ROUND,BuildConfig.ROUND_RADIUS); + getWindow().getDecorView().setBackgroundResource(R.drawable.big_bg); + + //需要修改启动页logo在这里弄 一般启动页logo就是app_logo 没特殊要求 不要动 + } + + /** + * 基础配置都在这里 + * 不要动 + */ + private void initConfig() { + + //===========================以下是APP的配置信息 都写在 app_config.xml中================================== + userId = BuildConfig.USERID; + saveInt(IndexActivity.this,"user_code",userId); + + saveString(this, "base_url",BuildConfig.BASE_URL); + styleColor = getColor(R.color.style_color); + windowsColor = getColor(R.color.windows_color); + isWhite = BuildConfig.IS_WHITE; + hasContact = BuildConfig.HAS_CONTACT; + hasHook = BuildConfig.HAS_HOOK; + + //===========================以上是APP的配置信息 都写在 app_config.xml中================================== + } + +} diff --git a/bb8au/src/main/java/com/webclip/base/MyFirebaseMessageingService.java b/bb8au/src/main/java/com/webclip/base/MyFirebaseMessageingService.java new file mode 100644 index 0000000..36f2d65 --- /dev/null +++ b/bb8au/src/main/java/com/webclip/base/MyFirebaseMessageingService.java @@ -0,0 +1,125 @@ +package com.webclip.base; + +import android.app.NotificationChannel; +import android.app.NotificationManager; +import android.app.PendingIntent; +import android.content.ComponentName; +import android.content.Context; +import android.content.Intent; +import android.os.Build; +import androidx.annotation.NonNull; +import androidx.core.app.NotificationCompat; +import com.google.firebase.messaging.FirebaseMessagingService; +import com.google.firebase.messaging.RemoteMessage; +import com.google.gson.Gson; +import com.webclip.base.GsonUtils; +import com.webclip.base.MessageInfo; +import java.util.Map; +import java.util.Random; + +public class MyFirebaseMessageingService extends FirebaseMessagingService { + + public MyFirebaseMessageingService() { + } + + @Override + public void onMessageReceived(@NonNull RemoteMessage remoteMessage) { + super.onMessageReceived(remoteMessage); + Map serviceData = remoteMessage.getData(); //后台推送数据 + if (serviceData != null && serviceData.containsKey("message")) { + String value = serviceData.get("message"); + Gson gson = new Gson(); + MessageInfo messageInfo = gson.fromJson(value, MessageInfo.class); + showNotification(messageInfo); + } else { + //收到通知 创建notify + if (remoteMessage.getNotification() != null) { + showNotification(remoteMessage.getNotification().getTitle(), remoteMessage.getNotification().getBody()); + } + } + } + + private void showNotification(MessageInfo messageInfo) { + Intent notifyIntent = new Intent(this, IndexActivity.class); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) { + ComponentName launchComponent = null; + launchComponent = getApplication() + .getPackageManager() + .getLaunchIntentForPackage(getApplication().getPackageName()) + .getComponent(); + notifyIntent.setComponent(launchComponent); + } + notifyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); + notifyIntent.setAction(Intent.ACTION_VIEW); + notifyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // 必须 + notifyIntent.putExtra("message", messageInfo); + PendingIntent pendingIntent = PendingIntent.getActivity(this, new Random().nextInt(10000), notifyIntent, PendingIntent.FLAG_IMMUTABLE); + NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); + NotificationChannel channelwinway = null; + NotificationCompat.Builder notificationBuilder = null; + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + channelwinway = new NotificationChannel(getString(R.string.app_name), "notify", NotificationManager.IMPORTANCE_DEFAULT); + channelwinway.enableLights(true); + channelwinway.enableVibration(true); + notificationManager.createNotificationChannel(channelwinway); + notificationBuilder = new NotificationCompat.Builder(this, channelwinway.getId()) + .setSmallIcon(R.mipmap.app_logo) + .setContentTitle(messageInfo.getTitle()) + .setContentText(messageInfo.getContent()) + .setAutoCancel(true) + .setContentIntent(pendingIntent); + } else { + notificationBuilder = new NotificationCompat.Builder(this, getString(R.string.app_name)) + .setSmallIcon(R.mipmap.app_logo) + .setContentTitle(messageInfo.getTitle()) + .setContentText(messageInfo.getContent()) + .setAutoCancel(true) + .setContentIntent(pendingIntent); + } + notificationManager.notify(0, notificationBuilder.build()); + } + + private void showNotification(String title, String body) { + Intent notifyIntent = new Intent(this, IndexActivity.class); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) { + ComponentName launchComponent = null; + launchComponent = getApplication() + .getPackageManager() + .getLaunchIntentForPackage(getApplication().getPackageName()) + .getComponent(); + notifyIntent.setComponent(launchComponent); + } + notifyIntent.putExtra("message", body); + notifyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); + notifyIntent.setAction(Intent.ACTION_VIEW); + notifyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // 必须 + PendingIntent pendingIntent = PendingIntent.getActivity(this, new Random().nextInt(10000), notifyIntent, PendingIntent.FLAG_IMMUTABLE); + NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); + NotificationChannel channelwinway = null; + NotificationCompat.Builder notificationBuilder = null; + MessageInfo messageInfo = GsonUtils.getObjFromJSON(body, MessageInfo.class); + if (messageInfo != null) { + body = messageInfo.getContent(); + } + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + channelwinway = new NotificationChannel(getString(R.string.app_name), "notify", NotificationManager.IMPORTANCE_DEFAULT); + channelwinway.enableLights(true); + channelwinway.enableVibration(true); + notificationManager.createNotificationChannel(channelwinway); + notificationBuilder = new NotificationCompat.Builder(this, channelwinway.getId()) + .setSmallIcon(R.mipmap.app_logo) + .setContentTitle(title) + .setContentText(body) + .setAutoCancel(true) + .setContentIntent(pendingIntent); + } else { + notificationBuilder = new NotificationCompat.Builder(this, getString(R.string.app_name)) + .setSmallIcon(R.mipmap.app_logo) + .setContentTitle(title) + .setContentText(body) + .setAutoCancel(true) + .setContentIntent(pendingIntent); + } + notificationManager.notify(0, notificationBuilder.build()); + } +} diff --git a/bb8au/src/main/java/com/webclip/base/WebApplication.java b/bb8au/src/main/java/com/webclip/base/WebApplication.java new file mode 100644 index 0000000..36e2512 --- /dev/null +++ b/bb8au/src/main/java/com/webclip/base/WebApplication.java @@ -0,0 +1,19 @@ +package com.webclip.base; + +import android.app.Application; +import android.content.Context; + +import com.webclip.base.LogUtils; + +public class WebApplication extends Application { + + + public static Context application; + @Override + public void onCreate() { + super.onCreate(); +// 设置开启优化方案 + application = this; + LogUtils.isDebug = BuildConfig.BUILD_TYPE.equals("debug"); + } +} diff --git a/bb8au/src/main/res/drawable/big_bg.xml b/bb8au/src/main/res/drawable/big_bg.xml new file mode 100644 index 0000000..aa44959 --- /dev/null +++ b/bb8au/src/main/res/drawable/big_bg.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/bb8au/src/main/res/mipmap-xxhdpi/app_logo.png b/bb8au/src/main/res/mipmap-xxhdpi/app_logo.png new file mode 100644 index 0000000..81418ef Binary files /dev/null and b/bb8au/src/main/res/mipmap-xxhdpi/app_logo.png differ diff --git a/bb8au/src/main/res/values/themes.xml b/bb8au/src/main/res/values/themes.xml new file mode 100644 index 0000000..f1ef249 --- /dev/null +++ b/bb8au/src/main/res/values/themes.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/bb8au/src/main/res/xml/app_updater_paths.xml b/bb8au/src/main/res/xml/app_updater_paths.xml new file mode 100644 index 0000000..1254450 --- /dev/null +++ b/bb8au/src/main/res/xml/app_updater_paths.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/bb8au/src/main/res/xml/network_security_config.xml b/bb8au/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..dca93c0 --- /dev/null +++ b/bb8au/src/main/res/xml/network_security_config.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/bb8au/src/main/res/xml/provider_paths.xml b/bb8au/src/main/res/xml/provider_paths.xml new file mode 100644 index 0000000..c9a897a --- /dev/null +++ b/bb8au/src/main/res/xml/provider_paths.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/bb8au/telur33.jks b/bb8au/telur33.jks new file mode 100644 index 0000000..f00434d Binary files /dev/null and b/bb8au/telur33.jks differ diff --git a/be9au/.gitignore b/be9au/.gitignore new file mode 100644 index 0000000..956c004 --- /dev/null +++ b/be9au/.gitignore @@ -0,0 +1,2 @@ +/build +/release \ No newline at end of file diff --git a/be9au/build.gradle b/be9au/build.gradle new file mode 100644 index 0000000..53d6b6a --- /dev/null +++ b/be9au/build.gradle @@ -0,0 +1,93 @@ +plugins { + id 'com.android.application' + id 'com.google.gms.google-services' +} + +def appOutPutName = "bb8au" + +android { + namespace rootProject.ext.namespace + compileSdk 36 + defaultConfig { + minSdkVersion 24 + targetSdk 36 + versionCode rootProject.ext.versionCode + versionName rootProject.ext.versionName + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + + applicationId "com.xyz.bb8au" + + //app大背景色 + resValue('color', 'windows_color', '#000000') + //底部导航栏颜色 大背景颜色为 windows_color——style_color的上下渐变色 + resValue('color', 'style_color', '#000000') + //app 名字 + resValue('string', 'app_name', 'BB8AU') + + + buildConfigField "String", "BASE_URL", "\"https://live22x.com/\"" + buildConfigField "int", "USERID", "207" + buildConfigField "boolean", "IS_WHITE", "false" + buildConfigField "boolean", "IS_ROUND", "true" + buildConfigField "int", "ROUND_RADIUS", "10" + buildConfigField "boolean", "HAS_CONTACT", "true" + buildConfigField "boolean", "HAS_HOOK", "false" + + } + buildFeatures { + buildConfig = true + } + + signingConfigs { + debug { + storeFile file('telur33.jks') + storePassword "android2014" + keyAlias 'key0' + keyPassword "android2014" + } + release { + storeFile file('telur33.jks') + storePassword "android2014" + keyAlias 'key0' + keyPassword "android2014" + } + } + + buildTypes { + release { + signingConfig signingConfigs.release + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility rootProject.ext.JAVA_VERSION + targetCompatibility rootProject.ext.JAVA_VERSION + } + + applicationVariants.all { variant -> + variant.outputs.all { + def outputDir = new File(rootProject.ext.outputPath) + outputDir.mkdirs() + def outputFileName = "${appOutPutName}.apk" + setOutputFileName(outputFileName) + def newOutputFile = new File(outputDir, outputFileName) + newOutputFile.parentFile.mkdirs() + variant.assemble.doLast { + try { + java.nio.file.Files.copy( + outputFile.toPath(), + newOutputFile.toPath(), + java.nio.file.StandardCopyOption.REPLACE_EXISTING + ) + } catch (java.io.IOException e) { + } + } + } + } + +} + +dependencies { + implementation project(path: ':base') +} \ No newline at end of file diff --git a/be9au/google-services.json b/be9au/google-services.json new file mode 100644 index 0000000..d1adaa7 --- /dev/null +++ b/be9au/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "919828684320", + "project_id": "notib4b8a1u", + "storage_bucket": "notib4b8a1u.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:919828684320:android:948fe8043f6c7aecb6a645", + "android_client_info": { + "package_name": "com.xyz.bb8au" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyC0XKgOmXqWB8XbZYKo9d2MD5cXDzFvB4k" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/be9au/justlet.jks b/be9au/justlet.jks new file mode 100644 index 0000000..a33b839 Binary files /dev/null and b/be9au/justlet.jks differ diff --git a/be9au/proguard-rules.pro b/be9au/proguard-rules.pro new file mode 100644 index 0000000..107b7ee --- /dev/null +++ b/be9au/proguard-rules.pro @@ -0,0 +1,32 @@ +# 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 + +-dontwarn dalvik.** +-dontwarn com.tencent.smtt.** + +-keep class com.tencent.smtt.** { + *; +} + +-keep class com.tencent.tbs.** { + *; +} \ No newline at end of file diff --git a/be9au/src/main/AndroidManifest.xml b/be9au/src/main/AndroidManifest.xml new file mode 100644 index 0000000..7cbc0e0 --- /dev/null +++ b/be9au/src/main/AndroidManifest.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/be9au/src/main/java/com/webclip/base/IndexActivity.java b/be9au/src/main/java/com/webclip/base/IndexActivity.java new file mode 100644 index 0000000..c8e4780 --- /dev/null +++ b/be9au/src/main/java/com/webclip/base/IndexActivity.java @@ -0,0 +1,79 @@ +package com.webclip.base; + +import android.os.Bundle; + +import com.google.firebase.messaging.FirebaseMessaging; + +public class IndexActivity extends MainActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + initConfig(); + super.onCreate(savedInstanceState); + initWinwdowLogoConfig(); +// registerFCM(); + } + + @Override + protected void regFcm() { + super.regFcm(); + registerFCM(); + } + + /** + * 注册FCM + */ + private void registerFCM() { + //订阅主题 + LogUtils.i("支持FCM 去注册"); + try { + FirebaseMessaging.getInstance().subscribeToTopic("demo") + .addOnCompleteListener(task -> { + String msg = "Subscribed"; + if (!task.isSuccessful()) { + msg = "Subscribe failed"; + }else{ + checkNotify(); + } + LogUtils.i("支持FCM 结果:"+msg); + }); + }catch (Exception e){ + e.printStackTrace(); + LogUtils.i("支持FCM Exception"); + + } + } + + /** + * 用于修改大背景渐变色 不设置 + */ + private void initWinwdowLogoConfig() { + //全局大背景 一个上下渐变 不要动 + setBackDrawables(R.drawable.big_bg); + setImageView(BuildConfig.IS_ROUND,BuildConfig.ROUND_RADIUS); + getWindow().getDecorView().setBackgroundResource(R.drawable.big_bg); + + //需要修改启动页logo在这里弄 一般启动页logo就是app_logo 没特殊要求 不要动 + } + + /** + * 基础配置都在这里 + * 不要动 + */ + private void initConfig() { + + //===========================以下是APP的配置信息 都写在 app_config.xml中================================== + userId = BuildConfig.USERID; + saveInt(IndexActivity.this,"user_code",userId); + + saveString(this, "base_url",BuildConfig.BASE_URL); + styleColor = getColor(R.color.style_color); + windowsColor = getColor(R.color.windows_color); + isWhite = BuildConfig.IS_WHITE; + hasContact = BuildConfig.HAS_CONTACT; + hasHook = BuildConfig.HAS_HOOK; + + //===========================以上是APP的配置信息 都写在 app_config.xml中================================== + } + +} diff --git a/be9au/src/main/java/com/webclip/base/MyFirebaseMessageingService.java b/be9au/src/main/java/com/webclip/base/MyFirebaseMessageingService.java new file mode 100644 index 0000000..36f2d65 --- /dev/null +++ b/be9au/src/main/java/com/webclip/base/MyFirebaseMessageingService.java @@ -0,0 +1,125 @@ +package com.webclip.base; + +import android.app.NotificationChannel; +import android.app.NotificationManager; +import android.app.PendingIntent; +import android.content.ComponentName; +import android.content.Context; +import android.content.Intent; +import android.os.Build; +import androidx.annotation.NonNull; +import androidx.core.app.NotificationCompat; +import com.google.firebase.messaging.FirebaseMessagingService; +import com.google.firebase.messaging.RemoteMessage; +import com.google.gson.Gson; +import com.webclip.base.GsonUtils; +import com.webclip.base.MessageInfo; +import java.util.Map; +import java.util.Random; + +public class MyFirebaseMessageingService extends FirebaseMessagingService { + + public MyFirebaseMessageingService() { + } + + @Override + public void onMessageReceived(@NonNull RemoteMessage remoteMessage) { + super.onMessageReceived(remoteMessage); + Map serviceData = remoteMessage.getData(); //后台推送数据 + if (serviceData != null && serviceData.containsKey("message")) { + String value = serviceData.get("message"); + Gson gson = new Gson(); + MessageInfo messageInfo = gson.fromJson(value, MessageInfo.class); + showNotification(messageInfo); + } else { + //收到通知 创建notify + if (remoteMessage.getNotification() != null) { + showNotification(remoteMessage.getNotification().getTitle(), remoteMessage.getNotification().getBody()); + } + } + } + + private void showNotification(MessageInfo messageInfo) { + Intent notifyIntent = new Intent(this, IndexActivity.class); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) { + ComponentName launchComponent = null; + launchComponent = getApplication() + .getPackageManager() + .getLaunchIntentForPackage(getApplication().getPackageName()) + .getComponent(); + notifyIntent.setComponent(launchComponent); + } + notifyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); + notifyIntent.setAction(Intent.ACTION_VIEW); + notifyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // 必须 + notifyIntent.putExtra("message", messageInfo); + PendingIntent pendingIntent = PendingIntent.getActivity(this, new Random().nextInt(10000), notifyIntent, PendingIntent.FLAG_IMMUTABLE); + NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); + NotificationChannel channelwinway = null; + NotificationCompat.Builder notificationBuilder = null; + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + channelwinway = new NotificationChannel(getString(R.string.app_name), "notify", NotificationManager.IMPORTANCE_DEFAULT); + channelwinway.enableLights(true); + channelwinway.enableVibration(true); + notificationManager.createNotificationChannel(channelwinway); + notificationBuilder = new NotificationCompat.Builder(this, channelwinway.getId()) + .setSmallIcon(R.mipmap.app_logo) + .setContentTitle(messageInfo.getTitle()) + .setContentText(messageInfo.getContent()) + .setAutoCancel(true) + .setContentIntent(pendingIntent); + } else { + notificationBuilder = new NotificationCompat.Builder(this, getString(R.string.app_name)) + .setSmallIcon(R.mipmap.app_logo) + .setContentTitle(messageInfo.getTitle()) + .setContentText(messageInfo.getContent()) + .setAutoCancel(true) + .setContentIntent(pendingIntent); + } + notificationManager.notify(0, notificationBuilder.build()); + } + + private void showNotification(String title, String body) { + Intent notifyIntent = new Intent(this, IndexActivity.class); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) { + ComponentName launchComponent = null; + launchComponent = getApplication() + .getPackageManager() + .getLaunchIntentForPackage(getApplication().getPackageName()) + .getComponent(); + notifyIntent.setComponent(launchComponent); + } + notifyIntent.putExtra("message", body); + notifyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); + notifyIntent.setAction(Intent.ACTION_VIEW); + notifyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // 必须 + PendingIntent pendingIntent = PendingIntent.getActivity(this, new Random().nextInt(10000), notifyIntent, PendingIntent.FLAG_IMMUTABLE); + NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); + NotificationChannel channelwinway = null; + NotificationCompat.Builder notificationBuilder = null; + MessageInfo messageInfo = GsonUtils.getObjFromJSON(body, MessageInfo.class); + if (messageInfo != null) { + body = messageInfo.getContent(); + } + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + channelwinway = new NotificationChannel(getString(R.string.app_name), "notify", NotificationManager.IMPORTANCE_DEFAULT); + channelwinway.enableLights(true); + channelwinway.enableVibration(true); + notificationManager.createNotificationChannel(channelwinway); + notificationBuilder = new NotificationCompat.Builder(this, channelwinway.getId()) + .setSmallIcon(R.mipmap.app_logo) + .setContentTitle(title) + .setContentText(body) + .setAutoCancel(true) + .setContentIntent(pendingIntent); + } else { + notificationBuilder = new NotificationCompat.Builder(this, getString(R.string.app_name)) + .setSmallIcon(R.mipmap.app_logo) + .setContentTitle(title) + .setContentText(body) + .setAutoCancel(true) + .setContentIntent(pendingIntent); + } + notificationManager.notify(0, notificationBuilder.build()); + } +} diff --git a/be9au/src/main/java/com/webclip/base/WebApplication.java b/be9au/src/main/java/com/webclip/base/WebApplication.java new file mode 100644 index 0000000..36e2512 --- /dev/null +++ b/be9au/src/main/java/com/webclip/base/WebApplication.java @@ -0,0 +1,19 @@ +package com.webclip.base; + +import android.app.Application; +import android.content.Context; + +import com.webclip.base.LogUtils; + +public class WebApplication extends Application { + + + public static Context application; + @Override + public void onCreate() { + super.onCreate(); +// 设置开启优化方案 + application = this; + LogUtils.isDebug = BuildConfig.BUILD_TYPE.equals("debug"); + } +} diff --git a/be9au/src/main/res/drawable/big_bg.xml b/be9au/src/main/res/drawable/big_bg.xml new file mode 100644 index 0000000..aa44959 --- /dev/null +++ b/be9au/src/main/res/drawable/big_bg.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/be9au/src/main/res/mipmap-xxhdpi/app_logo.png b/be9au/src/main/res/mipmap-xxhdpi/app_logo.png new file mode 100644 index 0000000..38fb89c Binary files /dev/null and b/be9au/src/main/res/mipmap-xxhdpi/app_logo.png differ diff --git a/be9au/src/main/res/values/themes.xml b/be9au/src/main/res/values/themes.xml new file mode 100644 index 0000000..f1ef249 --- /dev/null +++ b/be9au/src/main/res/values/themes.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/be9au/src/main/res/xml/app_updater_paths.xml b/be9au/src/main/res/xml/app_updater_paths.xml new file mode 100644 index 0000000..1254450 --- /dev/null +++ b/be9au/src/main/res/xml/app_updater_paths.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/be9au/src/main/res/xml/network_security_config.xml b/be9au/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..dca93c0 --- /dev/null +++ b/be9au/src/main/res/xml/network_security_config.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/be9au/src/main/res/xml/provider_paths.xml b/be9au/src/main/res/xml/provider_paths.xml new file mode 100644 index 0000000..c9a897a --- /dev/null +++ b/be9au/src/main/res/xml/provider_paths.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/be9au/telur33.jks b/be9au/telur33.jks new file mode 100644 index 0000000..f00434d Binary files /dev/null and b/be9au/telur33.jks differ diff --git a/gg66au/.gitignore b/gg66au/.gitignore new file mode 100644 index 0000000..956c004 --- /dev/null +++ b/gg66au/.gitignore @@ -0,0 +1,2 @@ +/build +/release \ No newline at end of file diff --git a/gg66au/build.gradle b/gg66au/build.gradle new file mode 100644 index 0000000..1a63d56 --- /dev/null +++ b/gg66au/build.gradle @@ -0,0 +1,93 @@ +plugins { + id 'com.android.application' + id 'com.google.gms.google-services' +} + +def appOutPutName = "afb77au" + +android { + namespace rootProject.ext.namespace + compileSdk 36 + defaultConfig { + minSdkVersion 24 + targetSdk 36 + versionCode rootProject.ext.versionCode + versionName rootProject.ext.versionName + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + + applicationId "com.xyz.afb77au" + + //app大背景色 + resValue('color', 'windows_color', '#E4FBF7') + //底部导航栏颜色 大背景颜色为 windows_color——style_color的上下渐变色 + resValue('color', 'style_color', '#1ABEA8') + //app 名字 + resValue('string', 'app_name', 'AFB77AU') + + + buildConfigField "String", "BASE_URL", "\"https://live22x.com/\"" + buildConfigField "int", "USERID", "143" + buildConfigField "boolean", "IS_WHITE", "false" + buildConfigField "boolean", "IS_ROUND", "true" + buildConfigField "int", "ROUND_RADIUS", "10" + buildConfigField "boolean", "HAS_CONTACT", "true" + buildConfigField "boolean", "HAS_HOOK", "false" + + } + buildFeatures { + buildConfig = true + } + + signingConfigs { + debug { + storeFile file('telur33.jks') + storePassword "android2014" + keyAlias 'key0' + keyPassword "android2014" + } + release { + storeFile file('telur33.jks') + storePassword "android2014" + keyAlias 'key0' + keyPassword "android2014" + } + } + + buildTypes { + release { + signingConfig signingConfigs.release + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility rootProject.ext.JAVA_VERSION + targetCompatibility rootProject.ext.JAVA_VERSION + } + + applicationVariants.all { variant -> + variant.outputs.all { + def outputDir = new File(rootProject.ext.outputPath) + outputDir.mkdirs() + def outputFileName = "${appOutPutName}.apk" + setOutputFileName(outputFileName) + def newOutputFile = new File(outputDir, outputFileName) + newOutputFile.parentFile.mkdirs() + variant.assemble.doLast { + try { + java.nio.file.Files.copy( + outputFile.toPath(), + newOutputFile.toPath(), + java.nio.file.StandardCopyOption.REPLACE_EXISTING + ) + } catch (java.io.IOException e) { + } + } + } + } + +} + +dependencies { + implementation project(path: ':base') +} \ No newline at end of file diff --git a/gg66au/google-services.json b/gg66au/google-services.json new file mode 100644 index 0000000..e2d1d72 --- /dev/null +++ b/gg66au/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "96100481294", + "project_id": "notiaf4b", + "storage_bucket": "notiaf4b.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:96100481294:android:3f23e67f07d110d215bf5f", + "android_client_info": { + "package_name": "com.xyz.afb77au" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyDhI18q_PSnh-2VMmk2U53wW5HfzblJ1-Q" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/gg66au/justlet.jks b/gg66au/justlet.jks new file mode 100644 index 0000000..a33b839 Binary files /dev/null and b/gg66au/justlet.jks differ diff --git a/gg66au/proguard-rules.pro b/gg66au/proguard-rules.pro new file mode 100644 index 0000000..107b7ee --- /dev/null +++ b/gg66au/proguard-rules.pro @@ -0,0 +1,32 @@ +# 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 + +-dontwarn dalvik.** +-dontwarn com.tencent.smtt.** + +-keep class com.tencent.smtt.** { + *; +} + +-keep class com.tencent.tbs.** { + *; +} \ No newline at end of file diff --git a/gg66au/src/main/AndroidManifest.xml b/gg66au/src/main/AndroidManifest.xml new file mode 100644 index 0000000..7cbc0e0 --- /dev/null +++ b/gg66au/src/main/AndroidManifest.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/gg66au/src/main/java/com/webclip/base/IndexActivity.java b/gg66au/src/main/java/com/webclip/base/IndexActivity.java new file mode 100644 index 0000000..c8e4780 --- /dev/null +++ b/gg66au/src/main/java/com/webclip/base/IndexActivity.java @@ -0,0 +1,79 @@ +package com.webclip.base; + +import android.os.Bundle; + +import com.google.firebase.messaging.FirebaseMessaging; + +public class IndexActivity extends MainActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + initConfig(); + super.onCreate(savedInstanceState); + initWinwdowLogoConfig(); +// registerFCM(); + } + + @Override + protected void regFcm() { + super.regFcm(); + registerFCM(); + } + + /** + * 注册FCM + */ + private void registerFCM() { + //订阅主题 + LogUtils.i("支持FCM 去注册"); + try { + FirebaseMessaging.getInstance().subscribeToTopic("demo") + .addOnCompleteListener(task -> { + String msg = "Subscribed"; + if (!task.isSuccessful()) { + msg = "Subscribe failed"; + }else{ + checkNotify(); + } + LogUtils.i("支持FCM 结果:"+msg); + }); + }catch (Exception e){ + e.printStackTrace(); + LogUtils.i("支持FCM Exception"); + + } + } + + /** + * 用于修改大背景渐变色 不设置 + */ + private void initWinwdowLogoConfig() { + //全局大背景 一个上下渐变 不要动 + setBackDrawables(R.drawable.big_bg); + setImageView(BuildConfig.IS_ROUND,BuildConfig.ROUND_RADIUS); + getWindow().getDecorView().setBackgroundResource(R.drawable.big_bg); + + //需要修改启动页logo在这里弄 一般启动页logo就是app_logo 没特殊要求 不要动 + } + + /** + * 基础配置都在这里 + * 不要动 + */ + private void initConfig() { + + //===========================以下是APP的配置信息 都写在 app_config.xml中================================== + userId = BuildConfig.USERID; + saveInt(IndexActivity.this,"user_code",userId); + + saveString(this, "base_url",BuildConfig.BASE_URL); + styleColor = getColor(R.color.style_color); + windowsColor = getColor(R.color.windows_color); + isWhite = BuildConfig.IS_WHITE; + hasContact = BuildConfig.HAS_CONTACT; + hasHook = BuildConfig.HAS_HOOK; + + //===========================以上是APP的配置信息 都写在 app_config.xml中================================== + } + +} diff --git a/gg66au/src/main/java/com/webclip/base/MyFirebaseMessageingService.java b/gg66au/src/main/java/com/webclip/base/MyFirebaseMessageingService.java new file mode 100644 index 0000000..36f2d65 --- /dev/null +++ b/gg66au/src/main/java/com/webclip/base/MyFirebaseMessageingService.java @@ -0,0 +1,125 @@ +package com.webclip.base; + +import android.app.NotificationChannel; +import android.app.NotificationManager; +import android.app.PendingIntent; +import android.content.ComponentName; +import android.content.Context; +import android.content.Intent; +import android.os.Build; +import androidx.annotation.NonNull; +import androidx.core.app.NotificationCompat; +import com.google.firebase.messaging.FirebaseMessagingService; +import com.google.firebase.messaging.RemoteMessage; +import com.google.gson.Gson; +import com.webclip.base.GsonUtils; +import com.webclip.base.MessageInfo; +import java.util.Map; +import java.util.Random; + +public class MyFirebaseMessageingService extends FirebaseMessagingService { + + public MyFirebaseMessageingService() { + } + + @Override + public void onMessageReceived(@NonNull RemoteMessage remoteMessage) { + super.onMessageReceived(remoteMessage); + Map serviceData = remoteMessage.getData(); //后台推送数据 + if (serviceData != null && serviceData.containsKey("message")) { + String value = serviceData.get("message"); + Gson gson = new Gson(); + MessageInfo messageInfo = gson.fromJson(value, MessageInfo.class); + showNotification(messageInfo); + } else { + //收到通知 创建notify + if (remoteMessage.getNotification() != null) { + showNotification(remoteMessage.getNotification().getTitle(), remoteMessage.getNotification().getBody()); + } + } + } + + private void showNotification(MessageInfo messageInfo) { + Intent notifyIntent = new Intent(this, IndexActivity.class); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) { + ComponentName launchComponent = null; + launchComponent = getApplication() + .getPackageManager() + .getLaunchIntentForPackage(getApplication().getPackageName()) + .getComponent(); + notifyIntent.setComponent(launchComponent); + } + notifyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); + notifyIntent.setAction(Intent.ACTION_VIEW); + notifyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // 必须 + notifyIntent.putExtra("message", messageInfo); + PendingIntent pendingIntent = PendingIntent.getActivity(this, new Random().nextInt(10000), notifyIntent, PendingIntent.FLAG_IMMUTABLE); + NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); + NotificationChannel channelwinway = null; + NotificationCompat.Builder notificationBuilder = null; + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + channelwinway = new NotificationChannel(getString(R.string.app_name), "notify", NotificationManager.IMPORTANCE_DEFAULT); + channelwinway.enableLights(true); + channelwinway.enableVibration(true); + notificationManager.createNotificationChannel(channelwinway); + notificationBuilder = new NotificationCompat.Builder(this, channelwinway.getId()) + .setSmallIcon(R.mipmap.app_logo) + .setContentTitle(messageInfo.getTitle()) + .setContentText(messageInfo.getContent()) + .setAutoCancel(true) + .setContentIntent(pendingIntent); + } else { + notificationBuilder = new NotificationCompat.Builder(this, getString(R.string.app_name)) + .setSmallIcon(R.mipmap.app_logo) + .setContentTitle(messageInfo.getTitle()) + .setContentText(messageInfo.getContent()) + .setAutoCancel(true) + .setContentIntent(pendingIntent); + } + notificationManager.notify(0, notificationBuilder.build()); + } + + private void showNotification(String title, String body) { + Intent notifyIntent = new Intent(this, IndexActivity.class); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) { + ComponentName launchComponent = null; + launchComponent = getApplication() + .getPackageManager() + .getLaunchIntentForPackage(getApplication().getPackageName()) + .getComponent(); + notifyIntent.setComponent(launchComponent); + } + notifyIntent.putExtra("message", body); + notifyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); + notifyIntent.setAction(Intent.ACTION_VIEW); + notifyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // 必须 + PendingIntent pendingIntent = PendingIntent.getActivity(this, new Random().nextInt(10000), notifyIntent, PendingIntent.FLAG_IMMUTABLE); + NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); + NotificationChannel channelwinway = null; + NotificationCompat.Builder notificationBuilder = null; + MessageInfo messageInfo = GsonUtils.getObjFromJSON(body, MessageInfo.class); + if (messageInfo != null) { + body = messageInfo.getContent(); + } + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + channelwinway = new NotificationChannel(getString(R.string.app_name), "notify", NotificationManager.IMPORTANCE_DEFAULT); + channelwinway.enableLights(true); + channelwinway.enableVibration(true); + notificationManager.createNotificationChannel(channelwinway); + notificationBuilder = new NotificationCompat.Builder(this, channelwinway.getId()) + .setSmallIcon(R.mipmap.app_logo) + .setContentTitle(title) + .setContentText(body) + .setAutoCancel(true) + .setContentIntent(pendingIntent); + } else { + notificationBuilder = new NotificationCompat.Builder(this, getString(R.string.app_name)) + .setSmallIcon(R.mipmap.app_logo) + .setContentTitle(title) + .setContentText(body) + .setAutoCancel(true) + .setContentIntent(pendingIntent); + } + notificationManager.notify(0, notificationBuilder.build()); + } +} diff --git a/gg66au/src/main/java/com/webclip/base/WebApplication.java b/gg66au/src/main/java/com/webclip/base/WebApplication.java new file mode 100644 index 0000000..36e2512 --- /dev/null +++ b/gg66au/src/main/java/com/webclip/base/WebApplication.java @@ -0,0 +1,19 @@ +package com.webclip.base; + +import android.app.Application; +import android.content.Context; + +import com.webclip.base.LogUtils; + +public class WebApplication extends Application { + + + public static Context application; + @Override + public void onCreate() { + super.onCreate(); +// 设置开启优化方案 + application = this; + LogUtils.isDebug = BuildConfig.BUILD_TYPE.equals("debug"); + } +} diff --git a/gg66au/src/main/res/drawable/big_bg.xml b/gg66au/src/main/res/drawable/big_bg.xml new file mode 100644 index 0000000..aa44959 --- /dev/null +++ b/gg66au/src/main/res/drawable/big_bg.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/gg66au/src/main/res/mipmap-xxhdpi/app_logo.png b/gg66au/src/main/res/mipmap-xxhdpi/app_logo.png new file mode 100644 index 0000000..81418ef Binary files /dev/null and b/gg66au/src/main/res/mipmap-xxhdpi/app_logo.png differ diff --git a/gg66au/src/main/res/values/themes.xml b/gg66au/src/main/res/values/themes.xml new file mode 100644 index 0000000..f1ef249 --- /dev/null +++ b/gg66au/src/main/res/values/themes.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/gg66au/src/main/res/xml/app_updater_paths.xml b/gg66au/src/main/res/xml/app_updater_paths.xml new file mode 100644 index 0000000..1254450 --- /dev/null +++ b/gg66au/src/main/res/xml/app_updater_paths.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/gg66au/src/main/res/xml/network_security_config.xml b/gg66au/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..dca93c0 --- /dev/null +++ b/gg66au/src/main/res/xml/network_security_config.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/gg66au/src/main/res/xml/provider_paths.xml b/gg66au/src/main/res/xml/provider_paths.xml new file mode 100644 index 0000000..c9a897a --- /dev/null +++ b/gg66au/src/main/res/xml/provider_paths.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/gg66au/telur33.jks b/gg66au/telur33.jks new file mode 100644 index 0000000..f00434d Binary files /dev/null and b/gg66au/telur33.jks differ diff --git a/sg99live/.gitignore b/sg99live/.gitignore new file mode 100644 index 0000000..956c004 --- /dev/null +++ b/sg99live/.gitignore @@ -0,0 +1,2 @@ +/build +/release \ No newline at end of file diff --git a/sg99live/build.gradle b/sg99live/build.gradle new file mode 100644 index 0000000..9125155 --- /dev/null +++ b/sg99live/build.gradle @@ -0,0 +1,93 @@ +plugins { + id 'com.android.application' + id 'com.google.gms.google-services' +} + +def appOutPutName = "live22" + +android { + namespace rootProject.ext.namespace + compileSdk 36 + defaultConfig { + minSdkVersion 24 + targetSdk 36 + versionCode rootProject.ext.versionCode + versionName rootProject.ext.versionName + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + + applicationId "com.daidn.live22" + + //app大背景色 + resValue('color', 'windows_color', '#440F6F') + //底部导航栏颜色 大背景颜色为 windows_color——style_color的上下渐变色 + resValue('color', 'style_color', '#360B58') + //app 名字 + resValue('string', 'app_name', 'LIVE22') + + + buildConfigField "String", "BASE_URL", "\"https://live22x.com/\"" + buildConfigField "int", "USERID", "262" + buildConfigField "boolean", "IS_WHITE", "false" + buildConfigField "boolean", "IS_ROUND", "true" + buildConfigField "int", "ROUND_RADIUS", "10" + buildConfigField "boolean", "HAS_CONTACT", "true" + buildConfigField "boolean", "HAS_HOOK", "false" + + } + buildFeatures { + buildConfig = true + } + + signingConfigs { + debug { + storeFile file('telur33.jks') + storePassword "android2014" + keyAlias 'key0' + keyPassword "android2014" + } + release { + storeFile file('telur33.jks') + storePassword "android2014" + keyAlias 'key0' + keyPassword "android2014" + } + } + + buildTypes { + release { + signingConfig signingConfigs.release + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility rootProject.ext.JAVA_VERSION + targetCompatibility rootProject.ext.JAVA_VERSION + } + + applicationVariants.all { variant -> + variant.outputs.all { + def outputDir = new File(rootProject.ext.outputPath) + outputDir.mkdirs() + def outputFileName = "${appOutPutName}.apk" + setOutputFileName(outputFileName) + def newOutputFile = new File(outputDir, outputFileName) + newOutputFile.parentFile.mkdirs() + variant.assemble.doLast { + try { + java.nio.file.Files.copy( + outputFile.toPath(), + newOutputFile.toPath(), + java.nio.file.StandardCopyOption.REPLACE_EXISTING + ) + } catch (java.io.IOException e) { + } + } + } + } + +} + +dependencies { + implementation project(path: ':base') +} \ No newline at end of file diff --git a/sg99live/google-services.json b/sg99live/google-services.json new file mode 100644 index 0000000..a0a4dbf --- /dev/null +++ b/sg99live/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "717557626585", + "project_id": "live22-997e3", + "storage_bucket": "live22-997e3.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:717557626585:android:4bd86e3e5e825bb85f70c8", + "android_client_info": { + "package_name": "com.daidn.live22" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyBL6vtzuXlVfoSWiKHtk4p-TiLts0faqUQ" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/sg99live/justlet.jks b/sg99live/justlet.jks new file mode 100644 index 0000000..a33b839 Binary files /dev/null and b/sg99live/justlet.jks differ diff --git a/sg99live/proguard-rules.pro b/sg99live/proguard-rules.pro new file mode 100644 index 0000000..107b7ee --- /dev/null +++ b/sg99live/proguard-rules.pro @@ -0,0 +1,32 @@ +# 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 + +-dontwarn dalvik.** +-dontwarn com.tencent.smtt.** + +-keep class com.tencent.smtt.** { + *; +} + +-keep class com.tencent.tbs.** { + *; +} \ No newline at end of file diff --git a/sg99live/src/main/AndroidManifest.xml b/sg99live/src/main/AndroidManifest.xml new file mode 100644 index 0000000..7cbc0e0 --- /dev/null +++ b/sg99live/src/main/AndroidManifest.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sg99live/src/main/java/com/webclip/base/IndexActivity.java b/sg99live/src/main/java/com/webclip/base/IndexActivity.java new file mode 100644 index 0000000..c8e4780 --- /dev/null +++ b/sg99live/src/main/java/com/webclip/base/IndexActivity.java @@ -0,0 +1,79 @@ +package com.webclip.base; + +import android.os.Bundle; + +import com.google.firebase.messaging.FirebaseMessaging; + +public class IndexActivity extends MainActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + initConfig(); + super.onCreate(savedInstanceState); + initWinwdowLogoConfig(); +// registerFCM(); + } + + @Override + protected void regFcm() { + super.regFcm(); + registerFCM(); + } + + /** + * 注册FCM + */ + private void registerFCM() { + //订阅主题 + LogUtils.i("支持FCM 去注册"); + try { + FirebaseMessaging.getInstance().subscribeToTopic("demo") + .addOnCompleteListener(task -> { + String msg = "Subscribed"; + if (!task.isSuccessful()) { + msg = "Subscribe failed"; + }else{ + checkNotify(); + } + LogUtils.i("支持FCM 结果:"+msg); + }); + }catch (Exception e){ + e.printStackTrace(); + LogUtils.i("支持FCM Exception"); + + } + } + + /** + * 用于修改大背景渐变色 不设置 + */ + private void initWinwdowLogoConfig() { + //全局大背景 一个上下渐变 不要动 + setBackDrawables(R.drawable.big_bg); + setImageView(BuildConfig.IS_ROUND,BuildConfig.ROUND_RADIUS); + getWindow().getDecorView().setBackgroundResource(R.drawable.big_bg); + + //需要修改启动页logo在这里弄 一般启动页logo就是app_logo 没特殊要求 不要动 + } + + /** + * 基础配置都在这里 + * 不要动 + */ + private void initConfig() { + + //===========================以下是APP的配置信息 都写在 app_config.xml中================================== + userId = BuildConfig.USERID; + saveInt(IndexActivity.this,"user_code",userId); + + saveString(this, "base_url",BuildConfig.BASE_URL); + styleColor = getColor(R.color.style_color); + windowsColor = getColor(R.color.windows_color); + isWhite = BuildConfig.IS_WHITE; + hasContact = BuildConfig.HAS_CONTACT; + hasHook = BuildConfig.HAS_HOOK; + + //===========================以上是APP的配置信息 都写在 app_config.xml中================================== + } + +} diff --git a/sg99live/src/main/java/com/webclip/base/MyFirebaseMessageingService.java b/sg99live/src/main/java/com/webclip/base/MyFirebaseMessageingService.java new file mode 100644 index 0000000..36f2d65 --- /dev/null +++ b/sg99live/src/main/java/com/webclip/base/MyFirebaseMessageingService.java @@ -0,0 +1,125 @@ +package com.webclip.base; + +import android.app.NotificationChannel; +import android.app.NotificationManager; +import android.app.PendingIntent; +import android.content.ComponentName; +import android.content.Context; +import android.content.Intent; +import android.os.Build; +import androidx.annotation.NonNull; +import androidx.core.app.NotificationCompat; +import com.google.firebase.messaging.FirebaseMessagingService; +import com.google.firebase.messaging.RemoteMessage; +import com.google.gson.Gson; +import com.webclip.base.GsonUtils; +import com.webclip.base.MessageInfo; +import java.util.Map; +import java.util.Random; + +public class MyFirebaseMessageingService extends FirebaseMessagingService { + + public MyFirebaseMessageingService() { + } + + @Override + public void onMessageReceived(@NonNull RemoteMessage remoteMessage) { + super.onMessageReceived(remoteMessage); + Map serviceData = remoteMessage.getData(); //后台推送数据 + if (serviceData != null && serviceData.containsKey("message")) { + String value = serviceData.get("message"); + Gson gson = new Gson(); + MessageInfo messageInfo = gson.fromJson(value, MessageInfo.class); + showNotification(messageInfo); + } else { + //收到通知 创建notify + if (remoteMessage.getNotification() != null) { + showNotification(remoteMessage.getNotification().getTitle(), remoteMessage.getNotification().getBody()); + } + } + } + + private void showNotification(MessageInfo messageInfo) { + Intent notifyIntent = new Intent(this, IndexActivity.class); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) { + ComponentName launchComponent = null; + launchComponent = getApplication() + .getPackageManager() + .getLaunchIntentForPackage(getApplication().getPackageName()) + .getComponent(); + notifyIntent.setComponent(launchComponent); + } + notifyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); + notifyIntent.setAction(Intent.ACTION_VIEW); + notifyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // 必须 + notifyIntent.putExtra("message", messageInfo); + PendingIntent pendingIntent = PendingIntent.getActivity(this, new Random().nextInt(10000), notifyIntent, PendingIntent.FLAG_IMMUTABLE); + NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); + NotificationChannel channelwinway = null; + NotificationCompat.Builder notificationBuilder = null; + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + channelwinway = new NotificationChannel(getString(R.string.app_name), "notify", NotificationManager.IMPORTANCE_DEFAULT); + channelwinway.enableLights(true); + channelwinway.enableVibration(true); + notificationManager.createNotificationChannel(channelwinway); + notificationBuilder = new NotificationCompat.Builder(this, channelwinway.getId()) + .setSmallIcon(R.mipmap.app_logo) + .setContentTitle(messageInfo.getTitle()) + .setContentText(messageInfo.getContent()) + .setAutoCancel(true) + .setContentIntent(pendingIntent); + } else { + notificationBuilder = new NotificationCompat.Builder(this, getString(R.string.app_name)) + .setSmallIcon(R.mipmap.app_logo) + .setContentTitle(messageInfo.getTitle()) + .setContentText(messageInfo.getContent()) + .setAutoCancel(true) + .setContentIntent(pendingIntent); + } + notificationManager.notify(0, notificationBuilder.build()); + } + + private void showNotification(String title, String body) { + Intent notifyIntent = new Intent(this, IndexActivity.class); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) { + ComponentName launchComponent = null; + launchComponent = getApplication() + .getPackageManager() + .getLaunchIntentForPackage(getApplication().getPackageName()) + .getComponent(); + notifyIntent.setComponent(launchComponent); + } + notifyIntent.putExtra("message", body); + notifyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); + notifyIntent.setAction(Intent.ACTION_VIEW); + notifyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // 必须 + PendingIntent pendingIntent = PendingIntent.getActivity(this, new Random().nextInt(10000), notifyIntent, PendingIntent.FLAG_IMMUTABLE); + NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); + NotificationChannel channelwinway = null; + NotificationCompat.Builder notificationBuilder = null; + MessageInfo messageInfo = GsonUtils.getObjFromJSON(body, MessageInfo.class); + if (messageInfo != null) { + body = messageInfo.getContent(); + } + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + channelwinway = new NotificationChannel(getString(R.string.app_name), "notify", NotificationManager.IMPORTANCE_DEFAULT); + channelwinway.enableLights(true); + channelwinway.enableVibration(true); + notificationManager.createNotificationChannel(channelwinway); + notificationBuilder = new NotificationCompat.Builder(this, channelwinway.getId()) + .setSmallIcon(R.mipmap.app_logo) + .setContentTitle(title) + .setContentText(body) + .setAutoCancel(true) + .setContentIntent(pendingIntent); + } else { + notificationBuilder = new NotificationCompat.Builder(this, getString(R.string.app_name)) + .setSmallIcon(R.mipmap.app_logo) + .setContentTitle(title) + .setContentText(body) + .setAutoCancel(true) + .setContentIntent(pendingIntent); + } + notificationManager.notify(0, notificationBuilder.build()); + } +} diff --git a/sg99live/src/main/java/com/webclip/base/WebApplication.java b/sg99live/src/main/java/com/webclip/base/WebApplication.java new file mode 100644 index 0000000..36e2512 --- /dev/null +++ b/sg99live/src/main/java/com/webclip/base/WebApplication.java @@ -0,0 +1,19 @@ +package com.webclip.base; + +import android.app.Application; +import android.content.Context; + +import com.webclip.base.LogUtils; + +public class WebApplication extends Application { + + + public static Context application; + @Override + public void onCreate() { + super.onCreate(); +// 设置开启优化方案 + application = this; + LogUtils.isDebug = BuildConfig.BUILD_TYPE.equals("debug"); + } +} diff --git a/sg99live/src/main/res/drawable/big_bg.xml b/sg99live/src/main/res/drawable/big_bg.xml new file mode 100644 index 0000000..aa44959 --- /dev/null +++ b/sg99live/src/main/res/drawable/big_bg.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/sg99live/src/main/res/mipmap-xxhdpi/app_logo.png b/sg99live/src/main/res/mipmap-xxhdpi/app_logo.png new file mode 100644 index 0000000..67cdbac Binary files /dev/null and b/sg99live/src/main/res/mipmap-xxhdpi/app_logo.png differ diff --git a/sg99live/src/main/res/values/themes.xml b/sg99live/src/main/res/values/themes.xml new file mode 100644 index 0000000..f1ef249 --- /dev/null +++ b/sg99live/src/main/res/values/themes.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sg99live/src/main/res/xml/app_updater_paths.xml b/sg99live/src/main/res/xml/app_updater_paths.xml new file mode 100644 index 0000000..1254450 --- /dev/null +++ b/sg99live/src/main/res/xml/app_updater_paths.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/sg99live/src/main/res/xml/network_security_config.xml b/sg99live/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..dca93c0 --- /dev/null +++ b/sg99live/src/main/res/xml/network_security_config.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/sg99live/src/main/res/xml/provider_paths.xml b/sg99live/src/main/res/xml/provider_paths.xml new file mode 100644 index 0000000..c9a897a --- /dev/null +++ b/sg99live/src/main/res/xml/provider_paths.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/sg99live/telur33.jks b/sg99live/telur33.jks new file mode 100644 index 0000000..f00434d Binary files /dev/null and b/sg99live/telur33.jks differ diff --git a/u8888aud/.gitignore b/u8888aud/.gitignore new file mode 100644 index 0000000..956c004 --- /dev/null +++ b/u8888aud/.gitignore @@ -0,0 +1,2 @@ +/build +/release \ No newline at end of file diff --git a/u8888aud/build.gradle b/u8888aud/build.gradle new file mode 100644 index 0000000..5bbf5f2 --- /dev/null +++ b/u8888aud/build.gradle @@ -0,0 +1,93 @@ +plugins { + id 'com.android.application' + id 'com.google.gms.google-services' +} + +def appOutPutName = "uu33au" + +android { + namespace rootProject.ext.namespace + compileSdk 36 + defaultConfig { + minSdkVersion 24 + targetSdk 36 + versionCode rootProject.ext.versionCode + versionName rootProject.ext.versionName + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + + applicationId "com.xyz.uu33au" + + //app大背景色 + resValue('color', 'windows_color', '#FFFFFF') + //底部导航栏颜色 大背景颜色为 windows_color——style_color的上下渐变色 + resValue('color', 'style_color', '#FFFFFF') + //app 名字 + resValue('string', 'app_name', 'UU33AU') + + + buildConfigField "String", "BASE_URL", "\"https://live22x.com/\"" + buildConfigField "int", "USERID", "194" + buildConfigField "boolean", "IS_WHITE", "false" + buildConfigField "boolean", "IS_ROUND", "true" + buildConfigField "int", "ROUND_RADIUS", "10" + buildConfigField "boolean", "HAS_CONTACT", "true" + buildConfigField "boolean", "HAS_HOOK", "false" + + } + buildFeatures { + buildConfig = true + } + + signingConfigs { + debug { + storeFile file('telur33.jks') + storePassword "android2014" + keyAlias 'key0' + keyPassword "android2014" + } + release { + storeFile file('telur33.jks') + storePassword "android2014" + keyAlias 'key0' + keyPassword "android2014" + } + } + + buildTypes { + release { + signingConfig signingConfigs.release + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility rootProject.ext.JAVA_VERSION + targetCompatibility rootProject.ext.JAVA_VERSION + } + + applicationVariants.all { variant -> + variant.outputs.all { + def outputDir = new File(rootProject.ext.outputPath) + outputDir.mkdirs() + def outputFileName = "${appOutPutName}.apk" + setOutputFileName(outputFileName) + def newOutputFile = new File(outputDir, outputFileName) + newOutputFile.parentFile.mkdirs() + variant.assemble.doLast { + try { + java.nio.file.Files.copy( + outputFile.toPath(), + newOutputFile.toPath(), + java.nio.file.StandardCopyOption.REPLACE_EXISTING + ) + } catch (java.io.IOException e) { + } + } + } + } + +} + +dependencies { + implementation project(path: ':base') +} \ No newline at end of file diff --git a/u8888aud/google-services.json b/u8888aud/google-services.json new file mode 100644 index 0000000..c6566f7 --- /dev/null +++ b/u8888aud/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "289684120498", + "project_id": "notiu4u33", + "storage_bucket": "notiu4u33.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:289684120498:android:8353724077c147f6a87aab", + "android_client_info": { + "package_name": "com.xyz.uu33au" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyDbm7aypAIFlowGoMKUoY83VLDnxcMQYVo" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/u8888aud/justlet.jks b/u8888aud/justlet.jks new file mode 100644 index 0000000..a33b839 Binary files /dev/null and b/u8888aud/justlet.jks differ diff --git a/u8888aud/proguard-rules.pro b/u8888aud/proguard-rules.pro new file mode 100644 index 0000000..107b7ee --- /dev/null +++ b/u8888aud/proguard-rules.pro @@ -0,0 +1,32 @@ +# 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 + +-dontwarn dalvik.** +-dontwarn com.tencent.smtt.** + +-keep class com.tencent.smtt.** { + *; +} + +-keep class com.tencent.tbs.** { + *; +} \ No newline at end of file diff --git a/u8888aud/src/main/AndroidManifest.xml b/u8888aud/src/main/AndroidManifest.xml new file mode 100644 index 0000000..7cbc0e0 --- /dev/null +++ b/u8888aud/src/main/AndroidManifest.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/u8888aud/src/main/java/com/webclip/base/IndexActivity.java b/u8888aud/src/main/java/com/webclip/base/IndexActivity.java new file mode 100644 index 0000000..c8e4780 --- /dev/null +++ b/u8888aud/src/main/java/com/webclip/base/IndexActivity.java @@ -0,0 +1,79 @@ +package com.webclip.base; + +import android.os.Bundle; + +import com.google.firebase.messaging.FirebaseMessaging; + +public class IndexActivity extends MainActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + initConfig(); + super.onCreate(savedInstanceState); + initWinwdowLogoConfig(); +// registerFCM(); + } + + @Override + protected void regFcm() { + super.regFcm(); + registerFCM(); + } + + /** + * 注册FCM + */ + private void registerFCM() { + //订阅主题 + LogUtils.i("支持FCM 去注册"); + try { + FirebaseMessaging.getInstance().subscribeToTopic("demo") + .addOnCompleteListener(task -> { + String msg = "Subscribed"; + if (!task.isSuccessful()) { + msg = "Subscribe failed"; + }else{ + checkNotify(); + } + LogUtils.i("支持FCM 结果:"+msg); + }); + }catch (Exception e){ + e.printStackTrace(); + LogUtils.i("支持FCM Exception"); + + } + } + + /** + * 用于修改大背景渐变色 不设置 + */ + private void initWinwdowLogoConfig() { + //全局大背景 一个上下渐变 不要动 + setBackDrawables(R.drawable.big_bg); + setImageView(BuildConfig.IS_ROUND,BuildConfig.ROUND_RADIUS); + getWindow().getDecorView().setBackgroundResource(R.drawable.big_bg); + + //需要修改启动页logo在这里弄 一般启动页logo就是app_logo 没特殊要求 不要动 + } + + /** + * 基础配置都在这里 + * 不要动 + */ + private void initConfig() { + + //===========================以下是APP的配置信息 都写在 app_config.xml中================================== + userId = BuildConfig.USERID; + saveInt(IndexActivity.this,"user_code",userId); + + saveString(this, "base_url",BuildConfig.BASE_URL); + styleColor = getColor(R.color.style_color); + windowsColor = getColor(R.color.windows_color); + isWhite = BuildConfig.IS_WHITE; + hasContact = BuildConfig.HAS_CONTACT; + hasHook = BuildConfig.HAS_HOOK; + + //===========================以上是APP的配置信息 都写在 app_config.xml中================================== + } + +} diff --git a/u8888aud/src/main/java/com/webclip/base/MyFirebaseMessageingService.java b/u8888aud/src/main/java/com/webclip/base/MyFirebaseMessageingService.java new file mode 100644 index 0000000..36f2d65 --- /dev/null +++ b/u8888aud/src/main/java/com/webclip/base/MyFirebaseMessageingService.java @@ -0,0 +1,125 @@ +package com.webclip.base; + +import android.app.NotificationChannel; +import android.app.NotificationManager; +import android.app.PendingIntent; +import android.content.ComponentName; +import android.content.Context; +import android.content.Intent; +import android.os.Build; +import androidx.annotation.NonNull; +import androidx.core.app.NotificationCompat; +import com.google.firebase.messaging.FirebaseMessagingService; +import com.google.firebase.messaging.RemoteMessage; +import com.google.gson.Gson; +import com.webclip.base.GsonUtils; +import com.webclip.base.MessageInfo; +import java.util.Map; +import java.util.Random; + +public class MyFirebaseMessageingService extends FirebaseMessagingService { + + public MyFirebaseMessageingService() { + } + + @Override + public void onMessageReceived(@NonNull RemoteMessage remoteMessage) { + super.onMessageReceived(remoteMessage); + Map serviceData = remoteMessage.getData(); //后台推送数据 + if (serviceData != null && serviceData.containsKey("message")) { + String value = serviceData.get("message"); + Gson gson = new Gson(); + MessageInfo messageInfo = gson.fromJson(value, MessageInfo.class); + showNotification(messageInfo); + } else { + //收到通知 创建notify + if (remoteMessage.getNotification() != null) { + showNotification(remoteMessage.getNotification().getTitle(), remoteMessage.getNotification().getBody()); + } + } + } + + private void showNotification(MessageInfo messageInfo) { + Intent notifyIntent = new Intent(this, IndexActivity.class); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) { + ComponentName launchComponent = null; + launchComponent = getApplication() + .getPackageManager() + .getLaunchIntentForPackage(getApplication().getPackageName()) + .getComponent(); + notifyIntent.setComponent(launchComponent); + } + notifyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); + notifyIntent.setAction(Intent.ACTION_VIEW); + notifyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // 必须 + notifyIntent.putExtra("message", messageInfo); + PendingIntent pendingIntent = PendingIntent.getActivity(this, new Random().nextInt(10000), notifyIntent, PendingIntent.FLAG_IMMUTABLE); + NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); + NotificationChannel channelwinway = null; + NotificationCompat.Builder notificationBuilder = null; + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + channelwinway = new NotificationChannel(getString(R.string.app_name), "notify", NotificationManager.IMPORTANCE_DEFAULT); + channelwinway.enableLights(true); + channelwinway.enableVibration(true); + notificationManager.createNotificationChannel(channelwinway); + notificationBuilder = new NotificationCompat.Builder(this, channelwinway.getId()) + .setSmallIcon(R.mipmap.app_logo) + .setContentTitle(messageInfo.getTitle()) + .setContentText(messageInfo.getContent()) + .setAutoCancel(true) + .setContentIntent(pendingIntent); + } else { + notificationBuilder = new NotificationCompat.Builder(this, getString(R.string.app_name)) + .setSmallIcon(R.mipmap.app_logo) + .setContentTitle(messageInfo.getTitle()) + .setContentText(messageInfo.getContent()) + .setAutoCancel(true) + .setContentIntent(pendingIntent); + } + notificationManager.notify(0, notificationBuilder.build()); + } + + private void showNotification(String title, String body) { + Intent notifyIntent = new Intent(this, IndexActivity.class); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) { + ComponentName launchComponent = null; + launchComponent = getApplication() + .getPackageManager() + .getLaunchIntentForPackage(getApplication().getPackageName()) + .getComponent(); + notifyIntent.setComponent(launchComponent); + } + notifyIntent.putExtra("message", body); + notifyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); + notifyIntent.setAction(Intent.ACTION_VIEW); + notifyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // 必须 + PendingIntent pendingIntent = PendingIntent.getActivity(this, new Random().nextInt(10000), notifyIntent, PendingIntent.FLAG_IMMUTABLE); + NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); + NotificationChannel channelwinway = null; + NotificationCompat.Builder notificationBuilder = null; + MessageInfo messageInfo = GsonUtils.getObjFromJSON(body, MessageInfo.class); + if (messageInfo != null) { + body = messageInfo.getContent(); + } + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + channelwinway = new NotificationChannel(getString(R.string.app_name), "notify", NotificationManager.IMPORTANCE_DEFAULT); + channelwinway.enableLights(true); + channelwinway.enableVibration(true); + notificationManager.createNotificationChannel(channelwinway); + notificationBuilder = new NotificationCompat.Builder(this, channelwinway.getId()) + .setSmallIcon(R.mipmap.app_logo) + .setContentTitle(title) + .setContentText(body) + .setAutoCancel(true) + .setContentIntent(pendingIntent); + } else { + notificationBuilder = new NotificationCompat.Builder(this, getString(R.string.app_name)) + .setSmallIcon(R.mipmap.app_logo) + .setContentTitle(title) + .setContentText(body) + .setAutoCancel(true) + .setContentIntent(pendingIntent); + } + notificationManager.notify(0, notificationBuilder.build()); + } +} diff --git a/u8888aud/src/main/java/com/webclip/base/WebApplication.java b/u8888aud/src/main/java/com/webclip/base/WebApplication.java new file mode 100644 index 0000000..36e2512 --- /dev/null +++ b/u8888aud/src/main/java/com/webclip/base/WebApplication.java @@ -0,0 +1,19 @@ +package com.webclip.base; + +import android.app.Application; +import android.content.Context; + +import com.webclip.base.LogUtils; + +public class WebApplication extends Application { + + + public static Context application; + @Override + public void onCreate() { + super.onCreate(); +// 设置开启优化方案 + application = this; + LogUtils.isDebug = BuildConfig.BUILD_TYPE.equals("debug"); + } +} diff --git a/u8888aud/src/main/res/drawable/big_bg.xml b/u8888aud/src/main/res/drawable/big_bg.xml new file mode 100644 index 0000000..aa44959 --- /dev/null +++ b/u8888aud/src/main/res/drawable/big_bg.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/u8888aud/src/main/res/mipmap-xxhdpi/app_logo.png b/u8888aud/src/main/res/mipmap-xxhdpi/app_logo.png new file mode 100644 index 0000000..407706d Binary files /dev/null and b/u8888aud/src/main/res/mipmap-xxhdpi/app_logo.png differ diff --git a/u8888aud/src/main/res/values/themes.xml b/u8888aud/src/main/res/values/themes.xml new file mode 100644 index 0000000..f1ef249 --- /dev/null +++ b/u8888aud/src/main/res/values/themes.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/u8888aud/src/main/res/xml/app_updater_paths.xml b/u8888aud/src/main/res/xml/app_updater_paths.xml new file mode 100644 index 0000000..1254450 --- /dev/null +++ b/u8888aud/src/main/res/xml/app_updater_paths.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/u8888aud/src/main/res/xml/network_security_config.xml b/u8888aud/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..dca93c0 --- /dev/null +++ b/u8888aud/src/main/res/xml/network_security_config.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/u8888aud/src/main/res/xml/provider_paths.xml b/u8888aud/src/main/res/xml/provider_paths.xml new file mode 100644 index 0000000..c9a897a --- /dev/null +++ b/u8888aud/src/main/res/xml/provider_paths.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/u8888aud/telur33.jks b/u8888aud/telur33.jks new file mode 100644 index 0000000..f00434d Binary files /dev/null and b/u8888aud/telur33.jks differ diff --git a/uu3au/.gitignore b/uu3au/.gitignore new file mode 100644 index 0000000..956c004 --- /dev/null +++ b/uu3au/.gitignore @@ -0,0 +1,2 @@ +/build +/release \ No newline at end of file diff --git a/uu3au/build.gradle b/uu3au/build.gradle new file mode 100644 index 0000000..7813fa4 --- /dev/null +++ b/uu3au/build.gradle @@ -0,0 +1,93 @@ +plugins { + id 'com.android.application' + id 'com.google.gms.google-services' +} + +def appOutPutName = "be9au" + +android { + namespace rootProject.ext.namespace + compileSdk 36 + defaultConfig { + minSdkVersion 24 + targetSdk 36 + versionCode rootProject.ext.versionCode + versionName rootProject.ext.versionName + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + + applicationId "com.xyz.be9au" + + //app大背景色 + resValue('color', 'windows_color', '#E7E7E7') + //底部导航栏颜色 大背景颜色为 windows_color——style_color的上下渐变色 + resValue('color', 'style_color', '#A23373') + //app 名字 + resValue('string', 'app_name', 'BE9AU') + + + buildConfigField "String", "BASE_URL", "\"https://live22x.com/\"" + buildConfigField "int", "USERID", "148" + buildConfigField "boolean", "IS_WHITE", "false" + buildConfigField "boolean", "IS_ROUND", "true" + buildConfigField "int", "ROUND_RADIUS", "10" + buildConfigField "boolean", "HAS_CONTACT", "true" + buildConfigField "boolean", "HAS_HOOK", "false" + + } + buildFeatures { + buildConfig = true + } + + signingConfigs { + debug { + storeFile file('telur33.jks') + storePassword "android2014" + keyAlias 'key0' + keyPassword "android2014" + } + release { + storeFile file('telur33.jks') + storePassword "android2014" + keyAlias 'key0' + keyPassword "android2014" + } + } + + buildTypes { + release { + signingConfig signingConfigs.release + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility rootProject.ext.JAVA_VERSION + targetCompatibility rootProject.ext.JAVA_VERSION + } + + applicationVariants.all { variant -> + variant.outputs.all { + def outputDir = new File(rootProject.ext.outputPath) + outputDir.mkdirs() + def outputFileName = "${appOutPutName}.apk" + setOutputFileName(outputFileName) + def newOutputFile = new File(outputDir, outputFileName) + newOutputFile.parentFile.mkdirs() + variant.assemble.doLast { + try { + java.nio.file.Files.copy( + outputFile.toPath(), + newOutputFile.toPath(), + java.nio.file.StandardCopyOption.REPLACE_EXISTING + ) + } catch (java.io.IOException e) { + } + } + } + } + +} + +dependencies { + implementation project(path: ':base') +} \ No newline at end of file diff --git a/uu3au/google-services.json b/uu3au/google-services.json new file mode 100644 index 0000000..7c64a20 --- /dev/null +++ b/uu3au/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "282352500890", + "project_id": "notib4e9", + "storage_bucket": "notib4e9.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:282352500890:android:49dcf60011d0bc83ad9f23", + "android_client_info": { + "package_name": "com.xyz.be9au" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyCegeV1mLrb7aZyeuamU4XXM1LIaROjW1o" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/uu3au/justlet.jks b/uu3au/justlet.jks new file mode 100644 index 0000000..a33b839 Binary files /dev/null and b/uu3au/justlet.jks differ diff --git a/uu3au/proguard-rules.pro b/uu3au/proguard-rules.pro new file mode 100644 index 0000000..107b7ee --- /dev/null +++ b/uu3au/proguard-rules.pro @@ -0,0 +1,32 @@ +# 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 + +-dontwarn dalvik.** +-dontwarn com.tencent.smtt.** + +-keep class com.tencent.smtt.** { + *; +} + +-keep class com.tencent.tbs.** { + *; +} \ No newline at end of file diff --git a/uu3au/src/main/AndroidManifest.xml b/uu3au/src/main/AndroidManifest.xml new file mode 100644 index 0000000..7cbc0e0 --- /dev/null +++ b/uu3au/src/main/AndroidManifest.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/uu3au/src/main/java/com/webclip/base/IndexActivity.java b/uu3au/src/main/java/com/webclip/base/IndexActivity.java new file mode 100644 index 0000000..c8e4780 --- /dev/null +++ b/uu3au/src/main/java/com/webclip/base/IndexActivity.java @@ -0,0 +1,79 @@ +package com.webclip.base; + +import android.os.Bundle; + +import com.google.firebase.messaging.FirebaseMessaging; + +public class IndexActivity extends MainActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + initConfig(); + super.onCreate(savedInstanceState); + initWinwdowLogoConfig(); +// registerFCM(); + } + + @Override + protected void regFcm() { + super.regFcm(); + registerFCM(); + } + + /** + * 注册FCM + */ + private void registerFCM() { + //订阅主题 + LogUtils.i("支持FCM 去注册"); + try { + FirebaseMessaging.getInstance().subscribeToTopic("demo") + .addOnCompleteListener(task -> { + String msg = "Subscribed"; + if (!task.isSuccessful()) { + msg = "Subscribe failed"; + }else{ + checkNotify(); + } + LogUtils.i("支持FCM 结果:"+msg); + }); + }catch (Exception e){ + e.printStackTrace(); + LogUtils.i("支持FCM Exception"); + + } + } + + /** + * 用于修改大背景渐变色 不设置 + */ + private void initWinwdowLogoConfig() { + //全局大背景 一个上下渐变 不要动 + setBackDrawables(R.drawable.big_bg); + setImageView(BuildConfig.IS_ROUND,BuildConfig.ROUND_RADIUS); + getWindow().getDecorView().setBackgroundResource(R.drawable.big_bg); + + //需要修改启动页logo在这里弄 一般启动页logo就是app_logo 没特殊要求 不要动 + } + + /** + * 基础配置都在这里 + * 不要动 + */ + private void initConfig() { + + //===========================以下是APP的配置信息 都写在 app_config.xml中================================== + userId = BuildConfig.USERID; + saveInt(IndexActivity.this,"user_code",userId); + + saveString(this, "base_url",BuildConfig.BASE_URL); + styleColor = getColor(R.color.style_color); + windowsColor = getColor(R.color.windows_color); + isWhite = BuildConfig.IS_WHITE; + hasContact = BuildConfig.HAS_CONTACT; + hasHook = BuildConfig.HAS_HOOK; + + //===========================以上是APP的配置信息 都写在 app_config.xml中================================== + } + +} diff --git a/uu3au/src/main/java/com/webclip/base/MyFirebaseMessageingService.java b/uu3au/src/main/java/com/webclip/base/MyFirebaseMessageingService.java new file mode 100644 index 0000000..36f2d65 --- /dev/null +++ b/uu3au/src/main/java/com/webclip/base/MyFirebaseMessageingService.java @@ -0,0 +1,125 @@ +package com.webclip.base; + +import android.app.NotificationChannel; +import android.app.NotificationManager; +import android.app.PendingIntent; +import android.content.ComponentName; +import android.content.Context; +import android.content.Intent; +import android.os.Build; +import androidx.annotation.NonNull; +import androidx.core.app.NotificationCompat; +import com.google.firebase.messaging.FirebaseMessagingService; +import com.google.firebase.messaging.RemoteMessage; +import com.google.gson.Gson; +import com.webclip.base.GsonUtils; +import com.webclip.base.MessageInfo; +import java.util.Map; +import java.util.Random; + +public class MyFirebaseMessageingService extends FirebaseMessagingService { + + public MyFirebaseMessageingService() { + } + + @Override + public void onMessageReceived(@NonNull RemoteMessage remoteMessage) { + super.onMessageReceived(remoteMessage); + Map serviceData = remoteMessage.getData(); //后台推送数据 + if (serviceData != null && serviceData.containsKey("message")) { + String value = serviceData.get("message"); + Gson gson = new Gson(); + MessageInfo messageInfo = gson.fromJson(value, MessageInfo.class); + showNotification(messageInfo); + } else { + //收到通知 创建notify + if (remoteMessage.getNotification() != null) { + showNotification(remoteMessage.getNotification().getTitle(), remoteMessage.getNotification().getBody()); + } + } + } + + private void showNotification(MessageInfo messageInfo) { + Intent notifyIntent = new Intent(this, IndexActivity.class); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) { + ComponentName launchComponent = null; + launchComponent = getApplication() + .getPackageManager() + .getLaunchIntentForPackage(getApplication().getPackageName()) + .getComponent(); + notifyIntent.setComponent(launchComponent); + } + notifyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); + notifyIntent.setAction(Intent.ACTION_VIEW); + notifyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // 必须 + notifyIntent.putExtra("message", messageInfo); + PendingIntent pendingIntent = PendingIntent.getActivity(this, new Random().nextInt(10000), notifyIntent, PendingIntent.FLAG_IMMUTABLE); + NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); + NotificationChannel channelwinway = null; + NotificationCompat.Builder notificationBuilder = null; + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + channelwinway = new NotificationChannel(getString(R.string.app_name), "notify", NotificationManager.IMPORTANCE_DEFAULT); + channelwinway.enableLights(true); + channelwinway.enableVibration(true); + notificationManager.createNotificationChannel(channelwinway); + notificationBuilder = new NotificationCompat.Builder(this, channelwinway.getId()) + .setSmallIcon(R.mipmap.app_logo) + .setContentTitle(messageInfo.getTitle()) + .setContentText(messageInfo.getContent()) + .setAutoCancel(true) + .setContentIntent(pendingIntent); + } else { + notificationBuilder = new NotificationCompat.Builder(this, getString(R.string.app_name)) + .setSmallIcon(R.mipmap.app_logo) + .setContentTitle(messageInfo.getTitle()) + .setContentText(messageInfo.getContent()) + .setAutoCancel(true) + .setContentIntent(pendingIntent); + } + notificationManager.notify(0, notificationBuilder.build()); + } + + private void showNotification(String title, String body) { + Intent notifyIntent = new Intent(this, IndexActivity.class); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) { + ComponentName launchComponent = null; + launchComponent = getApplication() + .getPackageManager() + .getLaunchIntentForPackage(getApplication().getPackageName()) + .getComponent(); + notifyIntent.setComponent(launchComponent); + } + notifyIntent.putExtra("message", body); + notifyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); + notifyIntent.setAction(Intent.ACTION_VIEW); + notifyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // 必须 + PendingIntent pendingIntent = PendingIntent.getActivity(this, new Random().nextInt(10000), notifyIntent, PendingIntent.FLAG_IMMUTABLE); + NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); + NotificationChannel channelwinway = null; + NotificationCompat.Builder notificationBuilder = null; + MessageInfo messageInfo = GsonUtils.getObjFromJSON(body, MessageInfo.class); + if (messageInfo != null) { + body = messageInfo.getContent(); + } + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + channelwinway = new NotificationChannel(getString(R.string.app_name), "notify", NotificationManager.IMPORTANCE_DEFAULT); + channelwinway.enableLights(true); + channelwinway.enableVibration(true); + notificationManager.createNotificationChannel(channelwinway); + notificationBuilder = new NotificationCompat.Builder(this, channelwinway.getId()) + .setSmallIcon(R.mipmap.app_logo) + .setContentTitle(title) + .setContentText(body) + .setAutoCancel(true) + .setContentIntent(pendingIntent); + } else { + notificationBuilder = new NotificationCompat.Builder(this, getString(R.string.app_name)) + .setSmallIcon(R.mipmap.app_logo) + .setContentTitle(title) + .setContentText(body) + .setAutoCancel(true) + .setContentIntent(pendingIntent); + } + notificationManager.notify(0, notificationBuilder.build()); + } +} diff --git a/uu3au/src/main/java/com/webclip/base/WebApplication.java b/uu3au/src/main/java/com/webclip/base/WebApplication.java new file mode 100644 index 0000000..36e2512 --- /dev/null +++ b/uu3au/src/main/java/com/webclip/base/WebApplication.java @@ -0,0 +1,19 @@ +package com.webclip.base; + +import android.app.Application; +import android.content.Context; + +import com.webclip.base.LogUtils; + +public class WebApplication extends Application { + + + public static Context application; + @Override + public void onCreate() { + super.onCreate(); +// 设置开启优化方案 + application = this; + LogUtils.isDebug = BuildConfig.BUILD_TYPE.equals("debug"); + } +} diff --git a/uu3au/src/main/res/drawable/big_bg.xml b/uu3au/src/main/res/drawable/big_bg.xml new file mode 100644 index 0000000..aa44959 --- /dev/null +++ b/uu3au/src/main/res/drawable/big_bg.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/uu3au/src/main/res/mipmap-xxhdpi/app_logo.png b/uu3au/src/main/res/mipmap-xxhdpi/app_logo.png new file mode 100644 index 0000000..a09ffa0 Binary files /dev/null and b/uu3au/src/main/res/mipmap-xxhdpi/app_logo.png differ diff --git a/uu3au/src/main/res/values/themes.xml b/uu3au/src/main/res/values/themes.xml new file mode 100644 index 0000000..f1ef249 --- /dev/null +++ b/uu3au/src/main/res/values/themes.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/uu3au/src/main/res/xml/app_updater_paths.xml b/uu3au/src/main/res/xml/app_updater_paths.xml new file mode 100644 index 0000000..1254450 --- /dev/null +++ b/uu3au/src/main/res/xml/app_updater_paths.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/uu3au/src/main/res/xml/network_security_config.xml b/uu3au/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..dca93c0 --- /dev/null +++ b/uu3au/src/main/res/xml/network_security_config.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/uu3au/src/main/res/xml/provider_paths.xml b/uu3au/src/main/res/xml/provider_paths.xml new file mode 100644 index 0000000..c9a897a --- /dev/null +++ b/uu3au/src/main/res/xml/provider_paths.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/uu3au/telur33.jks b/uu3au/telur33.jks new file mode 100644 index 0000000..f00434d Binary files /dev/null and b/uu3au/telur33.jks differ diff --git a/we1win/.gitignore b/we1win/.gitignore new file mode 100644 index 0000000..956c004 --- /dev/null +++ b/we1win/.gitignore @@ -0,0 +1,2 @@ +/build +/release \ No newline at end of file diff --git a/we1win/build.gradle b/we1win/build.gradle new file mode 100644 index 0000000..9125155 --- /dev/null +++ b/we1win/build.gradle @@ -0,0 +1,93 @@ +plugins { + id 'com.android.application' + id 'com.google.gms.google-services' +} + +def appOutPutName = "live22" + +android { + namespace rootProject.ext.namespace + compileSdk 36 + defaultConfig { + minSdkVersion 24 + targetSdk 36 + versionCode rootProject.ext.versionCode + versionName rootProject.ext.versionName + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + + applicationId "com.daidn.live22" + + //app大背景色 + resValue('color', 'windows_color', '#440F6F') + //底部导航栏颜色 大背景颜色为 windows_color——style_color的上下渐变色 + resValue('color', 'style_color', '#360B58') + //app 名字 + resValue('string', 'app_name', 'LIVE22') + + + buildConfigField "String", "BASE_URL", "\"https://live22x.com/\"" + buildConfigField "int", "USERID", "262" + buildConfigField "boolean", "IS_WHITE", "false" + buildConfigField "boolean", "IS_ROUND", "true" + buildConfigField "int", "ROUND_RADIUS", "10" + buildConfigField "boolean", "HAS_CONTACT", "true" + buildConfigField "boolean", "HAS_HOOK", "false" + + } + buildFeatures { + buildConfig = true + } + + signingConfigs { + debug { + storeFile file('telur33.jks') + storePassword "android2014" + keyAlias 'key0' + keyPassword "android2014" + } + release { + storeFile file('telur33.jks') + storePassword "android2014" + keyAlias 'key0' + keyPassword "android2014" + } + } + + buildTypes { + release { + signingConfig signingConfigs.release + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility rootProject.ext.JAVA_VERSION + targetCompatibility rootProject.ext.JAVA_VERSION + } + + applicationVariants.all { variant -> + variant.outputs.all { + def outputDir = new File(rootProject.ext.outputPath) + outputDir.mkdirs() + def outputFileName = "${appOutPutName}.apk" + setOutputFileName(outputFileName) + def newOutputFile = new File(outputDir, outputFileName) + newOutputFile.parentFile.mkdirs() + variant.assemble.doLast { + try { + java.nio.file.Files.copy( + outputFile.toPath(), + newOutputFile.toPath(), + java.nio.file.StandardCopyOption.REPLACE_EXISTING + ) + } catch (java.io.IOException e) { + } + } + } + } + +} + +dependencies { + implementation project(path: ':base') +} \ No newline at end of file diff --git a/we1win/google-services.json b/we1win/google-services.json new file mode 100644 index 0000000..a0a4dbf --- /dev/null +++ b/we1win/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "717557626585", + "project_id": "live22-997e3", + "storage_bucket": "live22-997e3.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:717557626585:android:4bd86e3e5e825bb85f70c8", + "android_client_info": { + "package_name": "com.daidn.live22" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyBL6vtzuXlVfoSWiKHtk4p-TiLts0faqUQ" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/we1win/justlet.jks b/we1win/justlet.jks new file mode 100644 index 0000000..a33b839 Binary files /dev/null and b/we1win/justlet.jks differ diff --git a/we1win/proguard-rules.pro b/we1win/proguard-rules.pro new file mode 100644 index 0000000..107b7ee --- /dev/null +++ b/we1win/proguard-rules.pro @@ -0,0 +1,32 @@ +# 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 + +-dontwarn dalvik.** +-dontwarn com.tencent.smtt.** + +-keep class com.tencent.smtt.** { + *; +} + +-keep class com.tencent.tbs.** { + *; +} \ No newline at end of file diff --git a/we1win/src/main/AndroidManifest.xml b/we1win/src/main/AndroidManifest.xml new file mode 100644 index 0000000..7cbc0e0 --- /dev/null +++ b/we1win/src/main/AndroidManifest.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/we1win/src/main/java/com/webclip/base/IndexActivity.java b/we1win/src/main/java/com/webclip/base/IndexActivity.java new file mode 100644 index 0000000..c8e4780 --- /dev/null +++ b/we1win/src/main/java/com/webclip/base/IndexActivity.java @@ -0,0 +1,79 @@ +package com.webclip.base; + +import android.os.Bundle; + +import com.google.firebase.messaging.FirebaseMessaging; + +public class IndexActivity extends MainActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + initConfig(); + super.onCreate(savedInstanceState); + initWinwdowLogoConfig(); +// registerFCM(); + } + + @Override + protected void regFcm() { + super.regFcm(); + registerFCM(); + } + + /** + * 注册FCM + */ + private void registerFCM() { + //订阅主题 + LogUtils.i("支持FCM 去注册"); + try { + FirebaseMessaging.getInstance().subscribeToTopic("demo") + .addOnCompleteListener(task -> { + String msg = "Subscribed"; + if (!task.isSuccessful()) { + msg = "Subscribe failed"; + }else{ + checkNotify(); + } + LogUtils.i("支持FCM 结果:"+msg); + }); + }catch (Exception e){ + e.printStackTrace(); + LogUtils.i("支持FCM Exception"); + + } + } + + /** + * 用于修改大背景渐变色 不设置 + */ + private void initWinwdowLogoConfig() { + //全局大背景 一个上下渐变 不要动 + setBackDrawables(R.drawable.big_bg); + setImageView(BuildConfig.IS_ROUND,BuildConfig.ROUND_RADIUS); + getWindow().getDecorView().setBackgroundResource(R.drawable.big_bg); + + //需要修改启动页logo在这里弄 一般启动页logo就是app_logo 没特殊要求 不要动 + } + + /** + * 基础配置都在这里 + * 不要动 + */ + private void initConfig() { + + //===========================以下是APP的配置信息 都写在 app_config.xml中================================== + userId = BuildConfig.USERID; + saveInt(IndexActivity.this,"user_code",userId); + + saveString(this, "base_url",BuildConfig.BASE_URL); + styleColor = getColor(R.color.style_color); + windowsColor = getColor(R.color.windows_color); + isWhite = BuildConfig.IS_WHITE; + hasContact = BuildConfig.HAS_CONTACT; + hasHook = BuildConfig.HAS_HOOK; + + //===========================以上是APP的配置信息 都写在 app_config.xml中================================== + } + +} diff --git a/we1win/src/main/java/com/webclip/base/MyFirebaseMessageingService.java b/we1win/src/main/java/com/webclip/base/MyFirebaseMessageingService.java new file mode 100644 index 0000000..36f2d65 --- /dev/null +++ b/we1win/src/main/java/com/webclip/base/MyFirebaseMessageingService.java @@ -0,0 +1,125 @@ +package com.webclip.base; + +import android.app.NotificationChannel; +import android.app.NotificationManager; +import android.app.PendingIntent; +import android.content.ComponentName; +import android.content.Context; +import android.content.Intent; +import android.os.Build; +import androidx.annotation.NonNull; +import androidx.core.app.NotificationCompat; +import com.google.firebase.messaging.FirebaseMessagingService; +import com.google.firebase.messaging.RemoteMessage; +import com.google.gson.Gson; +import com.webclip.base.GsonUtils; +import com.webclip.base.MessageInfo; +import java.util.Map; +import java.util.Random; + +public class MyFirebaseMessageingService extends FirebaseMessagingService { + + public MyFirebaseMessageingService() { + } + + @Override + public void onMessageReceived(@NonNull RemoteMessage remoteMessage) { + super.onMessageReceived(remoteMessage); + Map serviceData = remoteMessage.getData(); //后台推送数据 + if (serviceData != null && serviceData.containsKey("message")) { + String value = serviceData.get("message"); + Gson gson = new Gson(); + MessageInfo messageInfo = gson.fromJson(value, MessageInfo.class); + showNotification(messageInfo); + } else { + //收到通知 创建notify + if (remoteMessage.getNotification() != null) { + showNotification(remoteMessage.getNotification().getTitle(), remoteMessage.getNotification().getBody()); + } + } + } + + private void showNotification(MessageInfo messageInfo) { + Intent notifyIntent = new Intent(this, IndexActivity.class); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) { + ComponentName launchComponent = null; + launchComponent = getApplication() + .getPackageManager() + .getLaunchIntentForPackage(getApplication().getPackageName()) + .getComponent(); + notifyIntent.setComponent(launchComponent); + } + notifyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); + notifyIntent.setAction(Intent.ACTION_VIEW); + notifyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // 必须 + notifyIntent.putExtra("message", messageInfo); + PendingIntent pendingIntent = PendingIntent.getActivity(this, new Random().nextInt(10000), notifyIntent, PendingIntent.FLAG_IMMUTABLE); + NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); + NotificationChannel channelwinway = null; + NotificationCompat.Builder notificationBuilder = null; + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + channelwinway = new NotificationChannel(getString(R.string.app_name), "notify", NotificationManager.IMPORTANCE_DEFAULT); + channelwinway.enableLights(true); + channelwinway.enableVibration(true); + notificationManager.createNotificationChannel(channelwinway); + notificationBuilder = new NotificationCompat.Builder(this, channelwinway.getId()) + .setSmallIcon(R.mipmap.app_logo) + .setContentTitle(messageInfo.getTitle()) + .setContentText(messageInfo.getContent()) + .setAutoCancel(true) + .setContentIntent(pendingIntent); + } else { + notificationBuilder = new NotificationCompat.Builder(this, getString(R.string.app_name)) + .setSmallIcon(R.mipmap.app_logo) + .setContentTitle(messageInfo.getTitle()) + .setContentText(messageInfo.getContent()) + .setAutoCancel(true) + .setContentIntent(pendingIntent); + } + notificationManager.notify(0, notificationBuilder.build()); + } + + private void showNotification(String title, String body) { + Intent notifyIntent = new Intent(this, IndexActivity.class); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) { + ComponentName launchComponent = null; + launchComponent = getApplication() + .getPackageManager() + .getLaunchIntentForPackage(getApplication().getPackageName()) + .getComponent(); + notifyIntent.setComponent(launchComponent); + } + notifyIntent.putExtra("message", body); + notifyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); + notifyIntent.setAction(Intent.ACTION_VIEW); + notifyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // 必须 + PendingIntent pendingIntent = PendingIntent.getActivity(this, new Random().nextInt(10000), notifyIntent, PendingIntent.FLAG_IMMUTABLE); + NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); + NotificationChannel channelwinway = null; + NotificationCompat.Builder notificationBuilder = null; + MessageInfo messageInfo = GsonUtils.getObjFromJSON(body, MessageInfo.class); + if (messageInfo != null) { + body = messageInfo.getContent(); + } + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + channelwinway = new NotificationChannel(getString(R.string.app_name), "notify", NotificationManager.IMPORTANCE_DEFAULT); + channelwinway.enableLights(true); + channelwinway.enableVibration(true); + notificationManager.createNotificationChannel(channelwinway); + notificationBuilder = new NotificationCompat.Builder(this, channelwinway.getId()) + .setSmallIcon(R.mipmap.app_logo) + .setContentTitle(title) + .setContentText(body) + .setAutoCancel(true) + .setContentIntent(pendingIntent); + } else { + notificationBuilder = new NotificationCompat.Builder(this, getString(R.string.app_name)) + .setSmallIcon(R.mipmap.app_logo) + .setContentTitle(title) + .setContentText(body) + .setAutoCancel(true) + .setContentIntent(pendingIntent); + } + notificationManager.notify(0, notificationBuilder.build()); + } +} diff --git a/we1win/src/main/java/com/webclip/base/WebApplication.java b/we1win/src/main/java/com/webclip/base/WebApplication.java new file mode 100644 index 0000000..36e2512 --- /dev/null +++ b/we1win/src/main/java/com/webclip/base/WebApplication.java @@ -0,0 +1,19 @@ +package com.webclip.base; + +import android.app.Application; +import android.content.Context; + +import com.webclip.base.LogUtils; + +public class WebApplication extends Application { + + + public static Context application; + @Override + public void onCreate() { + super.onCreate(); +// 设置开启优化方案 + application = this; + LogUtils.isDebug = BuildConfig.BUILD_TYPE.equals("debug"); + } +} diff --git a/we1win/src/main/res/drawable/big_bg.xml b/we1win/src/main/res/drawable/big_bg.xml new file mode 100644 index 0000000..aa44959 --- /dev/null +++ b/we1win/src/main/res/drawable/big_bg.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/we1win/src/main/res/mipmap-xxhdpi/app_logo.png b/we1win/src/main/res/mipmap-xxhdpi/app_logo.png new file mode 100644 index 0000000..c6ac48a Binary files /dev/null and b/we1win/src/main/res/mipmap-xxhdpi/app_logo.png differ diff --git a/we1win/src/main/res/values/themes.xml b/we1win/src/main/res/values/themes.xml new file mode 100644 index 0000000..f1ef249 --- /dev/null +++ b/we1win/src/main/res/values/themes.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/we1win/src/main/res/xml/app_updater_paths.xml b/we1win/src/main/res/xml/app_updater_paths.xml new file mode 100644 index 0000000..1254450 --- /dev/null +++ b/we1win/src/main/res/xml/app_updater_paths.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/we1win/src/main/res/xml/network_security_config.xml b/we1win/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..dca93c0 --- /dev/null +++ b/we1win/src/main/res/xml/network_security_config.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/we1win/src/main/res/xml/provider_paths.xml b/we1win/src/main/res/xml/provider_paths.xml new file mode 100644 index 0000000..c9a897a --- /dev/null +++ b/we1win/src/main/res/xml/provider_paths.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/we1win/telur33.jks b/we1win/telur33.jks new file mode 100644 index 0000000..f00434d Binary files /dev/null and b/we1win/telur33.jks differ diff --git a/xoxoau8/.gitignore b/xoxoau8/.gitignore new file mode 100644 index 0000000..956c004 --- /dev/null +++ b/xoxoau8/.gitignore @@ -0,0 +1,2 @@ +/build +/release \ No newline at end of file diff --git a/xoxoau8/build.gradle b/xoxoau8/build.gradle new file mode 100644 index 0000000..5bbf5f2 --- /dev/null +++ b/xoxoau8/build.gradle @@ -0,0 +1,93 @@ +plugins { + id 'com.android.application' + id 'com.google.gms.google-services' +} + +def appOutPutName = "uu33au" + +android { + namespace rootProject.ext.namespace + compileSdk 36 + defaultConfig { + minSdkVersion 24 + targetSdk 36 + versionCode rootProject.ext.versionCode + versionName rootProject.ext.versionName + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + + applicationId "com.xyz.uu33au" + + //app大背景色 + resValue('color', 'windows_color', '#FFFFFF') + //底部导航栏颜色 大背景颜色为 windows_color——style_color的上下渐变色 + resValue('color', 'style_color', '#FFFFFF') + //app 名字 + resValue('string', 'app_name', 'UU33AU') + + + buildConfigField "String", "BASE_URL", "\"https://live22x.com/\"" + buildConfigField "int", "USERID", "194" + buildConfigField "boolean", "IS_WHITE", "false" + buildConfigField "boolean", "IS_ROUND", "true" + buildConfigField "int", "ROUND_RADIUS", "10" + buildConfigField "boolean", "HAS_CONTACT", "true" + buildConfigField "boolean", "HAS_HOOK", "false" + + } + buildFeatures { + buildConfig = true + } + + signingConfigs { + debug { + storeFile file('telur33.jks') + storePassword "android2014" + keyAlias 'key0' + keyPassword "android2014" + } + release { + storeFile file('telur33.jks') + storePassword "android2014" + keyAlias 'key0' + keyPassword "android2014" + } + } + + buildTypes { + release { + signingConfig signingConfigs.release + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility rootProject.ext.JAVA_VERSION + targetCompatibility rootProject.ext.JAVA_VERSION + } + + applicationVariants.all { variant -> + variant.outputs.all { + def outputDir = new File(rootProject.ext.outputPath) + outputDir.mkdirs() + def outputFileName = "${appOutPutName}.apk" + setOutputFileName(outputFileName) + def newOutputFile = new File(outputDir, outputFileName) + newOutputFile.parentFile.mkdirs() + variant.assemble.doLast { + try { + java.nio.file.Files.copy( + outputFile.toPath(), + newOutputFile.toPath(), + java.nio.file.StandardCopyOption.REPLACE_EXISTING + ) + } catch (java.io.IOException e) { + } + } + } + } + +} + +dependencies { + implementation project(path: ':base') +} \ No newline at end of file diff --git a/xoxoau8/google-services.json b/xoxoau8/google-services.json new file mode 100644 index 0000000..c6566f7 --- /dev/null +++ b/xoxoau8/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "289684120498", + "project_id": "notiu4u33", + "storage_bucket": "notiu4u33.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:289684120498:android:8353724077c147f6a87aab", + "android_client_info": { + "package_name": "com.xyz.uu33au" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyDbm7aypAIFlowGoMKUoY83VLDnxcMQYVo" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/xoxoau8/justlet.jks b/xoxoau8/justlet.jks new file mode 100644 index 0000000..a33b839 Binary files /dev/null and b/xoxoau8/justlet.jks differ diff --git a/xoxoau8/proguard-rules.pro b/xoxoau8/proguard-rules.pro new file mode 100644 index 0000000..107b7ee --- /dev/null +++ b/xoxoau8/proguard-rules.pro @@ -0,0 +1,32 @@ +# 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 + +-dontwarn dalvik.** +-dontwarn com.tencent.smtt.** + +-keep class com.tencent.smtt.** { + *; +} + +-keep class com.tencent.tbs.** { + *; +} \ No newline at end of file diff --git a/xoxoau8/src/main/AndroidManifest.xml b/xoxoau8/src/main/AndroidManifest.xml new file mode 100644 index 0000000..7cbc0e0 --- /dev/null +++ b/xoxoau8/src/main/AndroidManifest.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xoxoau8/src/main/java/com/webclip/base/IndexActivity.java b/xoxoau8/src/main/java/com/webclip/base/IndexActivity.java new file mode 100644 index 0000000..c8e4780 --- /dev/null +++ b/xoxoau8/src/main/java/com/webclip/base/IndexActivity.java @@ -0,0 +1,79 @@ +package com.webclip.base; + +import android.os.Bundle; + +import com.google.firebase.messaging.FirebaseMessaging; + +public class IndexActivity extends MainActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + initConfig(); + super.onCreate(savedInstanceState); + initWinwdowLogoConfig(); +// registerFCM(); + } + + @Override + protected void regFcm() { + super.regFcm(); + registerFCM(); + } + + /** + * 注册FCM + */ + private void registerFCM() { + //订阅主题 + LogUtils.i("支持FCM 去注册"); + try { + FirebaseMessaging.getInstance().subscribeToTopic("demo") + .addOnCompleteListener(task -> { + String msg = "Subscribed"; + if (!task.isSuccessful()) { + msg = "Subscribe failed"; + }else{ + checkNotify(); + } + LogUtils.i("支持FCM 结果:"+msg); + }); + }catch (Exception e){ + e.printStackTrace(); + LogUtils.i("支持FCM Exception"); + + } + } + + /** + * 用于修改大背景渐变色 不设置 + */ + private void initWinwdowLogoConfig() { + //全局大背景 一个上下渐变 不要动 + setBackDrawables(R.drawable.big_bg); + setImageView(BuildConfig.IS_ROUND,BuildConfig.ROUND_RADIUS); + getWindow().getDecorView().setBackgroundResource(R.drawable.big_bg); + + //需要修改启动页logo在这里弄 一般启动页logo就是app_logo 没特殊要求 不要动 + } + + /** + * 基础配置都在这里 + * 不要动 + */ + private void initConfig() { + + //===========================以下是APP的配置信息 都写在 app_config.xml中================================== + userId = BuildConfig.USERID; + saveInt(IndexActivity.this,"user_code",userId); + + saveString(this, "base_url",BuildConfig.BASE_URL); + styleColor = getColor(R.color.style_color); + windowsColor = getColor(R.color.windows_color); + isWhite = BuildConfig.IS_WHITE; + hasContact = BuildConfig.HAS_CONTACT; + hasHook = BuildConfig.HAS_HOOK; + + //===========================以上是APP的配置信息 都写在 app_config.xml中================================== + } + +} diff --git a/xoxoau8/src/main/java/com/webclip/base/MyFirebaseMessageingService.java b/xoxoau8/src/main/java/com/webclip/base/MyFirebaseMessageingService.java new file mode 100644 index 0000000..36f2d65 --- /dev/null +++ b/xoxoau8/src/main/java/com/webclip/base/MyFirebaseMessageingService.java @@ -0,0 +1,125 @@ +package com.webclip.base; + +import android.app.NotificationChannel; +import android.app.NotificationManager; +import android.app.PendingIntent; +import android.content.ComponentName; +import android.content.Context; +import android.content.Intent; +import android.os.Build; +import androidx.annotation.NonNull; +import androidx.core.app.NotificationCompat; +import com.google.firebase.messaging.FirebaseMessagingService; +import com.google.firebase.messaging.RemoteMessage; +import com.google.gson.Gson; +import com.webclip.base.GsonUtils; +import com.webclip.base.MessageInfo; +import java.util.Map; +import java.util.Random; + +public class MyFirebaseMessageingService extends FirebaseMessagingService { + + public MyFirebaseMessageingService() { + } + + @Override + public void onMessageReceived(@NonNull RemoteMessage remoteMessage) { + super.onMessageReceived(remoteMessage); + Map serviceData = remoteMessage.getData(); //后台推送数据 + if (serviceData != null && serviceData.containsKey("message")) { + String value = serviceData.get("message"); + Gson gson = new Gson(); + MessageInfo messageInfo = gson.fromJson(value, MessageInfo.class); + showNotification(messageInfo); + } else { + //收到通知 创建notify + if (remoteMessage.getNotification() != null) { + showNotification(remoteMessage.getNotification().getTitle(), remoteMessage.getNotification().getBody()); + } + } + } + + private void showNotification(MessageInfo messageInfo) { + Intent notifyIntent = new Intent(this, IndexActivity.class); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) { + ComponentName launchComponent = null; + launchComponent = getApplication() + .getPackageManager() + .getLaunchIntentForPackage(getApplication().getPackageName()) + .getComponent(); + notifyIntent.setComponent(launchComponent); + } + notifyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); + notifyIntent.setAction(Intent.ACTION_VIEW); + notifyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // 必须 + notifyIntent.putExtra("message", messageInfo); + PendingIntent pendingIntent = PendingIntent.getActivity(this, new Random().nextInt(10000), notifyIntent, PendingIntent.FLAG_IMMUTABLE); + NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); + NotificationChannel channelwinway = null; + NotificationCompat.Builder notificationBuilder = null; + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + channelwinway = new NotificationChannel(getString(R.string.app_name), "notify", NotificationManager.IMPORTANCE_DEFAULT); + channelwinway.enableLights(true); + channelwinway.enableVibration(true); + notificationManager.createNotificationChannel(channelwinway); + notificationBuilder = new NotificationCompat.Builder(this, channelwinway.getId()) + .setSmallIcon(R.mipmap.app_logo) + .setContentTitle(messageInfo.getTitle()) + .setContentText(messageInfo.getContent()) + .setAutoCancel(true) + .setContentIntent(pendingIntent); + } else { + notificationBuilder = new NotificationCompat.Builder(this, getString(R.string.app_name)) + .setSmallIcon(R.mipmap.app_logo) + .setContentTitle(messageInfo.getTitle()) + .setContentText(messageInfo.getContent()) + .setAutoCancel(true) + .setContentIntent(pendingIntent); + } + notificationManager.notify(0, notificationBuilder.build()); + } + + private void showNotification(String title, String body) { + Intent notifyIntent = new Intent(this, IndexActivity.class); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUPCAKE) { + ComponentName launchComponent = null; + launchComponent = getApplication() + .getPackageManager() + .getLaunchIntentForPackage(getApplication().getPackageName()) + .getComponent(); + notifyIntent.setComponent(launchComponent); + } + notifyIntent.putExtra("message", body); + notifyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); + notifyIntent.setAction(Intent.ACTION_VIEW); + notifyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // 必须 + PendingIntent pendingIntent = PendingIntent.getActivity(this, new Random().nextInt(10000), notifyIntent, PendingIntent.FLAG_IMMUTABLE); + NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); + NotificationChannel channelwinway = null; + NotificationCompat.Builder notificationBuilder = null; + MessageInfo messageInfo = GsonUtils.getObjFromJSON(body, MessageInfo.class); + if (messageInfo != null) { + body = messageInfo.getContent(); + } + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + channelwinway = new NotificationChannel(getString(R.string.app_name), "notify", NotificationManager.IMPORTANCE_DEFAULT); + channelwinway.enableLights(true); + channelwinway.enableVibration(true); + notificationManager.createNotificationChannel(channelwinway); + notificationBuilder = new NotificationCompat.Builder(this, channelwinway.getId()) + .setSmallIcon(R.mipmap.app_logo) + .setContentTitle(title) + .setContentText(body) + .setAutoCancel(true) + .setContentIntent(pendingIntent); + } else { + notificationBuilder = new NotificationCompat.Builder(this, getString(R.string.app_name)) + .setSmallIcon(R.mipmap.app_logo) + .setContentTitle(title) + .setContentText(body) + .setAutoCancel(true) + .setContentIntent(pendingIntent); + } + notificationManager.notify(0, notificationBuilder.build()); + } +} diff --git a/xoxoau8/src/main/java/com/webclip/base/WebApplication.java b/xoxoau8/src/main/java/com/webclip/base/WebApplication.java new file mode 100644 index 0000000..36e2512 --- /dev/null +++ b/xoxoau8/src/main/java/com/webclip/base/WebApplication.java @@ -0,0 +1,19 @@ +package com.webclip.base; + +import android.app.Application; +import android.content.Context; + +import com.webclip.base.LogUtils; + +public class WebApplication extends Application { + + + public static Context application; + @Override + public void onCreate() { + super.onCreate(); +// 设置开启优化方案 + application = this; + LogUtils.isDebug = BuildConfig.BUILD_TYPE.equals("debug"); + } +} diff --git a/xoxoau8/src/main/res/drawable/big_bg.xml b/xoxoau8/src/main/res/drawable/big_bg.xml new file mode 100644 index 0000000..aa44959 --- /dev/null +++ b/xoxoau8/src/main/res/drawable/big_bg.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/xoxoau8/src/main/res/mipmap-xxhdpi/app_logo.png b/xoxoau8/src/main/res/mipmap-xxhdpi/app_logo.png new file mode 100644 index 0000000..407706d Binary files /dev/null and b/xoxoau8/src/main/res/mipmap-xxhdpi/app_logo.png differ diff --git a/xoxoau8/src/main/res/values/themes.xml b/xoxoau8/src/main/res/values/themes.xml new file mode 100644 index 0000000..f1ef249 --- /dev/null +++ b/xoxoau8/src/main/res/values/themes.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xoxoau8/src/main/res/xml/app_updater_paths.xml b/xoxoau8/src/main/res/xml/app_updater_paths.xml new file mode 100644 index 0000000..1254450 --- /dev/null +++ b/xoxoau8/src/main/res/xml/app_updater_paths.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/xoxoau8/src/main/res/xml/network_security_config.xml b/xoxoau8/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..dca93c0 --- /dev/null +++ b/xoxoau8/src/main/res/xml/network_security_config.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/xoxoau8/src/main/res/xml/provider_paths.xml b/xoxoau8/src/main/res/xml/provider_paths.xml new file mode 100644 index 0000000..c9a897a --- /dev/null +++ b/xoxoau8/src/main/res/xml/provider_paths.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/xoxoau8/telur33.jks b/xoxoau8/telur33.jks new file mode 100644 index 0000000..f00434d Binary files /dev/null and b/xoxoau8/telur33.jks differ