diff --git a/1xaceau/.gitignore b/1xaceau/.gitignore new file mode 100644 index 0000000..956c004 --- /dev/null +++ b/1xaceau/.gitignore @@ -0,0 +1,2 @@ +/build +/release \ No newline at end of file diff --git a/1xaceau/build.gradle b/1xaceau/build.gradle new file mode 100644 index 0000000..806e5c5 --- /dev/null +++ b/1xaceau/build.gradle @@ -0,0 +1,93 @@ +plugins { + id 'com.android.application' + id 'com.google.gms.google-services' +} + +def appOutPutName = "we88sg" + +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.noti.we88sg26" + + //app大背景色 + resValue('color', 'windows_color', '#030511') + //底部导航栏颜色 大背景颜色为 windows_color——style_color的上下渐变色 + resValue('color', 'style_color', '#030511') + //app 名字 + resValue('string', 'app_name', 'we88sg') + + + buildConfigField "String", "BASE_URL", "\"https://live22x.com/\"" + buildConfigField "int", "USERID", "22" + 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/1xaceau/google-services.json b/1xaceau/google-services.json new file mode 100644 index 0000000..297fa43 --- /dev/null +++ b/1xaceau/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "1028817181372", + "project_id": "we88sg26", + "storage_bucket": "we88sg26.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:1028817181372:android:c0c246bc3eb88035058eb9", + "android_client_info": { + "package_name": "com.noti.we88sg26" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyD0YIp3Rnd8uDQuvov_cv3fTJKWG-Ln80w" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/1xaceau/justlet.jks b/1xaceau/justlet.jks new file mode 100644 index 0000000..a33b839 Binary files /dev/null and b/1xaceau/justlet.jks differ diff --git a/1xaceau/proguard-rules.pro b/1xaceau/proguard-rules.pro new file mode 100644 index 0000000..107b7ee --- /dev/null +++ b/1xaceau/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/1xaceau/src/main/AndroidManifest.xml b/1xaceau/src/main/AndroidManifest.xml new file mode 100644 index 0000000..7cbc0e0 --- /dev/null +++ b/1xaceau/src/main/AndroidManifest.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/1xaceau/src/main/java/com/webclip/base/IndexActivity.java b/1xaceau/src/main/java/com/webclip/base/IndexActivity.java new file mode 100644 index 0000000..c8e4780 --- /dev/null +++ b/1xaceau/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/1xaceau/src/main/java/com/webclip/base/MyFirebaseMessageingService.java b/1xaceau/src/main/java/com/webclip/base/MyFirebaseMessageingService.java new file mode 100644 index 0000000..36f2d65 --- /dev/null +++ b/1xaceau/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/1xaceau/src/main/java/com/webclip/base/WebApplication.java b/1xaceau/src/main/java/com/webclip/base/WebApplication.java new file mode 100644 index 0000000..36e2512 --- /dev/null +++ b/1xaceau/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/1xaceau/src/main/res/drawable/big_bg.xml b/1xaceau/src/main/res/drawable/big_bg.xml new file mode 100644 index 0000000..aa44959 --- /dev/null +++ b/1xaceau/src/main/res/drawable/big_bg.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/1xaceau/src/main/res/mipmap-xxhdpi/app_logo.png b/1xaceau/src/main/res/mipmap-xxhdpi/app_logo.png new file mode 100644 index 0000000..0232ebf Binary files /dev/null and b/1xaceau/src/main/res/mipmap-xxhdpi/app_logo.png differ diff --git a/1xaceau/src/main/res/values/themes.xml b/1xaceau/src/main/res/values/themes.xml new file mode 100644 index 0000000..f1ef249 --- /dev/null +++ b/1xaceau/src/main/res/values/themes.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/1xaceau/src/main/res/xml/app_updater_paths.xml b/1xaceau/src/main/res/xml/app_updater_paths.xml new file mode 100644 index 0000000..1254450 --- /dev/null +++ b/1xaceau/src/main/res/xml/app_updater_paths.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/1xaceau/src/main/res/xml/network_security_config.xml b/1xaceau/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..dca93c0 --- /dev/null +++ b/1xaceau/src/main/res/xml/network_security_config.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/1xaceau/src/main/res/xml/provider_paths.xml b/1xaceau/src/main/res/xml/provider_paths.xml new file mode 100644 index 0000000..c9a897a --- /dev/null +++ b/1xaceau/src/main/res/xml/provider_paths.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/1xaceau/telur33.jks b/1xaceau/telur33.jks new file mode 100644 index 0000000..f00434d Binary files /dev/null and b/1xaceau/telur33.jks differ diff --git a/2URUS/.gitignore b/2URUS/.gitignore new file mode 100644 index 0000000..956c004 --- /dev/null +++ b/2URUS/.gitignore @@ -0,0 +1,2 @@ +/build +/release \ No newline at end of file diff --git a/2URUS/build.gradle b/2URUS/build.gradle new file mode 100644 index 0000000..806e5c5 --- /dev/null +++ b/2URUS/build.gradle @@ -0,0 +1,93 @@ +plugins { + id 'com.android.application' + id 'com.google.gms.google-services' +} + +def appOutPutName = "we88sg" + +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.noti.we88sg26" + + //app大背景色 + resValue('color', 'windows_color', '#030511') + //底部导航栏颜色 大背景颜色为 windows_color——style_color的上下渐变色 + resValue('color', 'style_color', '#030511') + //app 名字 + resValue('string', 'app_name', 'we88sg') + + + buildConfigField "String", "BASE_URL", "\"https://live22x.com/\"" + buildConfigField "int", "USERID", "22" + 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/2URUS/google-services.json b/2URUS/google-services.json new file mode 100644 index 0000000..297fa43 --- /dev/null +++ b/2URUS/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "1028817181372", + "project_id": "we88sg26", + "storage_bucket": "we88sg26.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:1028817181372:android:c0c246bc3eb88035058eb9", + "android_client_info": { + "package_name": "com.noti.we88sg26" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyD0YIp3Rnd8uDQuvov_cv3fTJKWG-Ln80w" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/2URUS/justlet.jks b/2URUS/justlet.jks new file mode 100644 index 0000000..a33b839 Binary files /dev/null and b/2URUS/justlet.jks differ diff --git a/2URUS/proguard-rules.pro b/2URUS/proguard-rules.pro new file mode 100644 index 0000000..107b7ee --- /dev/null +++ b/2URUS/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/2URUS/src/main/AndroidManifest.xml b/2URUS/src/main/AndroidManifest.xml new file mode 100644 index 0000000..7cbc0e0 --- /dev/null +++ b/2URUS/src/main/AndroidManifest.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/2URUS/src/main/java/com/webclip/base/IndexActivity.java b/2URUS/src/main/java/com/webclip/base/IndexActivity.java new file mode 100644 index 0000000..c8e4780 --- /dev/null +++ b/2URUS/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/2URUS/src/main/java/com/webclip/base/MyFirebaseMessageingService.java b/2URUS/src/main/java/com/webclip/base/MyFirebaseMessageingService.java new file mode 100644 index 0000000..36f2d65 --- /dev/null +++ b/2URUS/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/2URUS/src/main/java/com/webclip/base/WebApplication.java b/2URUS/src/main/java/com/webclip/base/WebApplication.java new file mode 100644 index 0000000..36e2512 --- /dev/null +++ b/2URUS/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/2URUS/src/main/res/drawable/big_bg.xml b/2URUS/src/main/res/drawable/big_bg.xml new file mode 100644 index 0000000..aa44959 --- /dev/null +++ b/2URUS/src/main/res/drawable/big_bg.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/2URUS/src/main/res/mipmap-xxhdpi/app_logo.jpg b/2URUS/src/main/res/mipmap-xxhdpi/app_logo.jpg new file mode 100644 index 0000000..b43c8bc Binary files /dev/null and b/2URUS/src/main/res/mipmap-xxhdpi/app_logo.jpg differ diff --git a/2URUS/src/main/res/values/themes.xml b/2URUS/src/main/res/values/themes.xml new file mode 100644 index 0000000..f1ef249 --- /dev/null +++ b/2URUS/src/main/res/values/themes.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/2URUS/src/main/res/xml/app_updater_paths.xml b/2URUS/src/main/res/xml/app_updater_paths.xml new file mode 100644 index 0000000..1254450 --- /dev/null +++ b/2URUS/src/main/res/xml/app_updater_paths.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/2URUS/src/main/res/xml/network_security_config.xml b/2URUS/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..dca93c0 --- /dev/null +++ b/2URUS/src/main/res/xml/network_security_config.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/2URUS/src/main/res/xml/provider_paths.xml b/2URUS/src/main/res/xml/provider_paths.xml new file mode 100644 index 0000000..c9a897a --- /dev/null +++ b/2URUS/src/main/res/xml/provider_paths.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/2URUS/telur33.jks b/2URUS/telur33.jks new file mode 100644 index 0000000..f00434d Binary files /dev/null and b/2URUS/telur33.jks differ diff --git a/ANTBET/.gitignore b/ANTBET/.gitignore new file mode 100644 index 0000000..956c004 --- /dev/null +++ b/ANTBET/.gitignore @@ -0,0 +1,2 @@ +/build +/release \ No newline at end of file diff --git a/ANTBET/build.gradle b/ANTBET/build.gradle new file mode 100644 index 0000000..6924125 --- /dev/null +++ b/ANTBET/build.gradle @@ -0,0 +1,93 @@ +plugins { + id 'com.android.application' + id 'com.google.gms.google-services' +} + +def appOutPutName = "1XACEAU" + +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.ahdas.xaceau" + + //app大背景色 + resValue('color', 'windows_color', '#1A1A1A') + //底部导航栏颜色 大背景颜色为 windows_color——style_color的上下渐变色 + resValue('color', 'style_color', '#08192A') + //app 名字 + resValue('string', 'app_name', '1XACEAU') + + + buildConfigField "String", "BASE_URL", "\"https://live22x.com/\"" + buildConfigField "int", "USERID", "300" + 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/ANTBET/google-services.json b/ANTBET/google-services.json new file mode 100644 index 0000000..86b7a0d --- /dev/null +++ b/ANTBET/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "932292522704", + "project_id": "xaceau-53664", + "storage_bucket": "xaceau-53664.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:932292522704:android:521063bf4d7362e454a4d5", + "android_client_info": { + "package_name": "com.ahdas.xaceau" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyAEPUZSDu21oB5WSSrqHLT0xE-rwHYoCtU" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/ANTBET/justlet.jks b/ANTBET/justlet.jks new file mode 100644 index 0000000..a33b839 Binary files /dev/null and b/ANTBET/justlet.jks differ diff --git a/ANTBET/proguard-rules.pro b/ANTBET/proguard-rules.pro new file mode 100644 index 0000000..107b7ee --- /dev/null +++ b/ANTBET/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/ANTBET/src/main/AndroidManifest.xml b/ANTBET/src/main/AndroidManifest.xml new file mode 100644 index 0000000..7cbc0e0 --- /dev/null +++ b/ANTBET/src/main/AndroidManifest.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ANTBET/src/main/java/com/webclip/base/IndexActivity.java b/ANTBET/src/main/java/com/webclip/base/IndexActivity.java new file mode 100644 index 0000000..c8e4780 --- /dev/null +++ b/ANTBET/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/ANTBET/src/main/java/com/webclip/base/MyFirebaseMessageingService.java b/ANTBET/src/main/java/com/webclip/base/MyFirebaseMessageingService.java new file mode 100644 index 0000000..36f2d65 --- /dev/null +++ b/ANTBET/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/ANTBET/src/main/java/com/webclip/base/WebApplication.java b/ANTBET/src/main/java/com/webclip/base/WebApplication.java new file mode 100644 index 0000000..36e2512 --- /dev/null +++ b/ANTBET/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/ANTBET/src/main/res/drawable/big_bg.xml b/ANTBET/src/main/res/drawable/big_bg.xml new file mode 100644 index 0000000..aa44959 --- /dev/null +++ b/ANTBET/src/main/res/drawable/big_bg.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/ANTBET/src/main/res/mipmap-xxhdpi/app_logo.png b/ANTBET/src/main/res/mipmap-xxhdpi/app_logo.png new file mode 100644 index 0000000..addf638 Binary files /dev/null and b/ANTBET/src/main/res/mipmap-xxhdpi/app_logo.png differ diff --git a/ANTBET/src/main/res/values/themes.xml b/ANTBET/src/main/res/values/themes.xml new file mode 100644 index 0000000..f1ef249 --- /dev/null +++ b/ANTBET/src/main/res/values/themes.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ANTBET/src/main/res/xml/app_updater_paths.xml b/ANTBET/src/main/res/xml/app_updater_paths.xml new file mode 100644 index 0000000..1254450 --- /dev/null +++ b/ANTBET/src/main/res/xml/app_updater_paths.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/ANTBET/src/main/res/xml/network_security_config.xml b/ANTBET/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..dca93c0 --- /dev/null +++ b/ANTBET/src/main/res/xml/network_security_config.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ANTBET/src/main/res/xml/provider_paths.xml b/ANTBET/src/main/res/xml/provider_paths.xml new file mode 100644 index 0000000..c9a897a --- /dev/null +++ b/ANTBET/src/main/res/xml/provider_paths.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/ANTBET/telur33.jks b/ANTBET/telur33.jks new file mode 100644 index 0000000..f00434d Binary files /dev/null and b/ANTBET/telur33.jks differ diff --git a/BOSSKU/.gitignore b/BOSSKU/.gitignore new file mode 100644 index 0000000..956c004 --- /dev/null +++ b/BOSSKU/.gitignore @@ -0,0 +1,2 @@ +/build +/release \ No newline at end of file diff --git a/BOSSKU/build.gradle b/BOSSKU/build.gradle new file mode 100644 index 0000000..6b84cdf --- /dev/null +++ b/BOSSKU/build.gradle @@ -0,0 +1,93 @@ +plugins { + id 'com.android.application' + id 'com.google.gms.google-services' +} + +def appOutPutName = "ANTBET" + +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.hausd.ANTBET" + + //app大背景色 + resValue('color', 'windows_color', '#1A1A1A') + //底部导航栏颜色 大背景颜色为 windows_color——style_color的上下渐变色 + resValue('color', 'style_color', '#1A1A1A') + //app 名字 + resValue('string', 'app_name', 'ANTBET') + + + buildConfigField "String", "BASE_URL", "\"https://live22x.com/\"" + buildConfigField "int", "USERID", "307" + 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/BOSSKU/google-services.json b/BOSSKU/google-services.json new file mode 100644 index 0000000..a2deddc --- /dev/null +++ b/BOSSKU/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "781122275884", + "project_id": "antbet-e3b1c", + "storage_bucket": "antbet-e3b1c.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:781122275884:android:8f5f3f751d8558c2831f89", + "android_client_info": { + "package_name": "com.hausd.ANTBET" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyBUfKVyRr9FpPQt4i7XgiYC11j9Oafw1rs" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/BOSSKU/justlet.jks b/BOSSKU/justlet.jks new file mode 100644 index 0000000..a33b839 Binary files /dev/null and b/BOSSKU/justlet.jks differ diff --git a/BOSSKU/proguard-rules.pro b/BOSSKU/proguard-rules.pro new file mode 100644 index 0000000..107b7ee --- /dev/null +++ b/BOSSKU/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/BOSSKU/src/main/AndroidManifest.xml b/BOSSKU/src/main/AndroidManifest.xml new file mode 100644 index 0000000..7cbc0e0 --- /dev/null +++ b/BOSSKU/src/main/AndroidManifest.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BOSSKU/src/main/java/com/webclip/base/IndexActivity.java b/BOSSKU/src/main/java/com/webclip/base/IndexActivity.java new file mode 100644 index 0000000..c8e4780 --- /dev/null +++ b/BOSSKU/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/BOSSKU/src/main/java/com/webclip/base/MyFirebaseMessageingService.java b/BOSSKU/src/main/java/com/webclip/base/MyFirebaseMessageingService.java new file mode 100644 index 0000000..36f2d65 --- /dev/null +++ b/BOSSKU/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/BOSSKU/src/main/java/com/webclip/base/WebApplication.java b/BOSSKU/src/main/java/com/webclip/base/WebApplication.java new file mode 100644 index 0000000..36e2512 --- /dev/null +++ b/BOSSKU/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/BOSSKU/src/main/res/drawable/big_bg.xml b/BOSSKU/src/main/res/drawable/big_bg.xml new file mode 100644 index 0000000..aa44959 --- /dev/null +++ b/BOSSKU/src/main/res/drawable/big_bg.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/BOSSKU/src/main/res/mipmap-xxhdpi/app_logo.png b/BOSSKU/src/main/res/mipmap-xxhdpi/app_logo.png new file mode 100644 index 0000000..aa65e21 Binary files /dev/null and b/BOSSKU/src/main/res/mipmap-xxhdpi/app_logo.png differ diff --git a/BOSSKU/src/main/res/values/themes.xml b/BOSSKU/src/main/res/values/themes.xml new file mode 100644 index 0000000..f1ef249 --- /dev/null +++ b/BOSSKU/src/main/res/values/themes.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BOSSKU/src/main/res/xml/app_updater_paths.xml b/BOSSKU/src/main/res/xml/app_updater_paths.xml new file mode 100644 index 0000000..1254450 --- /dev/null +++ b/BOSSKU/src/main/res/xml/app_updater_paths.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/BOSSKU/src/main/res/xml/network_security_config.xml b/BOSSKU/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..dca93c0 --- /dev/null +++ b/BOSSKU/src/main/res/xml/network_security_config.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/BOSSKU/src/main/res/xml/provider_paths.xml b/BOSSKU/src/main/res/xml/provider_paths.xml new file mode 100644 index 0000000..c9a897a --- /dev/null +++ b/BOSSKU/src/main/res/xml/provider_paths.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/BOSSKU/telur33.jks b/BOSSKU/telur33.jks new file mode 100644 index 0000000..f00434d Binary files /dev/null and b/BOSSKU/telur33.jks differ diff --git a/JDCLUB9VIP/.gitignore b/JDCLUB9VIP/.gitignore new file mode 100644 index 0000000..956c004 --- /dev/null +++ b/JDCLUB9VIP/.gitignore @@ -0,0 +1,2 @@ +/build +/release \ No newline at end of file diff --git a/JDCLUB9VIP/build.gradle b/JDCLUB9VIP/build.gradle new file mode 100644 index 0000000..ebb3d2b --- /dev/null +++ b/JDCLUB9VIP/build.gradle @@ -0,0 +1,93 @@ +plugins { + id 'com.android.application' + id 'com.google.gms.google-services' +} + +def appOutPutName = "xofun88" + +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.xizhcozzc.xoxau" + + //app大背景色 + resValue('color', 'windows_color', '#1A1A1A') + //底部导航栏颜色 大背景颜色为 windows_color——style_color的上下渐变色 + resValue('color', 'style_color', '#1A1A1A') + //app 名字 + resValue('string', 'app_name', 'XOFUN88') + + + buildConfigField "String", "BASE_URL", "\"https://live22x.com/\"" + buildConfigField "int", "USERID", "274" + buildConfigField "boolean", "IS_WHITE", "false" + buildConfigField "boolean", "IS_ROUND", "true" + buildConfigField "int", "ROUND_RADIUS", "10" + buildConfigField "boolean", "HAS_CONTACT", "false" + 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/JDCLUB9VIP/google-services.json b/JDCLUB9VIP/google-services.json new file mode 100644 index 0000000..921af0d --- /dev/null +++ b/JDCLUB9VIP/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "531093842148", + "project_id": "xoxau-73987", + "storage_bucket": "xoxau-73987.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:531093842148:android:900f21468e3a0b3cd0a4f1", + "android_client_info": { + "package_name": "com.xizhcozzc.xoxau" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyC-hKTovaVgvbDbnwcHt-IOvXU2goYVjrk" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/JDCLUB9VIP/justlet.jks b/JDCLUB9VIP/justlet.jks new file mode 100644 index 0000000..a33b839 Binary files /dev/null and b/JDCLUB9VIP/justlet.jks differ diff --git a/JDCLUB9VIP/proguard-rules.pro b/JDCLUB9VIP/proguard-rules.pro new file mode 100644 index 0000000..107b7ee --- /dev/null +++ b/JDCLUB9VIP/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/JDCLUB9VIP/src/main/AndroidManifest.xml b/JDCLUB9VIP/src/main/AndroidManifest.xml new file mode 100644 index 0000000..7cbc0e0 --- /dev/null +++ b/JDCLUB9VIP/src/main/AndroidManifest.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/JDCLUB9VIP/src/main/java/com/webclip/base/IndexActivity.java b/JDCLUB9VIP/src/main/java/com/webclip/base/IndexActivity.java new file mode 100644 index 0000000..c8e4780 --- /dev/null +++ b/JDCLUB9VIP/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/JDCLUB9VIP/src/main/java/com/webclip/base/MyFirebaseMessageingService.java b/JDCLUB9VIP/src/main/java/com/webclip/base/MyFirebaseMessageingService.java new file mode 100644 index 0000000..36f2d65 --- /dev/null +++ b/JDCLUB9VIP/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/JDCLUB9VIP/src/main/java/com/webclip/base/WebApplication.java b/JDCLUB9VIP/src/main/java/com/webclip/base/WebApplication.java new file mode 100644 index 0000000..36e2512 --- /dev/null +++ b/JDCLUB9VIP/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/JDCLUB9VIP/src/main/res/drawable/big_bg.xml b/JDCLUB9VIP/src/main/res/drawable/big_bg.xml new file mode 100644 index 0000000..aa44959 --- /dev/null +++ b/JDCLUB9VIP/src/main/res/drawable/big_bg.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/JDCLUB9VIP/src/main/res/mipmap-xxhdpi/app_logo.jpg b/JDCLUB9VIP/src/main/res/mipmap-xxhdpi/app_logo.jpg new file mode 100644 index 0000000..899585d Binary files /dev/null and b/JDCLUB9VIP/src/main/res/mipmap-xxhdpi/app_logo.jpg differ diff --git a/JDCLUB9VIP/src/main/res/values/themes.xml b/JDCLUB9VIP/src/main/res/values/themes.xml new file mode 100644 index 0000000..f1ef249 --- /dev/null +++ b/JDCLUB9VIP/src/main/res/values/themes.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/JDCLUB9VIP/src/main/res/xml/app_updater_paths.xml b/JDCLUB9VIP/src/main/res/xml/app_updater_paths.xml new file mode 100644 index 0000000..1254450 --- /dev/null +++ b/JDCLUB9VIP/src/main/res/xml/app_updater_paths.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/JDCLUB9VIP/src/main/res/xml/network_security_config.xml b/JDCLUB9VIP/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..dca93c0 --- /dev/null +++ b/JDCLUB9VIP/src/main/res/xml/network_security_config.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/JDCLUB9VIP/src/main/res/xml/provider_paths.xml b/JDCLUB9VIP/src/main/res/xml/provider_paths.xml new file mode 100644 index 0000000..c9a897a --- /dev/null +++ b/JDCLUB9VIP/src/main/res/xml/provider_paths.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/JDCLUB9VIP/telur33.jks b/JDCLUB9VIP/telur33.jks new file mode 100644 index 0000000..f00434d Binary files /dev/null and b/JDCLUB9VIP/telur33.jks differ diff --git a/KINGCUCI/.gitignore b/KINGCUCI/.gitignore new file mode 100644 index 0000000..956c004 --- /dev/null +++ b/KINGCUCI/.gitignore @@ -0,0 +1,2 @@ +/build +/release \ No newline at end of file diff --git a/KINGCUCI/build.gradle b/KINGCUCI/build.gradle new file mode 100644 index 0000000..6924125 --- /dev/null +++ b/KINGCUCI/build.gradle @@ -0,0 +1,93 @@ +plugins { + id 'com.android.application' + id 'com.google.gms.google-services' +} + +def appOutPutName = "1XACEAU" + +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.ahdas.xaceau" + + //app大背景色 + resValue('color', 'windows_color', '#1A1A1A') + //底部导航栏颜色 大背景颜色为 windows_color——style_color的上下渐变色 + resValue('color', 'style_color', '#08192A') + //app 名字 + resValue('string', 'app_name', '1XACEAU') + + + buildConfigField "String", "BASE_URL", "\"https://live22x.com/\"" + buildConfigField "int", "USERID", "300" + 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/KINGCUCI/google-services.json b/KINGCUCI/google-services.json new file mode 100644 index 0000000..86b7a0d --- /dev/null +++ b/KINGCUCI/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "932292522704", + "project_id": "xaceau-53664", + "storage_bucket": "xaceau-53664.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:932292522704:android:521063bf4d7362e454a4d5", + "android_client_info": { + "package_name": "com.ahdas.xaceau" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyAEPUZSDu21oB5WSSrqHLT0xE-rwHYoCtU" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/KINGCUCI/justlet.jks b/KINGCUCI/justlet.jks new file mode 100644 index 0000000..a33b839 Binary files /dev/null and b/KINGCUCI/justlet.jks differ diff --git a/KINGCUCI/proguard-rules.pro b/KINGCUCI/proguard-rules.pro new file mode 100644 index 0000000..107b7ee --- /dev/null +++ b/KINGCUCI/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/KINGCUCI/src/main/AndroidManifest.xml b/KINGCUCI/src/main/AndroidManifest.xml new file mode 100644 index 0000000..7cbc0e0 --- /dev/null +++ b/KINGCUCI/src/main/AndroidManifest.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/KINGCUCI/src/main/java/com/webclip/base/IndexActivity.java b/KINGCUCI/src/main/java/com/webclip/base/IndexActivity.java new file mode 100644 index 0000000..c8e4780 --- /dev/null +++ b/KINGCUCI/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/KINGCUCI/src/main/java/com/webclip/base/MyFirebaseMessageingService.java b/KINGCUCI/src/main/java/com/webclip/base/MyFirebaseMessageingService.java new file mode 100644 index 0000000..36f2d65 --- /dev/null +++ b/KINGCUCI/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/KINGCUCI/src/main/java/com/webclip/base/WebApplication.java b/KINGCUCI/src/main/java/com/webclip/base/WebApplication.java new file mode 100644 index 0000000..36e2512 --- /dev/null +++ b/KINGCUCI/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/KINGCUCI/src/main/res/drawable/big_bg.xml b/KINGCUCI/src/main/res/drawable/big_bg.xml new file mode 100644 index 0000000..aa44959 --- /dev/null +++ b/KINGCUCI/src/main/res/drawable/big_bg.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/KINGCUCI/src/main/res/mipmap-xxhdpi/app_logo.png b/KINGCUCI/src/main/res/mipmap-xxhdpi/app_logo.png new file mode 100644 index 0000000..0232ebf Binary files /dev/null and b/KINGCUCI/src/main/res/mipmap-xxhdpi/app_logo.png differ diff --git a/KINGCUCI/src/main/res/values/themes.xml b/KINGCUCI/src/main/res/values/themes.xml new file mode 100644 index 0000000..f1ef249 --- /dev/null +++ b/KINGCUCI/src/main/res/values/themes.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/KINGCUCI/src/main/res/xml/app_updater_paths.xml b/KINGCUCI/src/main/res/xml/app_updater_paths.xml new file mode 100644 index 0000000..1254450 --- /dev/null +++ b/KINGCUCI/src/main/res/xml/app_updater_paths.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/KINGCUCI/src/main/res/xml/network_security_config.xml b/KINGCUCI/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..dca93c0 --- /dev/null +++ b/KINGCUCI/src/main/res/xml/network_security_config.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/KINGCUCI/src/main/res/xml/provider_paths.xml b/KINGCUCI/src/main/res/xml/provider_paths.xml new file mode 100644 index 0000000..c9a897a --- /dev/null +++ b/KINGCUCI/src/main/res/xml/provider_paths.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/KINGCUCI/telur33.jks b/KINGCUCI/telur33.jks new file mode 100644 index 0000000..f00434d Binary files /dev/null and b/KINGCUCI/telur33.jks differ diff --git a/LSDpokies/.gitignore b/LSDpokies/.gitignore new file mode 100644 index 0000000..956c004 --- /dev/null +++ b/LSDpokies/.gitignore @@ -0,0 +1,2 @@ +/build +/release \ No newline at end of file diff --git a/LSDpokies/build.gradle b/LSDpokies/build.gradle new file mode 100644 index 0000000..58e076d --- /dev/null +++ b/LSDpokies/build.gradle @@ -0,0 +1,99 @@ + plugins { + id 'com.android.application' + id 'com.google.gms.google-services' +} + +def appOutPutName = "b88" + +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.shahd.b88" + //app大背景色 + resValue('color', 'windows_color', '#000000') + //底部导航栏颜色 大背景颜色为 windows_color——style_color的上下渐变色 + resValue('color', 'style_color', '#000000') + //app 名字 + resValue('string', 'app_name', 'B88') + //预埋订阅网址 + buildConfigField "String", "BASE_URL", "\"https://auplayx.com/\"" + //后台唯一ID + buildConfigField "int", "USERID", "301" + //状态栏文字颜色是否为白色 + buildConfigField "boolean", "IS_WHITE", "true" + //是否强转启动图为圆形 + buildConfigField "boolean", "IS_ROUND", "true" + //IS_ROUND 为 true时 圆角启动logo的 圆角大小 为0 表示为圆形 否则为ROUND_RADIUS的 dp2px的 数字大小 + buildConfigField "int", "ROUND_RADIUS", "10" + //已废弃 + buildConfigField "boolean", "HAS_CONTACT", "true" + //已废弃 + buildConfigField "boolean", "HAS_HOOK", "false" + + } + buildFeatures { + buildConfig = true + resValues = true + } + + signingConfigs { + debug { + storeFile file('justlet.jks') + storePassword "123456" + keyAlias 'key0' + keyPassword "123456" + } + release { + storeFile file('justlet.jks') + storePassword "123456" + keyAlias 'key0' + keyPassword "123456" + } + } + + 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/LSDpokies/google-services.json b/LSDpokies/google-services.json new file mode 100644 index 0000000..b434860 --- /dev/null +++ b/LSDpokies/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "335717969099", + "project_id": "b888-a8604", + "storage_bucket": "b888-a8604.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:335717969099:android:5f89a1044107b0fac4ff4e", + "android_client_info": { + "package_name": "com.shahd.b88" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyCcV183IHFxsqHsH2sEAQhJsFmTgMod8ZY" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/LSDpokies/justlet.jks b/LSDpokies/justlet.jks new file mode 100644 index 0000000..a33b839 Binary files /dev/null and b/LSDpokies/justlet.jks differ diff --git a/LSDpokies/proguard-rules.pro b/LSDpokies/proguard-rules.pro new file mode 100644 index 0000000..107b7ee --- /dev/null +++ b/LSDpokies/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/LSDpokies/src/main/AndroidManifest.xml b/LSDpokies/src/main/AndroidManifest.xml new file mode 100644 index 0000000..f129a21 --- /dev/null +++ b/LSDpokies/src/main/AndroidManifest.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/LSDpokies/src/main/java/com/webclip/base/IndexActivity.java b/LSDpokies/src/main/java/com/webclip/base/IndexActivity.java new file mode 100644 index 0000000..88c542b --- /dev/null +++ b/LSDpokies/src/main/java/com/webclip/base/IndexActivity.java @@ -0,0 +1,81 @@ +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 没特殊要求 不要动 +// activityMain2Binding.showTopV.setImageResource(R.mipmap.ic_launcher); + + } + + /** + * 基础配置都在这里 + * 不要动 + */ + 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/LSDpokies/src/main/java/com/webclip/base/MyFirebaseMessageingService.java b/LSDpokies/src/main/java/com/webclip/base/MyFirebaseMessageingService.java new file mode 100644 index 0000000..36f2d65 --- /dev/null +++ b/LSDpokies/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/LSDpokies/src/main/java/com/webclip/base/WebApplication.java b/LSDpokies/src/main/java/com/webclip/base/WebApplication.java new file mode 100644 index 0000000..36e2512 --- /dev/null +++ b/LSDpokies/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/LSDpokies/src/main/res/drawable/big_bg.xml b/LSDpokies/src/main/res/drawable/big_bg.xml new file mode 100644 index 0000000..b058f1e --- /dev/null +++ b/LSDpokies/src/main/res/drawable/big_bg.xml @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/LSDpokies/src/main/res/mipmap-xxhdpi/app_logo.png b/LSDpokies/src/main/res/mipmap-xxhdpi/app_logo.png new file mode 100644 index 0000000..599222b Binary files /dev/null and b/LSDpokies/src/main/res/mipmap-xxhdpi/app_logo.png differ diff --git a/LSDpokies/src/main/res/values/ic_launcher_background.xml b/LSDpokies/src/main/res/values/ic_launcher_background.xml new file mode 100644 index 0000000..c5d5899 --- /dev/null +++ b/LSDpokies/src/main/res/values/ic_launcher_background.xml @@ -0,0 +1,4 @@ + + + #FFFFFF + \ No newline at end of file diff --git a/LSDpokies/src/main/res/values/themes.xml b/LSDpokies/src/main/res/values/themes.xml new file mode 100644 index 0000000..f1ef249 --- /dev/null +++ b/LSDpokies/src/main/res/values/themes.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/LSDpokies/src/main/res/xml/app_updater_paths.xml b/LSDpokies/src/main/res/xml/app_updater_paths.xml new file mode 100644 index 0000000..1254450 --- /dev/null +++ b/LSDpokies/src/main/res/xml/app_updater_paths.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/LSDpokies/src/main/res/xml/network_security_config.xml b/LSDpokies/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..dca93c0 --- /dev/null +++ b/LSDpokies/src/main/res/xml/network_security_config.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/LSDpokies/src/main/res/xml/provider_paths.xml b/LSDpokies/src/main/res/xml/provider_paths.xml new file mode 100644 index 0000000..c9a897a --- /dev/null +++ b/LSDpokies/src/main/res/xml/provider_paths.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/NEPSPIN88/.gitignore b/NEPSPIN88/.gitignore new file mode 100644 index 0000000..956c004 --- /dev/null +++ b/NEPSPIN88/.gitignore @@ -0,0 +1,2 @@ +/build +/release \ No newline at end of file diff --git a/NEPSPIN88/build.gradle b/NEPSPIN88/build.gradle new file mode 100644 index 0000000..806e5c5 --- /dev/null +++ b/NEPSPIN88/build.gradle @@ -0,0 +1,93 @@ +plugins { + id 'com.android.application' + id 'com.google.gms.google-services' +} + +def appOutPutName = "we88sg" + +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.noti.we88sg26" + + //app大背景色 + resValue('color', 'windows_color', '#030511') + //底部导航栏颜色 大背景颜色为 windows_color——style_color的上下渐变色 + resValue('color', 'style_color', '#030511') + //app 名字 + resValue('string', 'app_name', 'we88sg') + + + buildConfigField "String", "BASE_URL", "\"https://live22x.com/\"" + buildConfigField "int", "USERID", "22" + 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/NEPSPIN88/google-services.json b/NEPSPIN88/google-services.json new file mode 100644 index 0000000..297fa43 --- /dev/null +++ b/NEPSPIN88/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "1028817181372", + "project_id": "we88sg26", + "storage_bucket": "we88sg26.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:1028817181372:android:c0c246bc3eb88035058eb9", + "android_client_info": { + "package_name": "com.noti.we88sg26" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyD0YIp3Rnd8uDQuvov_cv3fTJKWG-Ln80w" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/NEPSPIN88/justlet.jks b/NEPSPIN88/justlet.jks new file mode 100644 index 0000000..a33b839 Binary files /dev/null and b/NEPSPIN88/justlet.jks differ diff --git a/NEPSPIN88/proguard-rules.pro b/NEPSPIN88/proguard-rules.pro new file mode 100644 index 0000000..107b7ee --- /dev/null +++ b/NEPSPIN88/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/NEPSPIN88/src/main/AndroidManifest.xml b/NEPSPIN88/src/main/AndroidManifest.xml new file mode 100644 index 0000000..7cbc0e0 --- /dev/null +++ b/NEPSPIN88/src/main/AndroidManifest.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/NEPSPIN88/src/main/java/com/webclip/base/IndexActivity.java b/NEPSPIN88/src/main/java/com/webclip/base/IndexActivity.java new file mode 100644 index 0000000..c8e4780 --- /dev/null +++ b/NEPSPIN88/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/NEPSPIN88/src/main/java/com/webclip/base/MyFirebaseMessageingService.java b/NEPSPIN88/src/main/java/com/webclip/base/MyFirebaseMessageingService.java new file mode 100644 index 0000000..36f2d65 --- /dev/null +++ b/NEPSPIN88/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/NEPSPIN88/src/main/java/com/webclip/base/WebApplication.java b/NEPSPIN88/src/main/java/com/webclip/base/WebApplication.java new file mode 100644 index 0000000..36e2512 --- /dev/null +++ b/NEPSPIN88/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/NEPSPIN88/src/main/res/drawable/big_bg.xml b/NEPSPIN88/src/main/res/drawable/big_bg.xml new file mode 100644 index 0000000..aa44959 --- /dev/null +++ b/NEPSPIN88/src/main/res/drawable/big_bg.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/NEPSPIN88/src/main/res/mipmap-xxhdpi/app_logo.jpg b/NEPSPIN88/src/main/res/mipmap-xxhdpi/app_logo.jpg new file mode 100644 index 0000000..0a08230 Binary files /dev/null and b/NEPSPIN88/src/main/res/mipmap-xxhdpi/app_logo.jpg differ diff --git a/NEPSPIN88/src/main/res/values/themes.xml b/NEPSPIN88/src/main/res/values/themes.xml new file mode 100644 index 0000000..f1ef249 --- /dev/null +++ b/NEPSPIN88/src/main/res/values/themes.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/NEPSPIN88/src/main/res/xml/app_updater_paths.xml b/NEPSPIN88/src/main/res/xml/app_updater_paths.xml new file mode 100644 index 0000000..1254450 --- /dev/null +++ b/NEPSPIN88/src/main/res/xml/app_updater_paths.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/NEPSPIN88/src/main/res/xml/network_security_config.xml b/NEPSPIN88/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..dca93c0 --- /dev/null +++ b/NEPSPIN88/src/main/res/xml/network_security_config.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/NEPSPIN88/src/main/res/xml/provider_paths.xml b/NEPSPIN88/src/main/res/xml/provider_paths.xml new file mode 100644 index 0000000..c9a897a --- /dev/null +++ b/NEPSPIN88/src/main/res/xml/provider_paths.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/NEPSPIN88/telur33.jks b/NEPSPIN88/telur33.jks new file mode 100644 index 0000000..f00434d Binary files /dev/null and b/NEPSPIN88/telur33.jks differ diff --git a/b88/.gitignore b/b88/.gitignore new file mode 100644 index 0000000..956c004 --- /dev/null +++ b/b88/.gitignore @@ -0,0 +1,2 @@ +/build +/release \ No newline at end of file diff --git a/b88/build.gradle b/b88/build.gradle new file mode 100644 index 0000000..0e4e732 --- /dev/null +++ b/b88/build.gradle @@ -0,0 +1,99 @@ + plugins { + id 'com.android.application' + id 'com.google.gms.google-services' +} + +def appOutPutName = "goodpokies" + +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.auplayx" + //app大背景色 + resValue('color', 'windows_color', '#F5EEFF') + //底部导航栏颜色 大背景颜色为 windows_color——style_color的上下渐变色 + resValue('color', 'style_color', '#451665') + //app 名字 + resValue('string', 'app_name', 'GOODPOKIES') + //预埋订阅网址 + buildConfigField "String", "BASE_URL", "\"https://auplayx.com/\"" + //后台唯一ID + buildConfigField "int", "USERID", "260" + //状态栏文字颜色是否为白色 + buildConfigField "boolean", "IS_WHITE", "true" + //是否强转启动图为圆形 + buildConfigField "boolean", "IS_ROUND", "true" + //IS_ROUND 为 true时 圆角启动logo的 圆角大小 为0 表示为圆形 否则为ROUND_RADIUS的 dp2px的 数字大小 + buildConfigField "int", "ROUND_RADIUS", "10" + //已废弃 + buildConfigField "boolean", "HAS_CONTACT", "false" + //已废弃 + buildConfigField "boolean", "HAS_HOOK", "false" + + } + buildFeatures { + buildConfig = true + resValues = true + } + + signingConfigs { + debug { + storeFile file('justlet.jks') + storePassword "123456" + keyAlias 'key0' + keyPassword "123456" + } + release { + storeFile file('justlet.jks') + storePassword "123456" + keyAlias 'key0' + keyPassword "123456" + } + } + + 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/b88/google-services.json b/b88/google-services.json new file mode 100644 index 0000000..37ef589 --- /dev/null +++ b/b88/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "29600900932", + "project_id": "auplayx-edc11", + "storage_bucket": "auplayx-edc11.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:29600900932:android:b2f388e2fde9d9dc6c1911", + "android_client_info": { + "package_name": "com.xyz.auplayx" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyDQwlzjVJiL6ONfgsRT7QOFF39qAW6Xnhk" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/b88/justlet.jks b/b88/justlet.jks new file mode 100644 index 0000000..a33b839 Binary files /dev/null and b/b88/justlet.jks differ diff --git a/b88/proguard-rules.pro b/b88/proguard-rules.pro new file mode 100644 index 0000000..107b7ee --- /dev/null +++ b/b88/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/b88/src/main/AndroidManifest.xml b/b88/src/main/AndroidManifest.xml new file mode 100644 index 0000000..f129a21 --- /dev/null +++ b/b88/src/main/AndroidManifest.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/b88/src/main/java/com/webclip/base/IndexActivity.java b/b88/src/main/java/com/webclip/base/IndexActivity.java new file mode 100644 index 0000000..88c542b --- /dev/null +++ b/b88/src/main/java/com/webclip/base/IndexActivity.java @@ -0,0 +1,81 @@ +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 没特殊要求 不要动 +// activityMain2Binding.showTopV.setImageResource(R.mipmap.ic_launcher); + + } + + /** + * 基础配置都在这里 + * 不要动 + */ + 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/b88/src/main/java/com/webclip/base/MyFirebaseMessageingService.java b/b88/src/main/java/com/webclip/base/MyFirebaseMessageingService.java new file mode 100644 index 0000000..36f2d65 --- /dev/null +++ b/b88/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/b88/src/main/java/com/webclip/base/WebApplication.java b/b88/src/main/java/com/webclip/base/WebApplication.java new file mode 100644 index 0000000..36e2512 --- /dev/null +++ b/b88/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/b88/src/main/res/drawable/big_bg.xml b/b88/src/main/res/drawable/big_bg.xml new file mode 100644 index 0000000..b058f1e --- /dev/null +++ b/b88/src/main/res/drawable/big_bg.xml @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/b88/src/main/res/mipmap-xxhdpi/app_logo.jpg b/b88/src/main/res/mipmap-xxhdpi/app_logo.jpg new file mode 100644 index 0000000..9808cbf Binary files /dev/null and b/b88/src/main/res/mipmap-xxhdpi/app_logo.jpg differ diff --git a/b88/src/main/res/values/ic_launcher_background.xml b/b88/src/main/res/values/ic_launcher_background.xml new file mode 100644 index 0000000..c5d5899 --- /dev/null +++ b/b88/src/main/res/values/ic_launcher_background.xml @@ -0,0 +1,4 @@ + + + #FFFFFF + \ No newline at end of file diff --git a/b88/src/main/res/values/themes.xml b/b88/src/main/res/values/themes.xml new file mode 100644 index 0000000..f1ef249 --- /dev/null +++ b/b88/src/main/res/values/themes.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/b88/src/main/res/xml/app_updater_paths.xml b/b88/src/main/res/xml/app_updater_paths.xml new file mode 100644 index 0000000..1254450 --- /dev/null +++ b/b88/src/main/res/xml/app_updater_paths.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/b88/src/main/res/xml/network_security_config.xml b/b88/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..dca93c0 --- /dev/null +++ b/b88/src/main/res/xml/network_security_config.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/b88/src/main/res/xml/provider_paths.xml b/b88/src/main/res/xml/provider_paths.xml new file mode 100644 index 0000000..c9a897a --- /dev/null +++ b/b88/src/main/res/xml/provider_paths.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/jpot9/.gitignore b/jpot9/.gitignore new file mode 100644 index 0000000..956c004 --- /dev/null +++ b/jpot9/.gitignore @@ -0,0 +1,2 @@ +/build +/release \ No newline at end of file diff --git a/jpot9/build.gradle b/jpot9/build.gradle new file mode 100644 index 0000000..ebb3d2b --- /dev/null +++ b/jpot9/build.gradle @@ -0,0 +1,93 @@ +plugins { + id 'com.android.application' + id 'com.google.gms.google-services' +} + +def appOutPutName = "xofun88" + +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.xizhcozzc.xoxau" + + //app大背景色 + resValue('color', 'windows_color', '#1A1A1A') + //底部导航栏颜色 大背景颜色为 windows_color——style_color的上下渐变色 + resValue('color', 'style_color', '#1A1A1A') + //app 名字 + resValue('string', 'app_name', 'XOFUN88') + + + buildConfigField "String", "BASE_URL", "\"https://live22x.com/\"" + buildConfigField "int", "USERID", "274" + buildConfigField "boolean", "IS_WHITE", "false" + buildConfigField "boolean", "IS_ROUND", "true" + buildConfigField "int", "ROUND_RADIUS", "10" + buildConfigField "boolean", "HAS_CONTACT", "false" + 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/jpot9/google-services.json b/jpot9/google-services.json new file mode 100644 index 0000000..921af0d --- /dev/null +++ b/jpot9/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "531093842148", + "project_id": "xoxau-73987", + "storage_bucket": "xoxau-73987.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:531093842148:android:900f21468e3a0b3cd0a4f1", + "android_client_info": { + "package_name": "com.xizhcozzc.xoxau" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyC-hKTovaVgvbDbnwcHt-IOvXU2goYVjrk" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/jpot9/justlet.jks b/jpot9/justlet.jks new file mode 100644 index 0000000..a33b839 Binary files /dev/null and b/jpot9/justlet.jks differ diff --git a/jpot9/proguard-rules.pro b/jpot9/proguard-rules.pro new file mode 100644 index 0000000..107b7ee --- /dev/null +++ b/jpot9/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/jpot9/src/main/AndroidManifest.xml b/jpot9/src/main/AndroidManifest.xml new file mode 100644 index 0000000..7cbc0e0 --- /dev/null +++ b/jpot9/src/main/AndroidManifest.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/jpot9/src/main/java/com/webclip/base/IndexActivity.java b/jpot9/src/main/java/com/webclip/base/IndexActivity.java new file mode 100644 index 0000000..c8e4780 --- /dev/null +++ b/jpot9/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/jpot9/src/main/java/com/webclip/base/MyFirebaseMessageingService.java b/jpot9/src/main/java/com/webclip/base/MyFirebaseMessageingService.java new file mode 100644 index 0000000..36f2d65 --- /dev/null +++ b/jpot9/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/jpot9/src/main/java/com/webclip/base/WebApplication.java b/jpot9/src/main/java/com/webclip/base/WebApplication.java new file mode 100644 index 0000000..36e2512 --- /dev/null +++ b/jpot9/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/jpot9/src/main/res/drawable/big_bg.xml b/jpot9/src/main/res/drawable/big_bg.xml new file mode 100644 index 0000000..aa44959 --- /dev/null +++ b/jpot9/src/main/res/drawable/big_bg.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/jpot9/src/main/res/mipmap-xxhdpi/app_logo.png b/jpot9/src/main/res/mipmap-xxhdpi/app_logo.png new file mode 100644 index 0000000..467e761 Binary files /dev/null and b/jpot9/src/main/res/mipmap-xxhdpi/app_logo.png differ diff --git a/jpot9/src/main/res/values/themes.xml b/jpot9/src/main/res/values/themes.xml new file mode 100644 index 0000000..f1ef249 --- /dev/null +++ b/jpot9/src/main/res/values/themes.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/jpot9/src/main/res/xml/app_updater_paths.xml b/jpot9/src/main/res/xml/app_updater_paths.xml new file mode 100644 index 0000000..1254450 --- /dev/null +++ b/jpot9/src/main/res/xml/app_updater_paths.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/jpot9/src/main/res/xml/network_security_config.xml b/jpot9/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..dca93c0 --- /dev/null +++ b/jpot9/src/main/res/xml/network_security_config.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/jpot9/src/main/res/xml/provider_paths.xml b/jpot9/src/main/res/xml/provider_paths.xml new file mode 100644 index 0000000..c9a897a --- /dev/null +++ b/jpot9/src/main/res/xml/provider_paths.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/jpot9/telur33.jks b/jpot9/telur33.jks new file mode 100644 index 0000000..f00434d Binary files /dev/null and b/jpot9/telur33.jks differ diff --git a/mbs9/.gitignore b/mbs9/.gitignore new file mode 100644 index 0000000..956c004 --- /dev/null +++ b/mbs9/.gitignore @@ -0,0 +1,2 @@ +/build +/release \ No newline at end of file diff --git a/mbs9/build.gradle b/mbs9/build.gradle new file mode 100644 index 0000000..e587493 --- /dev/null +++ b/mbs9/build.gradle @@ -0,0 +1,93 @@ +plugins { + id 'com.android.application' + id 'com.google.gms.google-services' +} + +def appOutPutName = "1xsands" + +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.sdhuaidgai.xsands" + + //app大背景色 + resValue('color', 'windows_color', '#1A1A1A') + //底部导航栏颜色 大背景颜色为 windows_color——style_color的上下渐变色 + resValue('color', 'style_color', '#1A1A1A') + //app 名字 + resValue('string', 'app_name', '1xsands') + + + buildConfigField "String", "BASE_URL", "\"https://live22x.com/\"" + buildConfigField "int", "USERID", "268" + buildConfigField "boolean", "IS_WHITE", "false" + buildConfigField "boolean", "IS_ROUND", "true" + buildConfigField "int", "ROUND_RADIUS", "10" + buildConfigField "boolean", "HAS_CONTACT", "false" + 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/mbs9/google-services.json b/mbs9/google-services.json new file mode 100644 index 0000000..25005f7 --- /dev/null +++ b/mbs9/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "748966597250", + "project_id": "mbs9-fb51b", + "storage_bucket": "mbs9-fb51b.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:748966597250:android:074228b0d00286a6a7da9b", + "android_client_info": { + "package_name": "com.sjdao.mbs9" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyCDhSPjCGfesGdnwBloww7FpEJ130nm1UU" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/mbs9/justlet.jks b/mbs9/justlet.jks new file mode 100644 index 0000000..a33b839 Binary files /dev/null and b/mbs9/justlet.jks differ diff --git a/mbs9/proguard-rules.pro b/mbs9/proguard-rules.pro new file mode 100644 index 0000000..107b7ee --- /dev/null +++ b/mbs9/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/mbs9/src/main/AndroidManifest.xml b/mbs9/src/main/AndroidManifest.xml new file mode 100644 index 0000000..7cbc0e0 --- /dev/null +++ b/mbs9/src/main/AndroidManifest.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mbs9/src/main/java/com/webclip/base/IndexActivity.java b/mbs9/src/main/java/com/webclip/base/IndexActivity.java new file mode 100644 index 0000000..c8e4780 --- /dev/null +++ b/mbs9/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/mbs9/src/main/java/com/webclip/base/MyFirebaseMessageingService.java b/mbs9/src/main/java/com/webclip/base/MyFirebaseMessageingService.java new file mode 100644 index 0000000..36f2d65 --- /dev/null +++ b/mbs9/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/mbs9/src/main/java/com/webclip/base/WebApplication.java b/mbs9/src/main/java/com/webclip/base/WebApplication.java new file mode 100644 index 0000000..36e2512 --- /dev/null +++ b/mbs9/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/mbs9/src/main/res/drawable/big_bg.xml b/mbs9/src/main/res/drawable/big_bg.xml new file mode 100644 index 0000000..aa44959 --- /dev/null +++ b/mbs9/src/main/res/drawable/big_bg.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/mbs9/src/main/res/mipmap-xxhdpi/app_logo.jpg b/mbs9/src/main/res/mipmap-xxhdpi/app_logo.jpg new file mode 100644 index 0000000..f2c2ff3 Binary files /dev/null and b/mbs9/src/main/res/mipmap-xxhdpi/app_logo.jpg differ diff --git a/mbs9/src/main/res/values/themes.xml b/mbs9/src/main/res/values/themes.xml new file mode 100644 index 0000000..f1ef249 --- /dev/null +++ b/mbs9/src/main/res/values/themes.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mbs9/src/main/res/xml/app_updater_paths.xml b/mbs9/src/main/res/xml/app_updater_paths.xml new file mode 100644 index 0000000..1254450 --- /dev/null +++ b/mbs9/src/main/res/xml/app_updater_paths.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/mbs9/src/main/res/xml/network_security_config.xml b/mbs9/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..dca93c0 --- /dev/null +++ b/mbs9/src/main/res/xml/network_security_config.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/mbs9/src/main/res/xml/provider_paths.xml b/mbs9/src/main/res/xml/provider_paths.xml new file mode 100644 index 0000000..c9a897a --- /dev/null +++ b/mbs9/src/main/res/xml/provider_paths.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/mbs9/telur33.jks b/mbs9/telur33.jks new file mode 100644 index 0000000..f00434d Binary files /dev/null and b/mbs9/telur33.jks differ diff --git a/millionking96/.gitignore b/millionking96/.gitignore new file mode 100644 index 0000000..956c004 --- /dev/null +++ b/millionking96/.gitignore @@ -0,0 +1,2 @@ +/build +/release \ No newline at end of file diff --git a/millionking96/build.gradle b/millionking96/build.gradle new file mode 100644 index 0000000..6924125 --- /dev/null +++ b/millionking96/build.gradle @@ -0,0 +1,93 @@ +plugins { + id 'com.android.application' + id 'com.google.gms.google-services' +} + +def appOutPutName = "1XACEAU" + +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.ahdas.xaceau" + + //app大背景色 + resValue('color', 'windows_color', '#1A1A1A') + //底部导航栏颜色 大背景颜色为 windows_color——style_color的上下渐变色 + resValue('color', 'style_color', '#08192A') + //app 名字 + resValue('string', 'app_name', '1XACEAU') + + + buildConfigField "String", "BASE_URL", "\"https://live22x.com/\"" + buildConfigField "int", "USERID", "300" + 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/millionking96/google-services.json b/millionking96/google-services.json new file mode 100644 index 0000000..86b7a0d --- /dev/null +++ b/millionking96/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "932292522704", + "project_id": "xaceau-53664", + "storage_bucket": "xaceau-53664.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:932292522704:android:521063bf4d7362e454a4d5", + "android_client_info": { + "package_name": "com.ahdas.xaceau" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyAEPUZSDu21oB5WSSrqHLT0xE-rwHYoCtU" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/millionking96/justlet.jks b/millionking96/justlet.jks new file mode 100644 index 0000000..a33b839 Binary files /dev/null and b/millionking96/justlet.jks differ diff --git a/millionking96/proguard-rules.pro b/millionking96/proguard-rules.pro new file mode 100644 index 0000000..107b7ee --- /dev/null +++ b/millionking96/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/millionking96/src/main/AndroidManifest.xml b/millionking96/src/main/AndroidManifest.xml new file mode 100644 index 0000000..7cbc0e0 --- /dev/null +++ b/millionking96/src/main/AndroidManifest.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/millionking96/src/main/java/com/webclip/base/IndexActivity.java b/millionking96/src/main/java/com/webclip/base/IndexActivity.java new file mode 100644 index 0000000..c8e4780 --- /dev/null +++ b/millionking96/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/millionking96/src/main/java/com/webclip/base/MyFirebaseMessageingService.java b/millionking96/src/main/java/com/webclip/base/MyFirebaseMessageingService.java new file mode 100644 index 0000000..36f2d65 --- /dev/null +++ b/millionking96/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/millionking96/src/main/java/com/webclip/base/WebApplication.java b/millionking96/src/main/java/com/webclip/base/WebApplication.java new file mode 100644 index 0000000..36e2512 --- /dev/null +++ b/millionking96/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/millionking96/src/main/res/drawable/big_bg.xml b/millionking96/src/main/res/drawable/big_bg.xml new file mode 100644 index 0000000..aa44959 --- /dev/null +++ b/millionking96/src/main/res/drawable/big_bg.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/millionking96/src/main/res/mipmap-xxhdpi/app_logo.png b/millionking96/src/main/res/mipmap-xxhdpi/app_logo.png new file mode 100644 index 0000000..0232ebf Binary files /dev/null and b/millionking96/src/main/res/mipmap-xxhdpi/app_logo.png differ diff --git a/millionking96/src/main/res/values/themes.xml b/millionking96/src/main/res/values/themes.xml new file mode 100644 index 0000000..f1ef249 --- /dev/null +++ b/millionking96/src/main/res/values/themes.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/millionking96/src/main/res/xml/app_updater_paths.xml b/millionking96/src/main/res/xml/app_updater_paths.xml new file mode 100644 index 0000000..1254450 --- /dev/null +++ b/millionking96/src/main/res/xml/app_updater_paths.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/millionking96/src/main/res/xml/network_security_config.xml b/millionking96/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..dca93c0 --- /dev/null +++ b/millionking96/src/main/res/xml/network_security_config.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/millionking96/src/main/res/xml/provider_paths.xml b/millionking96/src/main/res/xml/provider_paths.xml new file mode 100644 index 0000000..c9a897a --- /dev/null +++ b/millionking96/src/main/res/xml/provider_paths.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/millionking96/telur33.jks b/millionking96/telur33.jks new file mode 100644 index 0000000..f00434d Binary files /dev/null and b/millionking96/telur33.jks differ diff --git a/pasti77/.gitignore b/pasti77/.gitignore new file mode 100644 index 0000000..956c004 --- /dev/null +++ b/pasti77/.gitignore @@ -0,0 +1,2 @@ +/build +/release \ No newline at end of file diff --git a/pasti77/build.gradle b/pasti77/build.gradle new file mode 100644 index 0000000..6924125 --- /dev/null +++ b/pasti77/build.gradle @@ -0,0 +1,93 @@ +plugins { + id 'com.android.application' + id 'com.google.gms.google-services' +} + +def appOutPutName = "1XACEAU" + +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.ahdas.xaceau" + + //app大背景色 + resValue('color', 'windows_color', '#1A1A1A') + //底部导航栏颜色 大背景颜色为 windows_color——style_color的上下渐变色 + resValue('color', 'style_color', '#08192A') + //app 名字 + resValue('string', 'app_name', '1XACEAU') + + + buildConfigField "String", "BASE_URL", "\"https://live22x.com/\"" + buildConfigField "int", "USERID", "300" + 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/pasti77/google-services.json b/pasti77/google-services.json new file mode 100644 index 0000000..86b7a0d --- /dev/null +++ b/pasti77/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "932292522704", + "project_id": "xaceau-53664", + "storage_bucket": "xaceau-53664.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:932292522704:android:521063bf4d7362e454a4d5", + "android_client_info": { + "package_name": "com.ahdas.xaceau" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyAEPUZSDu21oB5WSSrqHLT0xE-rwHYoCtU" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/pasti77/justlet.jks b/pasti77/justlet.jks new file mode 100644 index 0000000..a33b839 Binary files /dev/null and b/pasti77/justlet.jks differ diff --git a/pasti77/proguard-rules.pro b/pasti77/proguard-rules.pro new file mode 100644 index 0000000..107b7ee --- /dev/null +++ b/pasti77/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/pasti77/src/main/AndroidManifest.xml b/pasti77/src/main/AndroidManifest.xml new file mode 100644 index 0000000..7cbc0e0 --- /dev/null +++ b/pasti77/src/main/AndroidManifest.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pasti77/src/main/java/com/webclip/base/IndexActivity.java b/pasti77/src/main/java/com/webclip/base/IndexActivity.java new file mode 100644 index 0000000..c8e4780 --- /dev/null +++ b/pasti77/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/pasti77/src/main/java/com/webclip/base/MyFirebaseMessageingService.java b/pasti77/src/main/java/com/webclip/base/MyFirebaseMessageingService.java new file mode 100644 index 0000000..36f2d65 --- /dev/null +++ b/pasti77/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/pasti77/src/main/java/com/webclip/base/WebApplication.java b/pasti77/src/main/java/com/webclip/base/WebApplication.java new file mode 100644 index 0000000..36e2512 --- /dev/null +++ b/pasti77/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/pasti77/src/main/res/drawable/big_bg.xml b/pasti77/src/main/res/drawable/big_bg.xml new file mode 100644 index 0000000..aa44959 --- /dev/null +++ b/pasti77/src/main/res/drawable/big_bg.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/pasti77/src/main/res/mipmap-xxhdpi/app_logo.jpg b/pasti77/src/main/res/mipmap-xxhdpi/app_logo.jpg new file mode 100644 index 0000000..9980395 Binary files /dev/null and b/pasti77/src/main/res/mipmap-xxhdpi/app_logo.jpg differ diff --git a/pasti77/src/main/res/values/themes.xml b/pasti77/src/main/res/values/themes.xml new file mode 100644 index 0000000..f1ef249 --- /dev/null +++ b/pasti77/src/main/res/values/themes.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pasti77/src/main/res/xml/app_updater_paths.xml b/pasti77/src/main/res/xml/app_updater_paths.xml new file mode 100644 index 0000000..1254450 --- /dev/null +++ b/pasti77/src/main/res/xml/app_updater_paths.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/pasti77/src/main/res/xml/network_security_config.xml b/pasti77/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..dca93c0 --- /dev/null +++ b/pasti77/src/main/res/xml/network_security_config.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/pasti77/src/main/res/xml/provider_paths.xml b/pasti77/src/main/res/xml/provider_paths.xml new file mode 100644 index 0000000..c9a897a --- /dev/null +++ b/pasti77/src/main/res/xml/provider_paths.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/pasti77/telur33.jks b/pasti77/telur33.jks new file mode 100644 index 0000000..f00434d Binary files /dev/null and b/pasti77/telur33.jks differ diff --git a/play33/.gitignore b/play33/.gitignore new file mode 100644 index 0000000..956c004 --- /dev/null +++ b/play33/.gitignore @@ -0,0 +1,2 @@ +/build +/release \ No newline at end of file diff --git a/play33/build.gradle b/play33/build.gradle new file mode 100644 index 0000000..6924125 --- /dev/null +++ b/play33/build.gradle @@ -0,0 +1,93 @@ +plugins { + id 'com.android.application' + id 'com.google.gms.google-services' +} + +def appOutPutName = "1XACEAU" + +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.ahdas.xaceau" + + //app大背景色 + resValue('color', 'windows_color', '#1A1A1A') + //底部导航栏颜色 大背景颜色为 windows_color——style_color的上下渐变色 + resValue('color', 'style_color', '#08192A') + //app 名字 + resValue('string', 'app_name', '1XACEAU') + + + buildConfigField "String", "BASE_URL", "\"https://live22x.com/\"" + buildConfigField "int", "USERID", "300" + 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/play33/google-services.json b/play33/google-services.json new file mode 100644 index 0000000..86b7a0d --- /dev/null +++ b/play33/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "932292522704", + "project_id": "xaceau-53664", + "storage_bucket": "xaceau-53664.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:932292522704:android:521063bf4d7362e454a4d5", + "android_client_info": { + "package_name": "com.ahdas.xaceau" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyAEPUZSDu21oB5WSSrqHLT0xE-rwHYoCtU" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/play33/justlet.jks b/play33/justlet.jks new file mode 100644 index 0000000..a33b839 Binary files /dev/null and b/play33/justlet.jks differ diff --git a/play33/proguard-rules.pro b/play33/proguard-rules.pro new file mode 100644 index 0000000..107b7ee --- /dev/null +++ b/play33/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/play33/src/main/AndroidManifest.xml b/play33/src/main/AndroidManifest.xml new file mode 100644 index 0000000..7cbc0e0 --- /dev/null +++ b/play33/src/main/AndroidManifest.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/play33/src/main/java/com/webclip/base/IndexActivity.java b/play33/src/main/java/com/webclip/base/IndexActivity.java new file mode 100644 index 0000000..c8e4780 --- /dev/null +++ b/play33/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/play33/src/main/java/com/webclip/base/MyFirebaseMessageingService.java b/play33/src/main/java/com/webclip/base/MyFirebaseMessageingService.java new file mode 100644 index 0000000..36f2d65 --- /dev/null +++ b/play33/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/play33/src/main/java/com/webclip/base/WebApplication.java b/play33/src/main/java/com/webclip/base/WebApplication.java new file mode 100644 index 0000000..36e2512 --- /dev/null +++ b/play33/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/play33/src/main/res/drawable/big_bg.xml b/play33/src/main/res/drawable/big_bg.xml new file mode 100644 index 0000000..aa44959 --- /dev/null +++ b/play33/src/main/res/drawable/big_bg.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/play33/src/main/res/mipmap-xxhdpi/app_logo.png b/play33/src/main/res/mipmap-xxhdpi/app_logo.png new file mode 100644 index 0000000..0232ebf Binary files /dev/null and b/play33/src/main/res/mipmap-xxhdpi/app_logo.png differ diff --git a/play33/src/main/res/values/themes.xml b/play33/src/main/res/values/themes.xml new file mode 100644 index 0000000..f1ef249 --- /dev/null +++ b/play33/src/main/res/values/themes.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/play33/src/main/res/xml/app_updater_paths.xml b/play33/src/main/res/xml/app_updater_paths.xml new file mode 100644 index 0000000..1254450 --- /dev/null +++ b/play33/src/main/res/xml/app_updater_paths.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/play33/src/main/res/xml/network_security_config.xml b/play33/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..dca93c0 --- /dev/null +++ b/play33/src/main/res/xml/network_security_config.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/play33/src/main/res/xml/provider_paths.xml b/play33/src/main/res/xml/provider_paths.xml new file mode 100644 index 0000000..c9a897a --- /dev/null +++ b/play33/src/main/res/xml/provider_paths.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/play33/telur33.jks b/play33/telur33.jks new file mode 100644 index 0000000..f00434d Binary files /dev/null and b/play33/telur33.jks differ diff --git a/we88sg26/.gitignore b/we88sg26/.gitignore new file mode 100644 index 0000000..956c004 --- /dev/null +++ b/we88sg26/.gitignore @@ -0,0 +1,2 @@ +/build +/release \ No newline at end of file diff --git a/we88sg26/build.gradle b/we88sg26/build.gradle new file mode 100644 index 0000000..e1569b1 --- /dev/null +++ b/we88sg26/build.gradle @@ -0,0 +1,93 @@ +plugins { + id 'com.android.application' + id 'com.google.gms.google-services' +} + +def appOutPutName = "Joker9au" + +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.sdadh.Joker9au" + + //app大背景色 + resValue('color', 'windows_color', '#030511') + //底部导航栏颜色 大背景颜色为 windows_color——style_color的上下渐变色 + resValue('color', 'style_color', '#030511') + //app 名字 + resValue('string', 'app_name', 'Joker9au') + + + buildConfigField "String", "BASE_URL", "\"https://live22x.com/\"" + buildConfigField "int", "USERID", "297" + 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/we88sg26/google-services.json b/we88sg26/google-services.json new file mode 100644 index 0000000..a6c7b7e --- /dev/null +++ b/we88sg26/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "282387029037", + "project_id": "joker9au", + "storage_bucket": "joker9au.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:282387029037:android:88ecedbdf5f19ff14faca4", + "android_client_info": { + "package_name": "com.sdadh.Joker9au" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyCXLeN1cUPWlJEoRd3JeWxKQH1isGPrsbY" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/we88sg26/justlet.jks b/we88sg26/justlet.jks new file mode 100644 index 0000000..a33b839 Binary files /dev/null and b/we88sg26/justlet.jks differ diff --git a/we88sg26/proguard-rules.pro b/we88sg26/proguard-rules.pro new file mode 100644 index 0000000..107b7ee --- /dev/null +++ b/we88sg26/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/we88sg26/src/main/AndroidManifest.xml b/we88sg26/src/main/AndroidManifest.xml new file mode 100644 index 0000000..7cbc0e0 --- /dev/null +++ b/we88sg26/src/main/AndroidManifest.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/we88sg26/src/main/java/com/webclip/base/IndexActivity.java b/we88sg26/src/main/java/com/webclip/base/IndexActivity.java new file mode 100644 index 0000000..c8e4780 --- /dev/null +++ b/we88sg26/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/we88sg26/src/main/java/com/webclip/base/MyFirebaseMessageingService.java b/we88sg26/src/main/java/com/webclip/base/MyFirebaseMessageingService.java new file mode 100644 index 0000000..36f2d65 --- /dev/null +++ b/we88sg26/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/we88sg26/src/main/java/com/webclip/base/WebApplication.java b/we88sg26/src/main/java/com/webclip/base/WebApplication.java new file mode 100644 index 0000000..36e2512 --- /dev/null +++ b/we88sg26/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/we88sg26/src/main/res/drawable/big_bg.xml b/we88sg26/src/main/res/drawable/big_bg.xml new file mode 100644 index 0000000..aa44959 --- /dev/null +++ b/we88sg26/src/main/res/drawable/big_bg.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/we88sg26/src/main/res/mipmap-xxhdpi/app_logo.png b/we88sg26/src/main/res/mipmap-xxhdpi/app_logo.png new file mode 100644 index 0000000..2590381 Binary files /dev/null and b/we88sg26/src/main/res/mipmap-xxhdpi/app_logo.png differ diff --git a/we88sg26/src/main/res/values/themes.xml b/we88sg26/src/main/res/values/themes.xml new file mode 100644 index 0000000..f1ef249 --- /dev/null +++ b/we88sg26/src/main/res/values/themes.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/we88sg26/src/main/res/xml/app_updater_paths.xml b/we88sg26/src/main/res/xml/app_updater_paths.xml new file mode 100644 index 0000000..1254450 --- /dev/null +++ b/we88sg26/src/main/res/xml/app_updater_paths.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/we88sg26/src/main/res/xml/network_security_config.xml b/we88sg26/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..dca93c0 --- /dev/null +++ b/we88sg26/src/main/res/xml/network_security_config.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/we88sg26/src/main/res/xml/provider_paths.xml b/we88sg26/src/main/res/xml/provider_paths.xml new file mode 100644 index 0000000..c9a897a --- /dev/null +++ b/we88sg26/src/main/res/xml/provider_paths.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/we88sg26/telur33.jks b/we88sg26/telur33.jks new file mode 100644 index 0000000..f00434d Binary files /dev/null and b/we88sg26/telur33.jks differ