diff --git a/1xhuat/google-services.json b/1xhuat/google-services.json new file mode 100644 index 0000000..a91e88d --- /dev/null +++ b/1xhuat/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "722866808349", + "project_id": "xhuat-7da8d", + "storage_bucket": "xhuat-7da8d.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:722866808349:android:d96ba99e4c161682d848f4", + "android_client_info": { + "package_name": "com.xyz.xhuat" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyBR0nae-jXRJuX1e8a-53fWuZYQZKC1jlI" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/1xhuat/src/main/res/mipmap-xxhdpi/app_logo.png b/1xhuat/src/main/res/mipmap-xxhdpi/app_logo.png new file mode 100644 index 0000000..9db195f Binary files /dev/null and b/1xhuat/src/main/res/mipmap-xxhdpi/app_logo.png differ diff --git a/2ugo/src/main/java/com/xyz/ugo2/MainActivity.java b/2ugo/src/main/java/com/xyz/ugo2/MainActivity.java index c91e9e6..6225af9 100644 --- a/2ugo/src/main/java/com/xyz/ugo2/MainActivity.java +++ b/2ugo/src/main/java/com/xyz/ugo2/MainActivity.java @@ -49,7 +49,7 @@ public class MainActivity extends MainActivity2 { } /** - * 基础配置都在这里 + * 基础配置都在这里 cucislot365 freecredit66 * 不要动 都在 app_config.xml中修改 */ private void initConfig() { diff --git a/atm/.gitignore b/atm/.gitignore new file mode 100644 index 0000000..956c004 --- /dev/null +++ b/atm/.gitignore @@ -0,0 +1,2 @@ +/build +/release \ No newline at end of file diff --git a/atm/build.gradle b/atm/build.gradle new file mode 100644 index 0000000..5a890ea --- /dev/null +++ b/atm/build.gradle @@ -0,0 +1,80 @@ +plugins { + id 'com.android.application' + id 'com.google.gms.google-services' +} + +android { + compileSdkVersion 31 + buildToolsVersion "30.0.3" + defaultConfig { + applicationId "com.xyz.atmpad" + minSdkVersion 24 + targetSdkVersion 31 + versionCode rootProject.ext.versionCode + versionName rootProject.ext.versionName + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + 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 JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + applicationVariants.all { variant -> + variant.outputs.all { +// def appName = "meemee99" + def appName = "atmiufgdshgdfshgdfkjdghjksdf" + + def outputDir = new File(rootProject.ext.outputPath) + // 创建输出目录 + outputDir.mkdirs() + def outputFileName = "${appName}.apk" + // 设置输出文件名 + setOutputFileName(outputFileName) + // 计算新的输出文件 + def newOutputFile = new File(outputDir, outputFileName) + // 如果新的输出目录不存在,则创建它 + newOutputFile.parentFile.mkdirs() + // 在构建完成后将 APK 复制到新位置 + variant.assemble.doLast { + try { + java.nio.file.Files.copy( + outputFile.toPath(), + newOutputFile.toPath(), + java.nio.file.StandardCopyOption.REPLACE_EXISTING + ) + println "Success to copy APK !!!" + } catch (java.io.IOException e) { + println "Failed to copy APK: ${e.message}" + } + } + } + } + +} + +dependencies { + implementation project(path: ':base_theme') +} \ No newline at end of file diff --git a/atm/google-services.json b/atm/google-services.json new file mode 100644 index 0000000..383452f --- /dev/null +++ b/atm/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "862034870100", + "project_id": "atmpad-86d01", + "storage_bucket": "atmpad-86d01.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:862034870100:android:b562f3fb2f93db1dc1d2c1", + "android_client_info": { + "package_name": "com.xyz.atmpad" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyBvrIlyL6N8n3PcTQMc0pmQoGT4SsX0hPs" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/atm/justlet.jks b/atm/justlet.jks new file mode 100644 index 0000000..a33b839 Binary files /dev/null and b/atm/justlet.jks differ diff --git a/atm/proguard-rules.pro b/atm/proguard-rules.pro new file mode 100644 index 0000000..107b7ee --- /dev/null +++ b/atm/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/atm/src/androidTest/java/Tptogiar/calculcator/ExampleInstrumentedTest.java b/atm/src/androidTest/java/Tptogiar/calculcator/ExampleInstrumentedTest.java new file mode 100644 index 0000000..44b9f39 --- /dev/null +++ b/atm/src/androidTest/java/Tptogiar/calculcator/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package Tptogiar.calculcator; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("Tptogiar.calculcator", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/atm/src/main/AndroidManifest.xml b/atm/src/main/AndroidManifest.xml new file mode 100644 index 0000000..2f6be4f --- /dev/null +++ b/atm/src/main/AndroidManifest.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/atm/src/main/ic_launcher-playstore.png b/atm/src/main/ic_launcher-playstore.png new file mode 100644 index 0000000..6dfc6f7 Binary files /dev/null and b/atm/src/main/ic_launcher-playstore.png differ diff --git a/atm/src/main/java/com/xyz/atmpad/MainActivity.java b/atm/src/main/java/com/xyz/atmpad/MainActivity.java new file mode 100644 index 0000000..1cf8ced --- /dev/null +++ b/atm/src/main/java/com/xyz/atmpad/MainActivity.java @@ -0,0 +1,82 @@ +package com.xyz.atmpad; + +import android.content.pm.PackageInfo; +import android.content.pm.PackageManager; +import android.os.Bundle; +import com.web.base.LogUtils; +import com.web.base.MainActivity2; +import com.google.firebase.messaging.FirebaseMessaging; + +public class MainActivity extends MainActivity2 { + + @Override + protected void onCreate(Bundle savedInstanceState) { + initConfig(); + super.onCreate(savedInstanceState); + initWinwdowLogoConfig(); + registerFCM(); + } + + /** + * 注册FCM + */ + private void registerFCM() { + //订阅主题 + try { + FirebaseMessaging.getInstance().subscribeToTopic("demo") + .addOnCompleteListener(task -> { + String msg = "Subscribed"; + if (!task.isSuccessful()) { + msg = "Subscribe failed"; + } + LogUtils.i("结果:"+msg); + }); + }catch (Exception e){ + e.printStackTrace(); + } + } + + /** + * 用于修改大背景渐变色 不设置 + * 大背景就是 windows_color 的颜色 + * 不要动 都在 app_config.xml中修改 + */ + private void initWinwdowLogoConfig() { + setBackDrawables(R.drawable.big_bg); + setImageView(getString(R.string.is_round).equals("1")); + } + + /** + * 基础配置都在这里 + * 不要动 都在 app_config.xml中修改 + */ + private void initConfig() { + + //===========================以下是APP的配置信息 都写在 app_config.xml中================================== + userId = Integer.parseInt(getString(R.string.userId)); + saveInt(MainActivity.this,"user_code",userId); + saveInt(MainActivity.this,"version_code",getVersion()); + saveString(this, "base_url",getString(R.string.base_url)); + //网页的底部NavigationBar颜色 + saveInt(this, "style_color_int", getColor(R.color.style_color)); + //页面的大背景颜色 + saveInt(this, "windows_color_int", getColor(R.color.windows_color)); + //任务栏的文字颜色 0 黑 1白 默认黑 + saveInt(MainActivity.this,"is_white",Integer.parseInt(getString(R.string.is_white))); + saveInt(MainActivity.this,"hasContact",Integer.parseInt(getString(R.string.has_contact))); + + //===========================以上是APP的配置信息 都写在 app_config.xml中================================== + } + + + public int getVersion(){ + try { + PackageManager packageManager = getPackageManager(); + PackageInfo packageInfo = packageManager.getPackageInfo(getPackageName(), 0); + int versionCode = packageInfo.versionCode; // 版本码 + return versionCode; + } catch (PackageManager.NameNotFoundException e) { + return 0; + } + } +} diff --git a/atm/src/main/java/com/xyz/atmpad/MyFirebaseMessageingService.java b/atm/src/main/java/com/xyz/atmpad/MyFirebaseMessageingService.java new file mode 100644 index 0000000..15d8871 --- /dev/null +++ b/atm/src/main/java/com/xyz/atmpad/MyFirebaseMessageingService.java @@ -0,0 +1,125 @@ +package com.xyz.atmpad; + +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.web.base.GsonUtils; +import com.web.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, MainActivity.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(com.web.base.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(com.web.base.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, MainActivity.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(com.web.base.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(com.web.base.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/atm/src/main/java/com/xyz/atmpad/WebApplication.java b/atm/src/main/java/com/xyz/atmpad/WebApplication.java new file mode 100644 index 0000000..494a1f1 --- /dev/null +++ b/atm/src/main/java/com/xyz/atmpad/WebApplication.java @@ -0,0 +1,16 @@ +package com.xyz.atmpad; + +import android.app.Application; +import android.content.Context; + +public class WebApplication extends Application { + + + public static Context application; + @Override + public void onCreate() { + super.onCreate(); +// 设置开启优化方案 + application = this; + } +} diff --git a/atm/src/main/res/drawable/big_bg.xml b/atm/src/main/res/drawable/big_bg.xml new file mode 100644 index 0000000..2e41ced --- /dev/null +++ b/atm/src/main/res/drawable/big_bg.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/atm/src/main/res/mipmap-xxhdpi/app_logo.png b/atm/src/main/res/mipmap-xxhdpi/app_logo.png new file mode 100644 index 0000000..6672be8 Binary files /dev/null and b/atm/src/main/res/mipmap-xxhdpi/app_logo.png differ diff --git a/atm/src/main/res/values-en/strings.xml b/atm/src/main/res/values-en/strings.xml new file mode 100644 index 0000000..7a00b5e --- /dev/null +++ b/atm/src/main/res/values-en/strings.xml @@ -0,0 +1,52 @@ + + + Please Set Your Password + Cancel + Sure + New Version Update + Next Update + Update Immediately + Click to close notification + Click to re-download + Download failed + Click to install + Download completed + Downloading... + Version update + Downloading game + Getting download data... + Version update + Downloading game + Need to turn on mobile phone notification permission + Exit + Setting + Tip + Please enter the invitation code + My invitation code: + Superior invitation code: + Total number of invites: + App download link: + Share + Check Invitation Records + Invitation Records + Total number of invitees: %d + No Data + Withdrawal Record + Withdrawal Application + Edit Bank Card Information + 60 + Name: + Please enter the bank card name + Bank card account: + Please enter the bank card account + Country: + Please select a country + Bank Name: + Please select a bank name + Note: Please enter the country code before selecting the bank name! + Balance: %s + Total Earnings: %s + Amount: %s + Please enter the withdrawal amount + Withdrawal application has been submitted + \ No newline at end of file diff --git a/atm/src/main/res/values-night/themes.xml b/atm/src/main/res/values-night/themes.xml new file mode 100644 index 0000000..3475a91 --- /dev/null +++ b/atm/src/main/res/values-night/themes.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/atm/src/main/res/values/app_config.xml b/atm/src/main/res/values/app_config.xml new file mode 100644 index 0000000..9bb479e --- /dev/null +++ b/atm/src/main/res/values/app_config.xml @@ -0,0 +1,20 @@ + + + + + ATM + + 244 + + https://game.atmpad.com/ + + 1 + + 0 + + 0 + + #130f0b + + #1a120b + \ No newline at end of file diff --git a/atm/src/main/res/values/colors.xml b/atm/src/main/res/values/colors.xml new file mode 100644 index 0000000..a4e1222 --- /dev/null +++ b/atm/src/main/res/values/colors.xml @@ -0,0 +1,16 @@ + + + #FFFFFF + #FFFFFF + #FFFFFF + #FF03DAC5 + #FF018786 + #FF000000 + #FFFFFFFF + #EF4723 + #1251a1 + #2C2C2E + #FFA722 + #434343 + #BCBCBC + \ No newline at end of file diff --git a/atm/src/main/res/values/strings.xml b/atm/src/main/res/values/strings.xml new file mode 100644 index 0000000..0ffb42d --- /dev/null +++ b/atm/src/main/res/values/strings.xml @@ -0,0 +1,53 @@ + + 请输入6位密码 + 取消 + 确定 + 版本更新 + 下次更新 + 立即更新 + 点击关闭通知 + 点击重新下载 + 下载失败 + 点击安装 + 下载完成 + 正在下载… + 版本更新 + 下载游戏中 + 版本更新 + 下载游戏中 + 正在获取下载数据… + 需要打开手机通知权限 + 退出 + 设置 + 提示 + 请输入邀请码 + 我的邀请码: + 上级邀请码: + 总邀请人数: + 邀请您下载: + 分享 + 查看邀请记录 + 邀请记录 + 总邀请人数: %d + 暂无数据 + 提现记录 + 提现申请 + 编辑银行卡信息 + 86 + 持卡人姓名: + 请输入持卡人姓名 + 国家地区: + 请选择国家地区 + 开户行名称: + 请选择开户行名称 + 银行户口: + 请输入银行卡户口 + (注:请先输入国家区号再选择开户行名称!) + 余额: %s + 总收益: %s + 金额: %s + 请输入提现金额 + 提现申请已提交 + + + \ No newline at end of file diff --git a/atm/src/main/res/values/themes.xml b/atm/src/main/res/values/themes.xml new file mode 100644 index 0000000..8947801 --- /dev/null +++ b/atm/src/main/res/values/themes.xml @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/atm/src/main/res/xml/app_updater_paths.xml b/atm/src/main/res/xml/app_updater_paths.xml new file mode 100644 index 0000000..1254450 --- /dev/null +++ b/atm/src/main/res/xml/app_updater_paths.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/atm/src/main/res/xml/network_security_config.xml b/atm/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..dca93c0 --- /dev/null +++ b/atm/src/main/res/xml/network_security_config.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/atm/src/main/res/xml/provider_paths.xml b/atm/src/main/res/xml/provider_paths.xml new file mode 100644 index 0000000..c9a897a --- /dev/null +++ b/atm/src/main/res/xml/provider_paths.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/atm/src/test/java/Tptogiar/calculcator/ExampleUnitTest.java b/atm/src/test/java/Tptogiar/calculcator/ExampleUnitTest.java new file mode 100644 index 0000000..3259554 --- /dev/null +++ b/atm/src/test/java/Tptogiar/calculcator/ExampleUnitTest.java @@ -0,0 +1,35 @@ +package Tptogiar.calculcator; + +import org.junit.Test; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import static org.junit.Assert.*; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see Testing documentation + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() { + assertEquals(4, 2 + 2); + } + + @Test + public void TestPattern(){ +// + Pattern compile = Pattern.compile( "^(\\-|\\+)?\\d+(\\.\\d+)?$"); + String a="+45.5"; + boolean matches = compile.matcher(a).matches(); + System.out.println(matches); + String result = compile.matcher(a).replaceAll(""); + System.out.println(result); + + + } + + +} \ No newline at end of file diff --git a/base_player/.gitignore b/base_player/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/base_player/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/base_player/build.gradle b/base_player/build.gradle new file mode 100644 index 0000000..8758df3 --- /dev/null +++ b/base_player/build.gradle @@ -0,0 +1,27 @@ +plugins { + id 'com.android.library' +} + +android { + compileSdkVersion 31 + defaultConfig { + minSdkVersion 24 + targetSdkVersion 31 + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} + +dependencies { + + api 'androidx.appcompat:appcompat:1.1.0' + api 'com.google.android.material:material:1.1.0' + api 'androidx.constraintlayout:constraintlayout:1.1.3' + + api("com.github.bumptech.glide:glide:4.13.1") + +} \ No newline at end of file diff --git a/base_player/proguard-rules.pro b/base_player/proguard-rules.pro new file mode 100644 index 0000000..107b7ee --- /dev/null +++ b/base_player/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/base_player/src/androidTest/java/Tptogiar/calculcator/ExampleInstrumentedTest.java b/base_player/src/androidTest/java/Tptogiar/calculcator/ExampleInstrumentedTest.java new file mode 100644 index 0000000..44b9f39 --- /dev/null +++ b/base_player/src/androidTest/java/Tptogiar/calculcator/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package Tptogiar.calculcator; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("Tptogiar.calculcator", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/base_player/src/main/AndroidManifest.xml b/base_player/src/main/AndroidManifest.xml new file mode 100644 index 0000000..c35556e --- /dev/null +++ b/base_player/src/main/AndroidManifest.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/base_player/src/main/java/com/web/base/CircleImageView.java b/base_player/src/main/java/com/web/base/CircleImageView.java new file mode 100644 index 0000000..cf84202 --- /dev/null +++ b/base_player/src/main/java/com/web/base/CircleImageView.java @@ -0,0 +1,321 @@ +package com.web.base; + +import android.annotation.SuppressLint; +import android.content.Context; +import android.content.res.TypedArray; +import android.graphics.Bitmap; +import android.graphics.Canvas; +import android.graphics.Matrix; +import android.graphics.Paint; +import android.graphics.PorterDuff; +import android.graphics.PorterDuffXfermode; +import android.graphics.RectF; +import android.graphics.drawable.BitmapDrawable; +import android.graphics.drawable.Drawable; +import android.util.AttributeSet; +import android.view.MotionEvent; + +import androidx.appcompat.widget.AppCompatImageView; + + +public class CircleImageView extends AppCompatImageView { + // paint when user press + private Paint pressPaint; + private int width; + private int height; + + // default bitmap config + private static final Bitmap.Config BITMAP_CONFIG = Bitmap.Config.ARGB_8888; + private static final int COLORDRAWABLE_DIMENSION = 1; + + // border color + private int borderColor; + // width of border + private int borderWidth; + // alpha when pressed + private int pressAlpha; + // color when pressed + private int pressColor; + // radius + private int radius; + // rectangle or round, 1 is circle, 2 is rectangle + private int shapeType; + + public CircleImageView(Context context) { + super(context); + init(context, null); + } + + public CircleImageView(Context context, AttributeSet attrs) { + super(context, attrs); + init(context, attrs); + } + + public CircleImageView(Context context, AttributeSet attrs, int defStyleAttr) { + super(context, attrs, defStyleAttr); + init(context, attrs); + } + + + private void init(Context context, AttributeSet attrs) { + //init the value + borderWidth = 0; + borderColor = 0xddffffff; + pressAlpha = 0x42; + pressColor = 0x42000000; + radius = 16; + shapeType = 0; + + // get attribute of EaseImageView + if (attrs != null) { + TypedArray array = context.obtainStyledAttributes(attrs, R.styleable.CircleImageView); + borderColor = array.getColor(R.styleable.CircleImageView_ease_border_color, borderColor); + borderWidth = array.getDimensionPixelOffset(R.styleable.CircleImageView_ease_border_width, borderWidth); + pressAlpha = array.getInteger(R.styleable.CircleImageView_ease_press_alpha, pressAlpha); + pressColor = array.getColor(R.styleable.CircleImageView_ease_press_color, pressColor); + radius = array.getDimensionPixelOffset(R.styleable.CircleImageView_ease_radius, radius); + shapeType = array.getInteger(R.styleable.CircleImageView_es_shape_type, shapeType); + array.recycle(); + } + + // set paint when pressed + pressPaint = new Paint(); + pressPaint.setAntiAlias(true); + pressPaint.setStyle(Paint.Style.FILL); + pressPaint.setColor(pressColor); + pressPaint.setAlpha(0); + pressPaint.setFlags(Paint.ANTI_ALIAS_FLAG); + + setDrawingCacheEnabled(true); + setWillNotDraw(false); + } + + @Override + protected void onDraw(Canvas canvas) { + + if (shapeType == 0) { + super.onDraw(canvas); + return; + } + Drawable drawable = getDrawable(); + if (drawable == null) { + return; + } + // the width and height is in xml file + if (getWidth() == 0 || getHeight() == 0) { + return; + } + Bitmap bitmap = getBitmapFromDrawable(drawable); + drawDrawable(canvas, bitmap); + + if (isClickable()) { + drawPress(canvas); + } + drawBorder(canvas); + } + + /** + * draw Rounded Rectangle + * + * @param canvas + * @param bitmap + */ + @SuppressLint("WrongConstant") + private void drawDrawable(Canvas canvas, Bitmap bitmap) { + Paint paint = new Paint(); + paint.setColor(0xffffffff); + paint.setAntiAlias(true); //smooths out the edges of what is being drawn + PorterDuffXfermode xfermode = new PorterDuffXfermode(PorterDuff.Mode.SRC_IN); + // set flags + int saveFlags = Canvas.ALL_SAVE_FLAG + ; + canvas.saveLayer(0, 0, width, height, null, saveFlags); + + if (shapeType == 1) { + canvas.drawCircle(width / 2, height / 2, width / 2 - 1, paint); + } else if (shapeType == 2) { + RectF rectf = new RectF(1, 1, getWidth() - 1, getHeight() - 1); + canvas.drawRoundRect(rectf, radius + 1, radius + 1, paint); + } + + paint.setXfermode(xfermode); + + float scaleWidth = ((float) getWidth()) / bitmap.getWidth(); + float scaleHeight = ((float) getHeight()) / bitmap.getHeight(); + + Matrix matrix = new Matrix(); + matrix.postScale(scaleWidth, scaleHeight); + + //bitmap scale + bitmap = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true); + + canvas.drawBitmap(bitmap, 0, 0, paint); + canvas.restore(); + } + + /** + * draw the effect when pressed + * + * @param canvas + */ + private void drawPress(Canvas canvas) { + // check is rectangle or circle + if (shapeType == 1) { + canvas.drawCircle(width / 2, height / 2, width / 2 - 1, pressPaint); + } else if (shapeType == 2) { + RectF rectF = new RectF(1, 1, width - 1, height - 1); + canvas.drawRoundRect(rectF, radius + 1, radius + 1, pressPaint); + } + } + + /** + * draw customized border + * + * @param canvas + */ + private void drawBorder(Canvas canvas) { + if (borderWidth > 0) { + Paint paint = new Paint(); + paint.setStrokeWidth(borderWidth); + paint.setStyle(Paint.Style.STROKE); + paint.setColor(borderColor); + paint.setAntiAlias(true); + // // check is rectangle or circle + if (shapeType == 1) { + canvas.drawCircle(width / 2, height / 2, (width - borderWidth) / 2, paint); + } else if (shapeType == 2) { + RectF rectf = new RectF(borderWidth / 2, borderWidth / 2, getWidth() - borderWidth / 2, + getHeight() - borderWidth / 2); + canvas.drawRoundRect(rectf, radius, radius, paint); + } + } + } + + /** + * monitor the size change + * + * @param w + * @param h + * @param oldw + * @param oldh + */ + @Override + protected void onSizeChanged(int w, int h, int oldw, int oldh) { + super.onSizeChanged(w, h, oldw, oldh); + width = w; + height = h; + } + + /** + * monitor if touched + * + * @param event + * @return + */ + @Override + public boolean onTouchEvent(MotionEvent event) { + switch (event.getAction()) { + case MotionEvent.ACTION_DOWN: + pressPaint.setAlpha(pressAlpha); + invalidate(); + break; + case MotionEvent.ACTION_UP: + pressPaint.setAlpha(0); + invalidate(); + break; + case MotionEvent.ACTION_MOVE: + + break; + default: + pressPaint.setAlpha(0); + invalidate(); + break; + } + return super.onTouchEvent(event); + } + + /** + * @param drawable + * @return + */ + private Bitmap getBitmapFromDrawable(Drawable drawable) { + if (drawable == null) { + return null; + } + + if (drawable instanceof BitmapDrawable) { + return ((BitmapDrawable) drawable).getBitmap(); + } + + Bitmap bitmap; + int width = Math.max(drawable.getIntrinsicWidth(), 2); + int height = Math.max(drawable.getIntrinsicHeight(), 2); + try { + bitmap = Bitmap.createBitmap(width, height, BITMAP_CONFIG); + Canvas canvas = new Canvas(bitmap); + drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight()); + drawable.draw(canvas); + } catch (IllegalArgumentException e) { + e.printStackTrace(); + bitmap = null; + } + return bitmap; + } + + /** + * set border color + * + * @param borderColor + */ + public void setBorderColor(int borderColor) { + this.borderColor = borderColor; + invalidate(); + } + + /** + * set border width + * + * @param borderWidth + */ + public void setBorderWidth(int borderWidth) { + this.borderWidth = borderWidth; + } + + /** + * set alpha when pressed + * + * @param pressAlpha + */ + public void setPressAlpha(int pressAlpha) { + this.pressAlpha = pressAlpha; + } + + /** + * set color when pressed + * + * @param pressColor + */ + public void setPressColor(int pressColor) { + this.pressColor = pressColor; + } + + /** + * set radius + * + * @param radius + */ + public void setRadius(int radius) { + this.radius = radius; + invalidate(); + } + + /** + * set shape,1 is circle, 2 is rectangle + * + * @param shapeType + */ + public void setShapeType(int shapeType) { + this.shapeType = shapeType; + invalidate(); + } +} diff --git a/base_player/src/main/java/com/web/base/ContactBean.java b/base_player/src/main/java/com/web/base/ContactBean.java new file mode 100644 index 0000000..18251d9 --- /dev/null +++ b/base_player/src/main/java/com/web/base/ContactBean.java @@ -0,0 +1,29 @@ +package com.web.base; + +public class ContactBean { + + public String name; + public String phone; + + + public ContactBean(String name, String phone) { + this.name = name; + this.phone = phone; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } +} diff --git a/base_player/src/main/java/com/web/base/LogUtils.java b/base_player/src/main/java/com/web/base/LogUtils.java new file mode 100644 index 0000000..c7bd63f --- /dev/null +++ b/base_player/src/main/java/com/web/base/LogUtils.java @@ -0,0 +1,146 @@ +package com.web.base; + +import android.util.Log; + + +/** + * Log统一管理类 + * Created by on 2015/10/19 0019. + */ +public class LogUtils { + + private LogUtils() { + throw new UnsupportedOperationException("cannot be instantiated"); + } + +// public static boolean isDebug = ApiService.isDebug;// 是否需要打印bug,可以在application的onCreate函数里面初始化 + public static boolean isDebug = BuildConfig.BUILD_TYPE.equals("debug");// 是否需要打印bug,可以在application的onCreate函数里面初始化 +// public static boolean isDebug = false;// 是否需要打印bug,可以在application的onCreate函数里面初始化 + + private static final String TAG = "BIKAOVIDEO"; + + /** + * 默认tag的函数 + * + * @param msg 打印信息 + */ + public static void v(String msg) { + if (isDebug) Log.v(TAG, msg); + } + + public static void d(String msg) { + if (isDebug) Log.d(TAG, msg); + } + + public static void i(String msg) { + if (isDebug) { + if (msg.length() > 4000) { + Log.i( TAG,"BIKAOVIDEOsb.length = " + msg.length()); + int chunkCount = msg.length() / 4000; // integer division + for (int i = 0; i <= chunkCount; i++) { + int max = 4000 * (i + 1); + if (max >= msg.length()) { + Log.i( TAG,"XHXchunk " + i + " of " + chunkCount + ":" + msg.substring(4000 * i)); + } else { + Log.i( TAG,"XHXchunk " + i + " of " + chunkCount + ":" + msg.substring(4000 * i, max)); + } + } + } else { + Log.i( TAG,"BIKAOVIDEO" + msg.toString()); + } + } + } + + public static void w(String msg) { + if (isDebug) Log.w(TAG, msg); + } + + public static void e(String msg) { + if (isDebug) { + if (msg.length() > 4000) { + Log.e(TAG, "sb.length = " + msg.length()); + int chunkCount = msg.length() / 4000; // integer division + for (int i = 0; i <= chunkCount; i++) { + int max = 4000 * (i + 1); + if (max >= msg.length()) { + Log.e(TAG, "XHXchunk " + i + " of " + chunkCount + ":" + msg.substring(4000 * i)); + } else { + Log.e(TAG, "XHXchunk " + i + " of " + chunkCount + ":" + msg.substring(4000 * i, max)); + } + } + } else { + Log.e(TAG, "XHX" + msg.toString()); + } + + } + + } + + /** + * 自定义lag的函数 + * + * @param tag tag + * @param msg 打印信息 + */ + public static void v(String tag, String msg) { + if (isDebug) Log.v(tag, msg); + } + + public static void d(String tag, String msg) { + if (isDebug) Log.d(tag, msg); + } + + public static void i(String tag, String msg) { + if (isDebug) { + if (msg.length() > 4000) { + Log.i( TAG,"sb.length = " + msg.length()); + int chunkCount = msg.length() / 4000; // integer division + for (int i = 0; i <= chunkCount; i++) { + int max = 4000 * (i + 1); + if (max >= msg.length()) { + Log.i( TAG,"XHXchunk " + i + " of " + chunkCount + ":" + msg.substring(4000 * i)); + } else { + Log.i( TAG,"XHXchunk " + i + " of " + chunkCount + ":" + msg.substring(4000 * i, max)); + } + } + } else { + Log.i( TAG,"XHX" + msg.toString()); + } + } + } + + public static void w(String tag, String msg) { + if (isDebug) Log.w(tag, msg); + } + + public static void e(String tag, String msg) { + if (isDebug) Log.e(tag, msg); + } + + /** + * 自定义lag的函数 + * + * @param clazz 类 + * @param msg 打印信息 + */ + public static void v(Class clazz, String msg) { + if (isDebug) Log.v(clazz.getSimpleName(), msg); + } + + public static void d(Class clazz, String msg) { + if (isDebug) Log.d(clazz.getSimpleName(), msg); + } + + public static void i(Class clazz, String msg) { + if (isDebug) Log.i(clazz.getSimpleName(), msg); + } + + public static void w(Class clazz, String msg) { + if (isDebug) Log.w(clazz.getSimpleName(), msg); + } + + public static void e(Class clazz, String msg) { + if (isDebug) Log.e(clazz.getSimpleName(), msg); + } + +} \ No newline at end of file diff --git a/base_player/src/main/java/com/web/base/MainActivity2.java b/base_player/src/main/java/com/web/base/MainActivity2.java new file mode 100644 index 0000000..6271022 --- /dev/null +++ b/base_player/src/main/java/com/web/base/MainActivity2.java @@ -0,0 +1,712 @@ +package com.web.base; + +import android.annotation.SuppressLint; +import android.app.Activity; +import android.content.Context; +import android.content.Intent; +import android.content.SharedPreferences; +import android.content.pm.ActivityInfo; +import android.content.pm.PackageManager; +import android.graphics.Bitmap; +import android.graphics.Color; +import android.net.Uri; +import android.net.http.SslError; +import android.os.Build; +import android.os.Bundle; +import android.os.Handler; +import android.os.Message; +import android.util.Log; +import android.view.View; +import android.view.WindowManager; +import android.webkit.ConsoleMessage; +import android.webkit.DownloadListener; +import android.webkit.PermissionRequest; +import android.webkit.SslErrorHandler; +import android.webkit.ValueCallback; +import android.webkit.WebChromeClient; +import android.webkit.WebChromeClient.FileChooserParams; +import android.webkit.WebResourceError; +import android.webkit.WebResourceRequest; +import android.webkit.WebResourceResponse; +import android.webkit.WebSettings; +import android.webkit.WebView; +import android.webkit.WebViewClient; +import android.widget.FrameLayout; +import android.widget.ImageView; +import android.widget.LinearLayout; +import android.widget.ProgressBar; +import android.widget.TextView; + +import androidx.annotation.Nullable; +import androidx.annotation.RequiresApi; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AppCompatActivity; + + +public class MainActivity2 extends AppCompatActivity { + public WebView webView; + TextView tvErrorMsg; + LinearLayout layoutError; + public ImageView show_top_v; + public ImageView showTopV1; + private LinearLayout showTopLy; + private View xCustomView; + private FrameLayout videoFullView; + private WebChromeClient.CustomViewCallback xCustomViewCallback; + + private View topVvvv; + private ProgressBar progressBar; + public static String url = "https://candy916.co/"; + + @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) + @Override + protected void onCreate(Bundle savedInstanceState) { + if (getInt(MainActivity2.this, "style_color_int", 0) != 0) { + getWindow().setNavigationBarColor(getInt(MainActivity2.this, "style_color_int", 0)); + } + if (getInt(MainActivity2.this, "windows_color_int", 0) != 0) { + getWindow().getDecorView().setBackgroundColor(getInt(MainActivity2.this, "windows_color_int", 0)); + } + getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE); + super.onCreate(savedInstanceState); + View decor = getWindow().getDecorView(); + getWindow().setFlags(WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED, WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED); + if (getInt(MainActivity2.this, "is_white", 0) == 1) { + decor.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE); + } else { + decor.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); + } + ActionBar actionBar = getSupportActionBar(); + if (actionBar != null) { + actionBar.hide(); + } + setContentView(R.layout.activity_main2); + + initView(); + + findViewById(R.id.back_iv).setOnClickListener(view -> onBackPressed()); + + webView.loadUrl(getString(this, "base_url", "https://www.javrate.com/")); + + } + + + public void setBackDrawables(int drawableId) { + showTopLy.setBackgroundResource(drawableId); + } + + /** + * 显示圆角还是 原样显示 + * + * @param isRound + */ + public void setImageView(boolean isRound) { + if (isRound) { + show_top_v.setVisibility(View.VISIBLE); + showTopV1.setVisibility(View.GONE); + } else { + show_top_v.setVisibility(View.GONE); + showTopV1.setVisibility(View.VISIBLE); + } + } + + + @Override + public void onBackPressed() { + + if (webView.canGoBack()) {//当webview有多级能返回的时候 + while (webView.canGoBack()) { + webView.goBack(); + } + } else { + + if (inCustomView()) { + hideCustomView(); + } else { + webView.loadUrl("about:blank"); + //不能返回了 关闭进程 退出程序 + Intent homeIntent = new Intent(Intent.ACTION_MAIN); + homeIntent.addCategory(Intent.CATEGORY_HOME); + homeIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + startActivity(homeIntent); + android.os.Process.killProcess(android.os.Process.myPid()); + System.exit(1); + + } + + } + } + + /** + * 全屏时按返加键执行退出全屏方法 + */ + public void hideCustomView() { + webChromeClient.onHideCustomView(); + setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); + } + /** + * 判断是否是全屏 + * + * @return + */ + public boolean inCustomView() { + return (xCustomView != null); + } + + @SuppressLint({"NewApi", "WrongConstant"}) + protected void initView() { + topVvvv = (View) findViewById(R.id.top_vvvv); + webView = findViewById(R.id.webview); + show_top_v = findViewById(R.id.show_top_v); + + videoFullView = (FrameLayout) findViewById(R.id.video_fullView); + + showTopV1 = (ImageView) findViewById(R.id.show_top_v1); + showTopLy = findViewById(R.id.show_top_ly); + progressBar = (ProgressBar) findViewById(R.id.progressbar); + tvErrorMsg = findViewById(R.id.errormsg); + layoutError = findViewById(R.id.layoutError); + WebSettings settings = webView.getSettings(); + settings.setDomStorageEnabled(true); + settings.setAppCacheEnabled(true); + settings.setCacheMode(WebSettings.LOAD_DEFAULT); + settings.setJavaScriptEnabled(true); + settings.setLoadWithOverviewMode(true); + // 设置允许访问文件数据 + settings.setAllowFileAccess(true); + settings.setAllowContentAccess(true); + settings.setDatabaseEnabled(true); + settings.setSavePassword(false); + settings.setSaveFormData(false); + settings.setUseWideViewPort(true); + settings.setBuiltInZoomControls(true); + settings.setPluginState(WebSettings.PluginState.ON); + settings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NARROW_COLUMNS); + webView.setFocusable(true); + webView.setFocusableInTouchMode(true); + webView.getSettings().setSupportMultipleWindows(true); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + webView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW); + } + settings.setSupportZoom(false); + webView.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY); +// webView.setHorizontalScrollbarOverlay(true); + webView.setHorizontalScrollBarEnabled(true); + webView.requestFocus(); +// webView.setBackgroundColor(getColor(R.color.black)); + settings.setJavaScriptCanOpenWindowsAutomatically(true); + settings.setMediaPlaybackRequiresUserGesture(false); + // 设置在WebView内部是否允许通过file url加载的 Js代码读取其他的本地文件 + // Android 4.1前默认允许,4.1后默认禁止 + settings.setAllowFileAccessFromFileURLs(true); + // 设置WebView内部是否允许通过 file url 加载的 Javascript 可以访问其他的源(包括http、https等源) + // Android 4.1前默认允许,4.1后默认禁止 + settings.setAllowUniversalAccessFromFileURLs(true); + + webView.setWebChromeClient(webChromeClient); + webView.setWebViewClient(webViewClient); + Log.i("XHXDEBUG", "XHXDEBUGURL:::" + url); +// webView.addJavascriptInterface(new JsInterface(), "WebViewHook"); + + showTopLy.setBackgroundColor(Color.parseColor(getString(MainActivity2.this, "windows_color", "#FFFFFF"))); + webView.setDownloadListener(new DownloadListener() { + @Override + public void onDownloadStart(String url, String userAgent, String contentDisposition, String mimeType, long contentLength) { + LogUtils.i("URL是啥onDownloadStart:" + url); + + try { + Intent intent = new Intent(); + intent.setAction(Intent.ACTION_VIEW); + intent.setData(Uri.parse(url)); + startActivity(intent); + } catch (Exception e) { + e.printStackTrace(); + } + + } + }); + LogUtils.i("userAgent:" + webView.getSettings().getUserAgentString()); + + } + + + private void enterImmersiveMode() { + getWindow().getDecorView().setSystemUiVisibility( + View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY + | View.SYSTEM_UI_FLAG_LAYOUT_STABLE + | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION + | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN + | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION + | View.SYSTEM_UI_FLAG_FULLSCREEN + ); + +// // 隐藏状态栏 +// getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, +// WindowManager.LayoutParams.FLAG_FULLSCREEN); + } + + private void exitImmersiveMode() { + if (getInt(MainActivity2.this, "style_color_int", 0) != 0) { + getWindow().setNavigationBarColor(getInt(MainActivity2.this, "style_color_int", 0)); + } + if (getInt(MainActivity2.this, "windows_color_int", 0) != 0) { + getWindow().getDecorView().setBackgroundColor(getInt(MainActivity2.this, "windows_color_int", 0)); + } + getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE); + View decor = getWindow().getDecorView(); + getWindow().setFlags(WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED, WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED); + if (getInt(MainActivity2.this, "is_white", 0) == 1) { + decor.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE); + } else { + decor.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); + } + } + + Handler handler = new Handler(); + + // WebView webViews; + WebViewClient webViewClient = new WebViewClient() { + + @Override + public void onPageStarted(WebView webView, String s, Bitmap bitmap) { + super.onPageStarted(webView, s, bitmap); + + } + + @Override + public void onPageFinished(WebView webView, String s) { + super.onPageFinished(webView, s); + LogUtils.i("URL是啥加载完成:" + webView.getUrl()); + + + int w = View.MeasureSpec.makeMeasureSpec(0, + View.MeasureSpec.UNSPECIFIED); + int h = View.MeasureSpec.makeMeasureSpec(0, + View.MeasureSpec.UNSPECIFIED); + // 重新测量 + webView.measure(w, h); + if (showTopLy.getVisibility() == View.VISIBLE) { + handler.postDelayed(() -> showTopLy.setVisibility(View.GONE), 1000); + } + if (webView.getUrl().equals(url + "index") || webView.getUrl().equals(url + "/index")) { + isAtGame = false; + topVvvv.setVisibility(View.GONE); + } else { + if (isAtGame) { + topVvvv.setVisibility(View.VISIBLE); + } else { + topVvvv.setVisibility(View.GONE); + + } + } + + } + + @Override + public WebResourceResponse shouldInterceptRequest(WebView webView, String s) { + + return super.shouldInterceptRequest(webView, s); + } + + @Override + public WebResourceResponse shouldInterceptRequest(WebView webView, WebResourceRequest webResourceRequest) { + return super.shouldInterceptRequest(webView, webResourceRequest); + } + + @Override + public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error) { + super.onReceivedError(view, request, error); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + int errorCode = error.getErrorCode(); + String errorMessage = error.getDescription().toString(); + String currentUrl = request.getUrl().toString(); + if ((errorCode == -2 || errorCode == -6) && currentUrl.contains(url)) { + onShowErrorView(errorMessage); + } else { + onShowNetView(); + } + } + progressBar.setVisibility(View.GONE); + } + + @Override + public void onReceivedSslError(WebView webView, SslErrorHandler sslErrorHandler, SslError sslError) { + sslErrorHandler.proceed(); + } + + @Override + public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { + super.onReceivedError(view, errorCode, description, failingUrl); + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { + if ((errorCode == -2 || errorCode == -6) && failingUrl.contains(url)) { + onShowErrorView(description); + } else { + onShowNetView(); + } + } + progressBar.setVisibility(View.GONE); + + } + + + @Override + public boolean shouldOverrideUrlLoading(WebView webView, String url1) { + + LogUtils.i("URL是啥:" + url1); + + if (url1.equals(url + "index") || url1.equals(url + "/index")) { + isAtGame = false; + topVvvv.setVisibility(View.GONE); + } else { + progressBar.setVisibility(View.GONE); + } + + if (!(url1.startsWith("http") || url1.startsWith("https"))) { + try { + Intent intent = new Intent(); + intent.setAction(Intent.ACTION_VIEW); + intent.setData(Uri.parse(url1)); + startActivity(intent); + return true; + } catch (Exception e) { + e.printStackTrace(); + } + } else { + + if ((url1.equals(url + "index") || url1.equals(url + "/index")) && webView.canGoBack()) { + return false; + } else { + //其它的该怎么处理就怎么处理 + webView.loadUrl(url1); + return true; + } + + } + + return false; + } + + @Override + public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) { + + Uri uri; + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + uri = request.getUrl(); + } else { + uri = Uri.parse(request.toString()); + } + String url1 = uri.toString(); + LogUtils.i("URL是啥1:" + url1); + + + if (url1.equals(url + "index") || url1.equals(url + "/index")) { + isAtGame = false; + topVvvv.setVisibility(View.GONE); + } else { + progressBar.setVisibility(View.GONE); + } + + if (!(url1.startsWith("http") || url1.startsWith("https"))) { + try { + Intent intent = new Intent(); + intent.setAction(Intent.ACTION_VIEW); + intent.setData(Uri.parse(url1)); + startActivity(intent); + return true; + } catch (Exception e) { + e.printStackTrace(); + } + } else { + + if ((url1.equals(url + "index") || url1.equals(url + "/index")) && webView.canGoBack()) { + return false; + } else { + //其它的该怎么处理就怎么处理 + webView.loadUrl(url1); + return true; + } + + } + + return false; + } + }; + + + public void onShowErrorView(String errorMsg) { //网络不可用的情况 + webView.setVisibility(View.GONE); + layoutError.setVisibility(View.VISIBLE); + tvErrorMsg.setText(errorMsg); + showTopLy.setVisibility(View.GONE); + } + + public void onShowNetView() { + webView.setVisibility(View.VISIBLE); + layoutError.setVisibility(View.GONE); + showTopLy.setVisibility(View.GONE); + } + + + boolean isAtGame = false; + private static final int REQUEST_CODE_FILE_CHOOSER = 1; + private ValueCallback mUploadCallbackForLowApi; + private ValueCallback mUploadCallbackForHighApi; + WebChromeClient webChromeClient = new WebChromeClient() { + + @Override + public boolean onConsoleMessage(ConsoleMessage consoleMessage) { + return true; + } + + @Override + public boolean onCreateWindow(WebView webViewdd, boolean b, boolean b1, Message resultMsg) { + LogUtils.i("URL是啥onCreateWindow:" + webView.getUrl()); + WebView newWebView = new WebView(webViewdd.getContext()); + newWebView.setWebViewClient(new WebViewClient() { + + @Override + public boolean shouldOverrideUrlLoading(WebView view, String url) { + + LogUtils.i("URL是啥新窗口:" + url); + + return false; + } + + + }); + WebView.WebViewTransport transport = (WebView.WebViewTransport) resultMsg.obj; + transport.setWebView(newWebView); + resultMsg.sendToTarget(); + return true; + } + + @Override + public void onShowCustomView(View view, CustomViewCallback callback) { + setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); + webView.setVisibility(View.INVISIBLE); + // 如果一个视图已经存在,那么立刻终止并新建一个 + if (xCustomView != null) { + callback.onCustomViewHidden(); + return; + } + videoFullView.addView(view); + xCustomView = view; + xCustomViewCallback = callback; + videoFullView.setVisibility(View.VISIBLE); + enterImmersiveMode(); + } + + + // 视频播放退出全屏会被调用的 + @Override + public void onHideCustomView() { + if (xCustomView == null)// 不是全屏播放状态 + return; + + setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); + xCustomView.setVisibility(View.GONE); + videoFullView.removeView(xCustomView); + xCustomView = null; + videoFullView.setVisibility(View.GONE); + xCustomViewCallback.onCustomViewHidden(); + webView.setVisibility(View.VISIBLE); + exitImmersiveMode(); + } + + + @Override + public void onCloseWindow(WebView window) { + super.onCloseWindow(window); + LogUtils.i("URL是啥新窗口结束:" + url); + + } + + @Override + public void onProgressChanged(WebView view, int newProgress) { + super.onProgressChanged(view, newProgress); + // 更新进度条的进度 + progressBar.setProgress(newProgress); + // 如果加载完成,隐藏进度条 + if (newProgress == 100) { + progressBar.setVisibility(View.GONE); + } else { + progressBar.setVisibility(View.GONE); + } + } + + + // @TargetApi(Build.VERSION_CODES.LOLLIPOP) + @Override + public boolean onShowFileChooser(WebView webView, ValueCallback filePathCallback, FileChooserParams fileChooserParams) { + LogUtils.i("数据接口:onShowFileChooser"); + mUploadCallbackForHighApi = filePathCallback; + Intent intent = fileChooserParams.createIntent(); + intent.addCategory(Intent.CATEGORY_OPENABLE); + startActivityForResult(Intent.createChooser(intent, "File chooser"), REQUEST_CODE_FILE_CHOOSER); + return true; + } + + // For 3.0+ + protected void openFileChooser(ValueCallback uploadMsg, String acceptType) { + LogUtils.i("数据接口:openFileChooseracceptType"); + openFilerChooser(uploadMsg); + } + + + private void openFilerChooser(ValueCallback uploadMsg) { + LogUtils.i("数据接口:openFileChooser"); + mUploadCallbackForLowApi = uploadMsg; + startActivityForResult(Intent.createChooser(getFilerChooserIntent(), "File Chooser"), REQUEST_CODE_FILE_CHOOSER); + } + + + private Intent getFilerChooserIntent() { + Intent intent = new Intent(Intent.ACTION_GET_CONTENT); + intent.addCategory(Intent.CATEGORY_OPENABLE); + return intent; + } + + + }; + + private PermissionRequest permissionRequest; + + + @RequiresApi(api = Build.VERSION_CODES.Q) + @Override + protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { + super.onActivityResult(requestCode, resultCode, data); + switch (requestCode) { + case REQUEST_CODE_FILE_CHOOSER: + if (resultCode == RESULT_OK || resultCode == RESULT_CANCELED) { + afterFileChooseGoing(resultCode, data); + } + break; + + + } + } + + + /** + * onActivityResult方法 + */ + + private void afterFileChooseGoing(int resultCode, Intent data) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + if (mUploadCallbackForHighApi == null) { + return; + } + mUploadCallbackForHighApi.onReceiveValue(WebChromeClient.FileChooserParams.parseResult(resultCode, data)); + mUploadCallbackForHighApi = null; + } else { + if (mUploadCallbackForLowApi == null) { + return; + } + Uri result = data == null ? null : data.getData(); + mUploadCallbackForLowApi.onReceiveValue(result); + mUploadCallbackForLowApi = null; + } + } + + @Override + public void onRequestPermissionsResult(int requestCode, + String permissions[], int[] grantResults) { + if (grantResults.length == 0) { + return; + } + switch (requestCode) { + + case 1111: + if (grantResults[0] == PackageManager.PERMISSION_GRANTED && permissionRequest != null) { + permissionRequest.grant(permissionRequest.getResources()); + } + break; + + } + super.onRequestPermissionsResult(requestCode, permissions, grantResults); + } + + + @Override + public void onDestroy() { + super.onDestroy(); + videoFullView.removeAllViews(); + webView.loadUrl("about:blank"); + webView.stopLoading(); + webView.setWebChromeClient(null); + webView.setWebViewClient(null); + webView.destroy(); + webView = null; + + } + + @Override + protected void onResume() { + super.onResume(); + webView.onResume(); + webView.resumeTimers(); + + /** + * 设置为横屏 + */ + if (getRequestedOrientation() != ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) { + setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); + } + + } + + @Override + protected void onPause() { + super.onPause(); + webView.onPause(); + webView.pauseTimers(); + } + + + public static void saveInt(Context context, String key, int value) { + SharedPreferences sp = context.getSharedPreferences("InitApp", Activity.MODE_PRIVATE); + SharedPreferences.Editor editor = sp.edit(); + editor.putInt(key, value); + editor.apply(); + } + + public static int getInt(Context context, String key, int defValue) { + SharedPreferences sp = context.getSharedPreferences("InitApp", Activity.MODE_PRIVATE); + return sp.getInt(key, defValue); + } + + + public static void saveString(Context context, String key, String value) { + SharedPreferences sp = context.getSharedPreferences("InitApp", Activity.MODE_PRIVATE); + SharedPreferences.Editor editor = sp.edit(); + editor.putString(key, value); + editor.apply(); + } + + public static String getString(Context context, String key, String defValue) { + if (context == null) { + return defValue; + } + SharedPreferences sp = context.getSharedPreferences("InitApp", Activity.MODE_PRIVATE); + return sp.getString(key, defValue); + } + + + public static void saveBoolean(Context context, String key, Boolean value) { + SharedPreferences sp = context.getSharedPreferences("InitApp", Activity.MODE_PRIVATE); + SharedPreferences.Editor editor = sp.edit(); + editor.putBoolean(key, value); + editor.apply(); + } + + public static Boolean getBoolean(Context context, String key, Boolean defValue) { + if (context == null) { + return defValue; + } + SharedPreferences sp = context.getSharedPreferences("InitApp", Activity.MODE_PRIVATE); + return sp.getBoolean(key, defValue); + } + + +} diff --git a/base_player/src/main/java/com/web/base/StatusLayout.java b/base_player/src/main/java/com/web/base/StatusLayout.java new file mode 100644 index 0000000..20a4941 --- /dev/null +++ b/base_player/src/main/java/com/web/base/StatusLayout.java @@ -0,0 +1,44 @@ +package com.web.base; + +import android.content.Context; +import android.util.AttributeSet; +import android.view.ViewGroup; +import android.widget.LinearLayout; + +import androidx.annotation.Nullable; + +/** + * Created by kiun_2007 on 2018/3/29. + */ + +public class StatusLayout extends LinearLayout { + public StatusLayout(Context context) { + this(context, null); + } + + public StatusLayout(Context context, @Nullable AttributeSet attrs) { + this(context, attrs, 0); + } + + public StatusLayout(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { + super(context, attrs, defStyleAttr); + } + + private int getStatusBarHeight(Context context) { + int result = 0; + int resourceId = context.getResources().getIdentifier("status_bar_height", "dimen", "android"); + if (resourceId > 0) { + result = context.getResources().getDimensionPixelSize(resourceId); + } + return result; + } + + @Override + protected void onAttachedToWindow() { + ViewGroup.LayoutParams lp = this.getLayoutParams(); + lp.width = -1; + lp.height = getStatusBarHeight(getContext()); + this.setLayoutParams(lp); + super.onAttachedToWindow(); + } +} diff --git a/base_player/src/main/res/drawable-anydpi/ic_action_back.xml b/base_player/src/main/res/drawable-anydpi/ic_action_back.xml new file mode 100644 index 0000000..013ab07 --- /dev/null +++ b/base_player/src/main/res/drawable-anydpi/ic_action_back.xml @@ -0,0 +1,11 @@ + + + diff --git a/base_player/src/main/res/drawable-hdpi/ic_action_back.png b/base_player/src/main/res/drawable-hdpi/ic_action_back.png new file mode 100644 index 0000000..1560c04 Binary files /dev/null and b/base_player/src/main/res/drawable-hdpi/ic_action_back.png differ diff --git a/base_player/src/main/res/drawable-mdpi/ic_action_back.png b/base_player/src/main/res/drawable-mdpi/ic_action_back.png new file mode 100644 index 0000000..d5841d2 Binary files /dev/null and b/base_player/src/main/res/drawable-mdpi/ic_action_back.png differ diff --git a/base_player/src/main/res/drawable-v24/ic_launcher_foreground.xml b/base_player/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000..2b068d1 --- /dev/null +++ b/base_player/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/base_player/src/main/res/drawable-xhdpi/ic_action_back.png b/base_player/src/main/res/drawable-xhdpi/ic_action_back.png new file mode 100644 index 0000000..5c14e41 Binary files /dev/null and b/base_player/src/main/res/drawable-xhdpi/ic_action_back.png differ diff --git a/base_player/src/main/res/drawable-xxhdpi/ic_action_back.png b/base_player/src/main/res/drawable-xxhdpi/ic_action_back.png new file mode 100644 index 0000000..0516d08 Binary files /dev/null and b/base_player/src/main/res/drawable-xxhdpi/ic_action_back.png differ diff --git a/base_player/src/main/res/drawable/input_bg.xml b/base_player/src/main/res/drawable/input_bg.xml new file mode 100644 index 0000000..4e895aa --- /dev/null +++ b/base_player/src/main/res/drawable/input_bg.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/base_player/src/main/res/drawable/pass_word_bg1.xml b/base_player/src/main/res/drawable/pass_word_bg1.xml new file mode 100644 index 0000000..83b8c14 --- /dev/null +++ b/base_player/src/main/res/drawable/pass_word_bg1.xml @@ -0,0 +1,23 @@ + + + + + + \ No newline at end of file diff --git a/base_player/src/main/res/drawable/pass_word_bg2.xml b/base_player/src/main/res/drawable/pass_word_bg2.xml new file mode 100644 index 0000000..916d99c --- /dev/null +++ b/base_player/src/main/res/drawable/pass_word_bg2.xml @@ -0,0 +1,23 @@ + + + + + + \ No newline at end of file diff --git a/base_player/src/main/res/drawable/shape_btn_bg.xml b/base_player/src/main/res/drawable/shape_btn_bg.xml new file mode 100644 index 0000000..af87a0d --- /dev/null +++ b/base_player/src/main/res/drawable/shape_btn_bg.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/base_player/src/main/res/drawable/shape_dialog_bg3.xml b/base_player/src/main/res/drawable/shape_dialog_bg3.xml new file mode 100644 index 0000000..ca0a18d --- /dev/null +++ b/base_player/src/main/res/drawable/shape_dialog_bg3.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/base_player/src/main/res/drawable/shape_notify_typebg.xml b/base_player/src/main/res/drawable/shape_notify_typebg.xml new file mode 100644 index 0000000..bec715b --- /dev/null +++ b/base_player/src/main/res/drawable/shape_notify_typebg.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/base_player/src/main/res/layout/activity_main2.xml b/base_player/src/main/res/layout/activity_main2.xml new file mode 100644 index 0000000..beaee5e --- /dev/null +++ b/base_player/src/main/res/layout/activity_main2.xml @@ -0,0 +1,409 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/base_player/src/main/res/layout/activity_notifylist.xml b/base_player/src/main/res/layout/activity_notifylist.xml new file mode 100644 index 0000000..73b74e4 --- /dev/null +++ b/base_player/src/main/res/layout/activity_notifylist.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + diff --git a/base_player/src/main/res/layout/dialog_action_confirm.xml b/base_player/src/main/res/layout/dialog_action_confirm.xml new file mode 100644 index 0000000..1c67709 --- /dev/null +++ b/base_player/src/main/res/layout/dialog_action_confirm.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/base_player/src/main/res/layout/item_notify_list.xml b/base_player/src/main/res/layout/item_notify_list.xml new file mode 100644 index 0000000..267e9f2 --- /dev/null +++ b/base_player/src/main/res/layout/item_notify_list.xml @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/base_player/src/main/res/mipmap-hdpi/ic_empty.png b/base_player/src/main/res/mipmap-hdpi/ic_empty.png new file mode 100644 index 0000000..72473d6 Binary files /dev/null and b/base_player/src/main/res/mipmap-hdpi/ic_empty.png differ diff --git a/base_player/src/main/res/mipmap-hdpi/ic_pull_down.png b/base_player/src/main/res/mipmap-hdpi/ic_pull_down.png new file mode 100644 index 0000000..7dc0ec3 Binary files /dev/null and b/base_player/src/main/res/mipmap-hdpi/ic_pull_down.png differ diff --git a/base_player/src/main/res/mipmap-xhdpi/ic_close.png b/base_player/src/main/res/mipmap-xhdpi/ic_close.png new file mode 100644 index 0000000..c0b0127 Binary files /dev/null and b/base_player/src/main/res/mipmap-xhdpi/ic_close.png differ diff --git a/base_player/src/main/res/mipmap-xhdpi/ic_email.png b/base_player/src/main/res/mipmap-xhdpi/ic_email.png new file mode 100644 index 0000000..9fc3a42 Binary files /dev/null and b/base_player/src/main/res/mipmap-xhdpi/ic_email.png differ diff --git a/base_player/src/main/res/mipmap-xhdpi/ic_email1.png b/base_player/src/main/res/mipmap-xhdpi/ic_email1.png new file mode 100644 index 0000000..9fc3a42 Binary files /dev/null and b/base_player/src/main/res/mipmap-xhdpi/ic_email1.png differ diff --git a/base_player/src/main/res/mipmap-xhdpi/ic_facebook.png b/base_player/src/main/res/mipmap-xhdpi/ic_facebook.png new file mode 100644 index 0000000..de378dc Binary files /dev/null and b/base_player/src/main/res/mipmap-xhdpi/ic_facebook.png differ diff --git a/base_player/src/main/res/mipmap-xhdpi/ic_hometo.png b/base_player/src/main/res/mipmap-xhdpi/ic_hometo.png new file mode 100644 index 0000000..4e93043 Binary files /dev/null and b/base_player/src/main/res/mipmap-xhdpi/ic_hometo.png differ diff --git a/base_player/src/main/res/mipmap-xhdpi/ic_link.png b/base_player/src/main/res/mipmap-xhdpi/ic_link.png new file mode 100644 index 0000000..2f98612 Binary files /dev/null and b/base_player/src/main/res/mipmap-xhdpi/ic_link.png differ diff --git a/base_player/src/main/res/mipmap-xhdpi/ic_menu.png b/base_player/src/main/res/mipmap-xhdpi/ic_menu.png new file mode 100644 index 0000000..2b55ec5 Binary files /dev/null and b/base_player/src/main/res/mipmap-xhdpi/ic_menu.png differ diff --git a/base_player/src/main/res/mipmap-xhdpi/ic_notify_email.png b/base_player/src/main/res/mipmap-xhdpi/ic_notify_email.png new file mode 100644 index 0000000..5a2df8e Binary files /dev/null and b/base_player/src/main/res/mipmap-xhdpi/ic_notify_email.png differ diff --git a/base_player/src/main/res/mipmap-xhdpi/ic_notify_normal.png b/base_player/src/main/res/mipmap-xhdpi/ic_notify_normal.png new file mode 100644 index 0000000..f056d32 Binary files /dev/null and b/base_player/src/main/res/mipmap-xhdpi/ic_notify_normal.png differ diff --git a/base_player/src/main/res/mipmap-xhdpi/ic_notify_shangla.png b/base_player/src/main/res/mipmap-xhdpi/ic_notify_shangla.png new file mode 100644 index 0000000..eb1d3e9 Binary files /dev/null and b/base_player/src/main/res/mipmap-xhdpi/ic_notify_shangla.png differ diff --git a/base_player/src/main/res/mipmap-xhdpi/ic_notify_xiala.png b/base_player/src/main/res/mipmap-xhdpi/ic_notify_xiala.png new file mode 100644 index 0000000..7999f63 Binary files /dev/null and b/base_player/src/main/res/mipmap-xhdpi/ic_notify_xiala.png differ diff --git a/base_player/src/main/res/mipmap-xhdpi/ic_notifylogo.png b/base_player/src/main/res/mipmap-xhdpi/ic_notifylogo.png new file mode 100644 index 0000000..b975e45 Binary files /dev/null and b/base_player/src/main/res/mipmap-xhdpi/ic_notifylogo.png differ diff --git a/base_player/src/main/res/mipmap-xhdpi/ic_notifylogo_img.png b/base_player/src/main/res/mipmap-xhdpi/ic_notifylogo_img.png new file mode 100644 index 0000000..e78b250 Binary files /dev/null and b/base_player/src/main/res/mipmap-xhdpi/ic_notifylogo_img.png differ diff --git a/base_player/src/main/res/mipmap-xhdpi/ic_notifylogo_link.png b/base_player/src/main/res/mipmap-xhdpi/ic_notifylogo_link.png new file mode 100644 index 0000000..3d09922 Binary files /dev/null and b/base_player/src/main/res/mipmap-xhdpi/ic_notifylogo_link.png differ diff --git a/base_player/src/main/res/mipmap-xhdpi/ic_shousuo.png b/base_player/src/main/res/mipmap-xhdpi/ic_shousuo.png new file mode 100644 index 0000000..16b38be Binary files /dev/null and b/base_player/src/main/res/mipmap-xhdpi/ic_shousuo.png differ diff --git a/base_player/src/main/res/mipmap-xhdpi/ic_tel.png b/base_player/src/main/res/mipmap-xhdpi/ic_tel.png new file mode 100644 index 0000000..df82270 Binary files /dev/null and b/base_player/src/main/res/mipmap-xhdpi/ic_tel.png differ diff --git a/base_player/src/main/res/mipmap-xhdpi/ic_whatsapp.png b/base_player/src/main/res/mipmap-xhdpi/ic_whatsapp.png new file mode 100644 index 0000000..7ca41ed Binary files /dev/null and b/base_player/src/main/res/mipmap-xhdpi/ic_whatsapp.png differ diff --git a/base_player/src/main/res/mipmap-xhdpi/ic_zhangkai.png b/base_player/src/main/res/mipmap-xhdpi/ic_zhangkai.png new file mode 100644 index 0000000..bdc84b3 Binary files /dev/null and b/base_player/src/main/res/mipmap-xhdpi/ic_zhangkai.png differ diff --git a/base_player/src/main/res/mipmap-xxhdpi/app_logo.png b/base_player/src/main/res/mipmap-xxhdpi/app_logo.png new file mode 100644 index 0000000..9cca57b Binary files /dev/null and b/base_player/src/main/res/mipmap-xxhdpi/app_logo.png differ diff --git a/base_player/src/main/res/mipmap-xxhdpi/look_img.png b/base_player/src/main/res/mipmap-xxhdpi/look_img.png new file mode 100644 index 0000000..bb76ba1 Binary files /dev/null and b/base_player/src/main/res/mipmap-xxhdpi/look_img.png differ diff --git a/base_player/src/main/res/mipmap-xxhdpi/share_img.png b/base_player/src/main/res/mipmap-xxhdpi/share_img.png new file mode 100644 index 0000000..203b4b7 Binary files /dev/null and b/base_player/src/main/res/mipmap-xxhdpi/share_img.png differ diff --git a/base_player/src/main/res/values-en/strings.xml b/base_player/src/main/res/values-en/strings.xml new file mode 100644 index 0000000..757be30 --- /dev/null +++ b/base_player/src/main/res/values-en/strings.xml @@ -0,0 +1,57 @@ + + Please Set Your Password + Cancel + Sure + New Version Update + Next Update + Update Immediately + Click to close notification + Click to re-download + Download failed + Click to install + Download completed + Downloading... + Version update + Downloading game + Getting download data... + Version update + Downloading game + Need to turn on mobile phone notification permission + Exit + Setting + Tip + Please enter the invitation code + My invitation code: + Superior invitation code: + Total number of invites: + App download link: + Share + Check Invitation Records + Invitation Records + Total number of invitees: %d + No Data + Withdrawal Record + Withdrawal Application + Edit Bank Card Information + 60 + Name: + Please enter the bank card name + Bank card account: + Please enter the bank card account + Country: + Please select a country + Bank Name: + Please select a bank name + Note: Please enter the country code before selecting the bank name! + Balance: %s + Total Earnings: %s + Amount: %s + Please enter the withdrawal amount + Withdrawal application has been submitted + No additional data available for now + NOTIFICATIONS + Loading… + Text + Image + Jump link + \ No newline at end of file diff --git a/base_player/src/main/res/values-night/themes.xml b/base_player/src/main/res/values-night/themes.xml new file mode 100644 index 0000000..4bf7105 --- /dev/null +++ b/base_player/src/main/res/values-night/themes.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/base_player/src/main/res/values/colors.xml b/base_player/src/main/res/values/colors.xml new file mode 100644 index 0000000..93d94e6 --- /dev/null +++ b/base_player/src/main/res/values/colors.xml @@ -0,0 +1,23 @@ + + + #FFFFFF + #FFFFFF + #FFFFFF + #FF03DAC5 + #FF018786 + #FF000000 + #FFFFFFFF + #EF4723 + #FFFFFFFF + + #2C2C2E + #FFA722 + #434343 + #BCBCBC + + #ACDFEE + #BDDDB7 + #C3B5D0 + #000000 + + \ No newline at end of file diff --git a/base_player/src/main/res/values/strings.xml b/base_player/src/main/res/values/strings.xml new file mode 100644 index 0000000..33eb322 --- /dev/null +++ b/base_player/src/main/res/values/strings.xml @@ -0,0 +1,59 @@ + + 请输入6位密码 + 取消 + 确定 + 版本更新 + 下次更新 + 立即更新 + 点击关闭通知 + 点击重新下载 + 下载失败 + 点击安装 + 下载完成 + 正在下载… + 版本更新 + 下载游戏中 + 版本更新 + 下载游戏中 + 正在获取下载数据… + 需要打开手机通知权限 + 退出 + 设置 + 提示 + 请输入邀请码 + 我的邀请码: + 上级邀请码: + 总邀请人数: + 邀请您下载: + 分享 + 查看邀请记录 + 邀请记录 + 总邀请人数: %d + 暂无数据 + 提现记录 + 提现申请 + 编辑银行卡信息 + 86 + 持卡人姓名: + 请输入持卡人姓名 + 国家地区: + 请选择国家地区 + 开户行名称: + 请选择开户行名称 + 银行户口: + 请输入银行卡户口 + (注:请先输入国家区号再选择开户行名称!) + 余额: %s + 总收益: %s + 金额: %s + 请输入提现金额 + 提现申请已提交 + 暂无更多数据 + 通知 + Loading… + 文本 + 图片 + 链接 + + + \ No newline at end of file diff --git a/base_player/src/main/res/values/themes.xml b/base_player/src/main/res/values/themes.xml new file mode 100644 index 0000000..e47899f --- /dev/null +++ b/base_player/src/main/res/values/themes.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/base_player/src/main/res/xml/app_updater_paths.xml b/base_player/src/main/res/xml/app_updater_paths.xml new file mode 100644 index 0000000..1254450 --- /dev/null +++ b/base_player/src/main/res/xml/app_updater_paths.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/base_player/src/main/res/xml/network_security_config.xml b/base_player/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..dca93c0 --- /dev/null +++ b/base_player/src/main/res/xml/network_security_config.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/base_player/src/main/res/xml/provider_paths.xml b/base_player/src/main/res/xml/provider_paths.xml new file mode 100644 index 0000000..c9a897a --- /dev/null +++ b/base_player/src/main/res/xml/provider_paths.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/base_player/src/test/java/Tptogiar/calculcator/ExampleUnitTest.java b/base_player/src/test/java/Tptogiar/calculcator/ExampleUnitTest.java new file mode 100644 index 0000000..3259554 --- /dev/null +++ b/base_player/src/test/java/Tptogiar/calculcator/ExampleUnitTest.java @@ -0,0 +1,35 @@ +package Tptogiar.calculcator; + +import org.junit.Test; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import static org.junit.Assert.*; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see Testing documentation + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() { + assertEquals(4, 2 + 2); + } + + @Test + public void TestPattern(){ +// + Pattern compile = Pattern.compile( "^(\\-|\\+)?\\d+(\\.\\d+)?$"); + String a="+45.5"; + boolean matches = compile.matcher(a).matches(); + System.out.println(matches); + String result = compile.matcher(a).replaceAll(""); + System.out.println(result); + + + } + + +} \ No newline at end of file diff --git a/base_theme/src/main/java/com/web/base/MainActivity2.java b/base_theme/src/main/java/com/web/base/MainActivity2.java index fe5a5ce..bea86fb 100644 --- a/base_theme/src/main/java/com/web/base/MainActivity2.java +++ b/base_theme/src/main/java/com/web/base/MainActivity2.java @@ -84,7 +84,7 @@ public class MainActivity2 extends AppCompatActivity { public WebView webView; TextView tvErrorMsg; LinearLayout layoutError; - ImageView show_top_v; + public ImageView show_top_v; public ImageView showTopV1; private LinearLayout showTopLy; CardView otherApp; @@ -101,13 +101,13 @@ public class MainActivity2 extends AppCompatActivity { CardView ivHome; private View topVvvv; private ProgressBar progressBar; - public static String url = "https://candy916.co/"; + public static String url = ""; //先定义 private static final int REQUEST_EXTERNAL_STORAGE = 1; public static int userId = 2; private int contactApply = 1; - private int notifyApply = 1; + private int notifyApply = 2; private String facebookUrl = ""; private String whatsappUrl = ""; private String telegramUrl = ""; diff --git a/cucislot365/.gitignore b/cucislot365/.gitignore new file mode 100644 index 0000000..956c004 --- /dev/null +++ b/cucislot365/.gitignore @@ -0,0 +1,2 @@ +/build +/release \ No newline at end of file diff --git a/cucislot365/build.gradle b/cucislot365/build.gradle new file mode 100644 index 0000000..7449c9c --- /dev/null +++ b/cucislot365/build.gradle @@ -0,0 +1,80 @@ +plugins { + id 'com.android.application' + id 'com.google.gms.google-services' +} + +android { + compileSdkVersion 31 + buildToolsVersion "30.0.3" + defaultConfig { + applicationId "com.xyz.cucislot365" + minSdkVersion 24 + targetSdkVersion 31 + versionCode rootProject.ext.versionCode + versionName rootProject.ext.versionName + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + 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 JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + applicationVariants.all { variant -> + variant.outputs.all { +// def appName = "meemee99" + def appName = "cucislotjehtjuewrhrrregrgg" + + def outputDir = new File(rootProject.ext.outputPath) + // 创建输出目录 + outputDir.mkdirs() + def outputFileName = "${appName}.apk" + // 设置输出文件名 + setOutputFileName(outputFileName) + // 计算新的输出文件 + def newOutputFile = new File(outputDir, outputFileName) + // 如果新的输出目录不存在,则创建它 + newOutputFile.parentFile.mkdirs() + // 在构建完成后将 APK 复制到新位置 + variant.assemble.doLast { + try { + java.nio.file.Files.copy( + outputFile.toPath(), + newOutputFile.toPath(), + java.nio.file.StandardCopyOption.REPLACE_EXISTING + ) + println "Success to copy APK !!!" + } catch (java.io.IOException e) { + println "Failed to copy APK: ${e.message}" + } + } + } + } + +} + +dependencies { + implementation project(path: ':base_theme') +} \ No newline at end of file diff --git a/cucislot365/google-services.json b/cucislot365/google-services.json new file mode 100644 index 0000000..fb7f241 --- /dev/null +++ b/cucislot365/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "719624001236", + "project_id": "cusl365", + "storage_bucket": "cusl365.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:719624001236:android:56a13fcef8eacbc1a84d41", + "android_client_info": { + "package_name": "com.xyz.cucislot365" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyD8RyUgAzvT9tN0P00dgOq1414c463bKPw" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/cucislot365/justlet.jks b/cucislot365/justlet.jks new file mode 100644 index 0000000..a33b839 Binary files /dev/null and b/cucislot365/justlet.jks differ diff --git a/cucislot365/proguard-rules.pro b/cucislot365/proguard-rules.pro new file mode 100644 index 0000000..107b7ee --- /dev/null +++ b/cucislot365/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/cucislot365/src/androidTest/java/Tptogiar/calculcator/ExampleInstrumentedTest.java b/cucislot365/src/androidTest/java/Tptogiar/calculcator/ExampleInstrumentedTest.java new file mode 100644 index 0000000..44b9f39 --- /dev/null +++ b/cucislot365/src/androidTest/java/Tptogiar/calculcator/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package Tptogiar.calculcator; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("Tptogiar.calculcator", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/cucislot365/src/main/AndroidManifest.xml b/cucislot365/src/main/AndroidManifest.xml new file mode 100644 index 0000000..ad51971 --- /dev/null +++ b/cucislot365/src/main/AndroidManifest.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/cucislot365/src/main/ic_launcher-playstore.png b/cucislot365/src/main/ic_launcher-playstore.png new file mode 100644 index 0000000..6dfc6f7 Binary files /dev/null and b/cucislot365/src/main/ic_launcher-playstore.png differ diff --git a/cucislot365/src/main/java/com/xyz/cucislot365/MainActivity.java b/cucislot365/src/main/java/com/xyz/cucislot365/MainActivity.java new file mode 100644 index 0000000..5477e92 --- /dev/null +++ b/cucislot365/src/main/java/com/xyz/cucislot365/MainActivity.java @@ -0,0 +1,82 @@ +package com.xyz.cucislot365; + +import android.content.pm.PackageInfo; +import android.content.pm.PackageManager; +import android.os.Bundle; +import com.web.base.LogUtils; +import com.web.base.MainActivity2; +import com.google.firebase.messaging.FirebaseMessaging; + +public class MainActivity extends MainActivity2 { + + @Override + protected void onCreate(Bundle savedInstanceState) { + initConfig(); + super.onCreate(savedInstanceState); + initWinwdowLogoConfig(); + registerFCM(); + } + + /** + * 注册FCM + */ + private void registerFCM() { + //订阅主题 + try { + FirebaseMessaging.getInstance().subscribeToTopic("demo") + .addOnCompleteListener(task -> { + String msg = "Subscribed"; + if (!task.isSuccessful()) { + msg = "Subscribe failed"; + } + LogUtils.i("结果:"+msg); + }); + }catch (Exception e){ + e.printStackTrace(); + } + } + + /** + * 用于修改大背景渐变色 不设置 + * 大背景就是 windows_color 的颜色 + * 不要动 都在 app_config.xml中修改 + */ + private void initWinwdowLogoConfig() { + setBackDrawables(R.drawable.big_bg); + setImageView(getString(R.string.is_round).equals("1")); + } + + /** + * 基础配置都在这里 + * 不要动 都在 app_config.xml中修改 + */ + private void initConfig() { + + //===========================以下是APP的配置信息 都写在 app_config.xml中================================== + userId = Integer.parseInt(getString(R.string.userId)); + saveInt(MainActivity.this,"user_code",userId); + saveInt(MainActivity.this,"version_code",getVersion()); + saveString(this, "base_url",getString(R.string.base_url)); + //网页的底部NavigationBar颜色 + saveInt(this, "style_color_int", getColor(R.color.style_color)); + //页面的大背景颜色 + saveInt(this, "windows_color_int", getColor(R.color.windows_color)); + //任务栏的文字颜色 0 黑 1白 默认黑 + saveInt(MainActivity.this,"is_white",Integer.parseInt(getString(R.string.is_white))); + saveInt(MainActivity.this,"hasContact",Integer.parseInt(getString(R.string.has_contact))); + + //===========================以上是APP的配置信息 都写在 app_config.xml中================================== + } + + + public int getVersion(){ + try { + PackageManager packageManager = getPackageManager(); + PackageInfo packageInfo = packageManager.getPackageInfo(getPackageName(), 0); + int versionCode = packageInfo.versionCode; // 版本码 + return versionCode; + } catch (PackageManager.NameNotFoundException e) { + return 0; + } + } +} diff --git a/cucislot365/src/main/java/com/xyz/cucislot365/MyFirebaseMessageingService.java b/cucislot365/src/main/java/com/xyz/cucislot365/MyFirebaseMessageingService.java new file mode 100644 index 0000000..abca498 --- /dev/null +++ b/cucislot365/src/main/java/com/xyz/cucislot365/MyFirebaseMessageingService.java @@ -0,0 +1,125 @@ +package com.xyz.cucislot365; + +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.web.base.GsonUtils; +import com.web.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, MainActivity.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(com.web.base.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(com.web.base.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, MainActivity.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(com.web.base.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(com.web.base.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/cucislot365/src/main/java/com/xyz/cucislot365/WebApplication.java b/cucislot365/src/main/java/com/xyz/cucislot365/WebApplication.java new file mode 100644 index 0000000..a30c9c1 --- /dev/null +++ b/cucislot365/src/main/java/com/xyz/cucislot365/WebApplication.java @@ -0,0 +1,16 @@ +package com.xyz.cucislot365; + +import android.app.Application; +import android.content.Context; + +public class WebApplication extends Application { + + + public static Context application; + @Override + public void onCreate() { + super.onCreate(); +// 设置开启优化方案 + application = this; + } +} diff --git a/cucislot365/src/main/res/drawable/big_bg.xml b/cucislot365/src/main/res/drawable/big_bg.xml new file mode 100644 index 0000000..2e41ced --- /dev/null +++ b/cucislot365/src/main/res/drawable/big_bg.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/cucislot365/src/main/res/mipmap-xxhdpi/app_logo.png b/cucislot365/src/main/res/mipmap-xxhdpi/app_logo.png new file mode 100644 index 0000000..1b34087 Binary files /dev/null and b/cucislot365/src/main/res/mipmap-xxhdpi/app_logo.png differ diff --git a/cucislot365/src/main/res/values-en/strings.xml b/cucislot365/src/main/res/values-en/strings.xml new file mode 100644 index 0000000..7a00b5e --- /dev/null +++ b/cucislot365/src/main/res/values-en/strings.xml @@ -0,0 +1,52 @@ + + + Please Set Your Password + Cancel + Sure + New Version Update + Next Update + Update Immediately + Click to close notification + Click to re-download + Download failed + Click to install + Download completed + Downloading... + Version update + Downloading game + Getting download data... + Version update + Downloading game + Need to turn on mobile phone notification permission + Exit + Setting + Tip + Please enter the invitation code + My invitation code: + Superior invitation code: + Total number of invites: + App download link: + Share + Check Invitation Records + Invitation Records + Total number of invitees: %d + No Data + Withdrawal Record + Withdrawal Application + Edit Bank Card Information + 60 + Name: + Please enter the bank card name + Bank card account: + Please enter the bank card account + Country: + Please select a country + Bank Name: + Please select a bank name + Note: Please enter the country code before selecting the bank name! + Balance: %s + Total Earnings: %s + Amount: %s + Please enter the withdrawal amount + Withdrawal application has been submitted + \ No newline at end of file diff --git a/cucislot365/src/main/res/values-night/themes.xml b/cucislot365/src/main/res/values-night/themes.xml new file mode 100644 index 0000000..3475a91 --- /dev/null +++ b/cucislot365/src/main/res/values-night/themes.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/cucislot365/src/main/res/values/app_config.xml b/cucislot365/src/main/res/values/app_config.xml new file mode 100644 index 0000000..cb75f7b --- /dev/null +++ b/cucislot365/src/main/res/values/app_config.xml @@ -0,0 +1,20 @@ + + + + + CUCISLOT365 + + 242 + + https://cucislot365.com/ + + 0 + + 0 + + 0 + + #1f3681 + + #fdfdfe + \ No newline at end of file diff --git a/cucislot365/src/main/res/values/colors.xml b/cucislot365/src/main/res/values/colors.xml new file mode 100644 index 0000000..a4e1222 --- /dev/null +++ b/cucislot365/src/main/res/values/colors.xml @@ -0,0 +1,16 @@ + + + #FFFFFF + #FFFFFF + #FFFFFF + #FF03DAC5 + #FF018786 + #FF000000 + #FFFFFFFF + #EF4723 + #1251a1 + #2C2C2E + #FFA722 + #434343 + #BCBCBC + \ No newline at end of file diff --git a/cucislot365/src/main/res/values/strings.xml b/cucislot365/src/main/res/values/strings.xml new file mode 100644 index 0000000..0ffb42d --- /dev/null +++ b/cucislot365/src/main/res/values/strings.xml @@ -0,0 +1,53 @@ + + 请输入6位密码 + 取消 + 确定 + 版本更新 + 下次更新 + 立即更新 + 点击关闭通知 + 点击重新下载 + 下载失败 + 点击安装 + 下载完成 + 正在下载… + 版本更新 + 下载游戏中 + 版本更新 + 下载游戏中 + 正在获取下载数据… + 需要打开手机通知权限 + 退出 + 设置 + 提示 + 请输入邀请码 + 我的邀请码: + 上级邀请码: + 总邀请人数: + 邀请您下载: + 分享 + 查看邀请记录 + 邀请记录 + 总邀请人数: %d + 暂无数据 + 提现记录 + 提现申请 + 编辑银行卡信息 + 86 + 持卡人姓名: + 请输入持卡人姓名 + 国家地区: + 请选择国家地区 + 开户行名称: + 请选择开户行名称 + 银行户口: + 请输入银行卡户口 + (注:请先输入国家区号再选择开户行名称!) + 余额: %s + 总收益: %s + 金额: %s + 请输入提现金额 + 提现申请已提交 + + + \ No newline at end of file diff --git a/cucislot365/src/main/res/values/themes.xml b/cucislot365/src/main/res/values/themes.xml new file mode 100644 index 0000000..8947801 --- /dev/null +++ b/cucislot365/src/main/res/values/themes.xml @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/cucislot365/src/main/res/xml/app_updater_paths.xml b/cucislot365/src/main/res/xml/app_updater_paths.xml new file mode 100644 index 0000000..1254450 --- /dev/null +++ b/cucislot365/src/main/res/xml/app_updater_paths.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/cucislot365/src/main/res/xml/network_security_config.xml b/cucislot365/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..dca93c0 --- /dev/null +++ b/cucislot365/src/main/res/xml/network_security_config.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/cucislot365/src/main/res/xml/provider_paths.xml b/cucislot365/src/main/res/xml/provider_paths.xml new file mode 100644 index 0000000..c9a897a --- /dev/null +++ b/cucislot365/src/main/res/xml/provider_paths.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/cucislot365/src/test/java/Tptogiar/calculcator/ExampleUnitTest.java b/cucislot365/src/test/java/Tptogiar/calculcator/ExampleUnitTest.java new file mode 100644 index 0000000..3259554 --- /dev/null +++ b/cucislot365/src/test/java/Tptogiar/calculcator/ExampleUnitTest.java @@ -0,0 +1,35 @@ +package Tptogiar.calculcator; + +import org.junit.Test; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import static org.junit.Assert.*; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see Testing documentation + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() { + assertEquals(4, 2 + 2); + } + + @Test + public void TestPattern(){ +// + Pattern compile = Pattern.compile( "^(\\-|\\+)?\\d+(\\.\\d+)?$"); + String a="+45.5"; + boolean matches = compile.matcher(a).matches(); + System.out.println(matches); + String result = compile.matcher(a).replaceAll(""); + System.out.println(result); + + + } + + +} \ No newline at end of file diff --git a/freecredit66/.gitignore b/freecredit66/.gitignore new file mode 100644 index 0000000..956c004 --- /dev/null +++ b/freecredit66/.gitignore @@ -0,0 +1,2 @@ +/build +/release \ No newline at end of file diff --git a/freecredit66/build.gradle b/freecredit66/build.gradle new file mode 100644 index 0000000..73ca1b4 --- /dev/null +++ b/freecredit66/build.gradle @@ -0,0 +1,80 @@ +plugins { + id 'com.android.application' + id 'com.google.gms.google-services' +} + +android { + compileSdkVersion 31 + buildToolsVersion "30.0.3" + defaultConfig { + applicationId "com.xyz.freecredit66" + minSdkVersion 24 + targetSdkVersion 31 + versionCode rootProject.ext.versionCode + versionName rootProject.ext.versionName + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + 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 JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + applicationVariants.all { variant -> + variant.outputs.all { +// def appName = "meemee99" + def appName = "freecreditjdfjhhrhrrrrggfdjfkgfd" + + def outputDir = new File(rootProject.ext.outputPath) + // 创建输出目录 + outputDir.mkdirs() + def outputFileName = "${appName}.apk" + // 设置输出文件名 + setOutputFileName(outputFileName) + // 计算新的输出文件 + def newOutputFile = new File(outputDir, outputFileName) + // 如果新的输出目录不存在,则创建它 + newOutputFile.parentFile.mkdirs() + // 在构建完成后将 APK 复制到新位置 + variant.assemble.doLast { + try { + java.nio.file.Files.copy( + outputFile.toPath(), + newOutputFile.toPath(), + java.nio.file.StandardCopyOption.REPLACE_EXISTING + ) + println "Success to copy APK !!!" + } catch (java.io.IOException e) { + println "Failed to copy APK: ${e.message}" + } + } + } + } + +} + +dependencies { + implementation project(path: ':base_theme') +} \ No newline at end of file diff --git a/freecredit66/google-services.json b/freecredit66/google-services.json new file mode 100644 index 0000000..ffda452 --- /dev/null +++ b/freecredit66/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "221055460187", + "project_id": "freecredit66-68912", + "storage_bucket": "freecredit66-68912.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:221055460187:android:8b6e01d614f911b692f07e", + "android_client_info": { + "package_name": "com.xyz.freecredit66" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyCSKMrsizglKa7oEz4xMsSc_zaq781Lmro" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/freecredit66/justlet.jks b/freecredit66/justlet.jks new file mode 100644 index 0000000..a33b839 Binary files /dev/null and b/freecredit66/justlet.jks differ diff --git a/freecredit66/proguard-rules.pro b/freecredit66/proguard-rules.pro new file mode 100644 index 0000000..107b7ee --- /dev/null +++ b/freecredit66/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/freecredit66/src/androidTest/java/Tptogiar/calculcator/ExampleInstrumentedTest.java b/freecredit66/src/androidTest/java/Tptogiar/calculcator/ExampleInstrumentedTest.java new file mode 100644 index 0000000..44b9f39 --- /dev/null +++ b/freecredit66/src/androidTest/java/Tptogiar/calculcator/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package Tptogiar.calculcator; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("Tptogiar.calculcator", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/freecredit66/src/main/AndroidManifest.xml b/freecredit66/src/main/AndroidManifest.xml new file mode 100644 index 0000000..20d18b1 --- /dev/null +++ b/freecredit66/src/main/AndroidManifest.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/freecredit66/src/main/ic_launcher-playstore.png b/freecredit66/src/main/ic_launcher-playstore.png new file mode 100644 index 0000000..6dfc6f7 Binary files /dev/null and b/freecredit66/src/main/ic_launcher-playstore.png differ diff --git a/freecredit66/src/main/java/com/xyz/freecredit66/MainActivity.java b/freecredit66/src/main/java/com/xyz/freecredit66/MainActivity.java new file mode 100644 index 0000000..b2caf83 --- /dev/null +++ b/freecredit66/src/main/java/com/xyz/freecredit66/MainActivity.java @@ -0,0 +1,82 @@ +package com.xyz.freecredit66; + +import android.content.pm.PackageInfo; +import android.content.pm.PackageManager; +import android.os.Bundle; +import com.web.base.LogUtils; +import com.web.base.MainActivity2; +import com.google.firebase.messaging.FirebaseMessaging; + +public class MainActivity extends MainActivity2 { + + @Override + protected void onCreate(Bundle savedInstanceState) { + initConfig(); + super.onCreate(savedInstanceState); + initWinwdowLogoConfig(); + registerFCM(); + } + + /** + * 注册FCM + */ + private void registerFCM() { + //订阅主题 + try { + FirebaseMessaging.getInstance().subscribeToTopic("demo") + .addOnCompleteListener(task -> { + String msg = "Subscribed"; + if (!task.isSuccessful()) { + msg = "Subscribe failed"; + } + LogUtils.i("结果:"+msg); + }); + }catch (Exception e){ + e.printStackTrace(); + } + } + + /** + * 用于修改大背景渐变色 不设置 + * 大背景就是 windows_color 的颜色 + * 不要动 都在 app_config.xml中修改 + */ + private void initWinwdowLogoConfig() { + setBackDrawables(R.drawable.big_bg); + setImageView(getString(R.string.is_round).equals("1")); + } + + /** + * 基础配置都在这里 + * 不要动 都在 app_config.xml中修改 + */ + private void initConfig() { + + //===========================以下是APP的配置信息 都写在 app_config.xml中================================== + userId = Integer.parseInt(getString(R.string.userId)); + saveInt(MainActivity.this,"user_code",userId); + saveInt(MainActivity.this,"version_code",getVersion()); + saveString(this, "base_url",getString(R.string.base_url)); + //网页的底部NavigationBar颜色 + saveInt(this, "style_color_int", getColor(R.color.style_color)); + //页面的大背景颜色 + saveInt(this, "windows_color_int", getColor(R.color.windows_color)); + //任务栏的文字颜色 0 黑 1白 默认黑 + saveInt(MainActivity.this,"is_white",Integer.parseInt(getString(R.string.is_white))); + saveInt(MainActivity.this,"hasContact",Integer.parseInt(getString(R.string.has_contact))); + + //===========================以上是APP的配置信息 都写在 app_config.xml中================================== + } + + + public int getVersion(){ + try { + PackageManager packageManager = getPackageManager(); + PackageInfo packageInfo = packageManager.getPackageInfo(getPackageName(), 0); + int versionCode = packageInfo.versionCode; // 版本码 + return versionCode; + } catch (PackageManager.NameNotFoundException e) { + return 0; + } + } +} diff --git a/freecredit66/src/main/java/com/xyz/freecredit66/MyFirebaseMessageingService.java b/freecredit66/src/main/java/com/xyz/freecredit66/MyFirebaseMessageingService.java new file mode 100644 index 0000000..10c7fa7 --- /dev/null +++ b/freecredit66/src/main/java/com/xyz/freecredit66/MyFirebaseMessageingService.java @@ -0,0 +1,125 @@ +package com.xyz.freecredit66; + +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.web.base.GsonUtils; +import com.web.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, MainActivity.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(com.web.base.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(com.web.base.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, MainActivity.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(com.web.base.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(com.web.base.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/freecredit66/src/main/java/com/xyz/freecredit66/WebApplication.java b/freecredit66/src/main/java/com/xyz/freecredit66/WebApplication.java new file mode 100644 index 0000000..988df09 --- /dev/null +++ b/freecredit66/src/main/java/com/xyz/freecredit66/WebApplication.java @@ -0,0 +1,16 @@ +package com.xyz.freecredit66; + +import android.app.Application; +import android.content.Context; + +public class WebApplication extends Application { + + + public static Context application; + @Override + public void onCreate() { + super.onCreate(); +// 设置开启优化方案 + application = this; + } +} diff --git a/freecredit66/src/main/res/drawable/big_bg.xml b/freecredit66/src/main/res/drawable/big_bg.xml new file mode 100644 index 0000000..2e41ced --- /dev/null +++ b/freecredit66/src/main/res/drawable/big_bg.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/freecredit66/src/main/res/mipmap-xxhdpi/app_logo.png b/freecredit66/src/main/res/mipmap-xxhdpi/app_logo.png new file mode 100644 index 0000000..c1064e5 Binary files /dev/null and b/freecredit66/src/main/res/mipmap-xxhdpi/app_logo.png differ diff --git a/freecredit66/src/main/res/values-en/strings.xml b/freecredit66/src/main/res/values-en/strings.xml new file mode 100644 index 0000000..7a00b5e --- /dev/null +++ b/freecredit66/src/main/res/values-en/strings.xml @@ -0,0 +1,52 @@ + + + Please Set Your Password + Cancel + Sure + New Version Update + Next Update + Update Immediately + Click to close notification + Click to re-download + Download failed + Click to install + Download completed + Downloading... + Version update + Downloading game + Getting download data... + Version update + Downloading game + Need to turn on mobile phone notification permission + Exit + Setting + Tip + Please enter the invitation code + My invitation code: + Superior invitation code: + Total number of invites: + App download link: + Share + Check Invitation Records + Invitation Records + Total number of invitees: %d + No Data + Withdrawal Record + Withdrawal Application + Edit Bank Card Information + 60 + Name: + Please enter the bank card name + Bank card account: + Please enter the bank card account + Country: + Please select a country + Bank Name: + Please select a bank name + Note: Please enter the country code before selecting the bank name! + Balance: %s + Total Earnings: %s + Amount: %s + Please enter the withdrawal amount + Withdrawal application has been submitted + \ No newline at end of file diff --git a/freecredit66/src/main/res/values-night/themes.xml b/freecredit66/src/main/res/values-night/themes.xml new file mode 100644 index 0000000..3475a91 --- /dev/null +++ b/freecredit66/src/main/res/values-night/themes.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/freecredit66/src/main/res/values/app_config.xml b/freecredit66/src/main/res/values/app_config.xml new file mode 100644 index 0000000..d51c105 --- /dev/null +++ b/freecredit66/src/main/res/values/app_config.xml @@ -0,0 +1,20 @@ + + + + + FREECREDIT66 + + 243 + + https://freecredit66.com/ + + 1 + + 0 + + 0 + + #393939 + + #040404 + \ No newline at end of file diff --git a/freecredit66/src/main/res/values/colors.xml b/freecredit66/src/main/res/values/colors.xml new file mode 100644 index 0000000..a4e1222 --- /dev/null +++ b/freecredit66/src/main/res/values/colors.xml @@ -0,0 +1,16 @@ + + + #FFFFFF + #FFFFFF + #FFFFFF + #FF03DAC5 + #FF018786 + #FF000000 + #FFFFFFFF + #EF4723 + #1251a1 + #2C2C2E + #FFA722 + #434343 + #BCBCBC + \ No newline at end of file diff --git a/freecredit66/src/main/res/values/strings.xml b/freecredit66/src/main/res/values/strings.xml new file mode 100644 index 0000000..0ffb42d --- /dev/null +++ b/freecredit66/src/main/res/values/strings.xml @@ -0,0 +1,53 @@ + + 请输入6位密码 + 取消 + 确定 + 版本更新 + 下次更新 + 立即更新 + 点击关闭通知 + 点击重新下载 + 下载失败 + 点击安装 + 下载完成 + 正在下载… + 版本更新 + 下载游戏中 + 版本更新 + 下载游戏中 + 正在获取下载数据… + 需要打开手机通知权限 + 退出 + 设置 + 提示 + 请输入邀请码 + 我的邀请码: + 上级邀请码: + 总邀请人数: + 邀请您下载: + 分享 + 查看邀请记录 + 邀请记录 + 总邀请人数: %d + 暂无数据 + 提现记录 + 提现申请 + 编辑银行卡信息 + 86 + 持卡人姓名: + 请输入持卡人姓名 + 国家地区: + 请选择国家地区 + 开户行名称: + 请选择开户行名称 + 银行户口: + 请输入银行卡户口 + (注:请先输入国家区号再选择开户行名称!) + 余额: %s + 总收益: %s + 金额: %s + 请输入提现金额 + 提现申请已提交 + + + \ No newline at end of file diff --git a/freecredit66/src/main/res/values/themes.xml b/freecredit66/src/main/res/values/themes.xml new file mode 100644 index 0000000..8947801 --- /dev/null +++ b/freecredit66/src/main/res/values/themes.xml @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/freecredit66/src/main/res/xml/app_updater_paths.xml b/freecredit66/src/main/res/xml/app_updater_paths.xml new file mode 100644 index 0000000..1254450 --- /dev/null +++ b/freecredit66/src/main/res/xml/app_updater_paths.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/freecredit66/src/main/res/xml/network_security_config.xml b/freecredit66/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..dca93c0 --- /dev/null +++ b/freecredit66/src/main/res/xml/network_security_config.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/freecredit66/src/main/res/xml/provider_paths.xml b/freecredit66/src/main/res/xml/provider_paths.xml new file mode 100644 index 0000000..c9a897a --- /dev/null +++ b/freecredit66/src/main/res/xml/provider_paths.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/freecredit66/src/test/java/Tptogiar/calculcator/ExampleUnitTest.java b/freecredit66/src/test/java/Tptogiar/calculcator/ExampleUnitTest.java new file mode 100644 index 0000000..3259554 --- /dev/null +++ b/freecredit66/src/test/java/Tptogiar/calculcator/ExampleUnitTest.java @@ -0,0 +1,35 @@ +package Tptogiar.calculcator; + +import org.junit.Test; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import static org.junit.Assert.*; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see Testing documentation + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() { + assertEquals(4, 2 + 2); + } + + @Test + public void TestPattern(){ +// + Pattern compile = Pattern.compile( "^(\\-|\\+)?\\d+(\\.\\d+)?$"); + String a="+45.5"; + boolean matches = compile.matcher(a).matches(); + System.out.println(matches); + String result = compile.matcher(a).replaceAll(""); + System.out.println(result); + + + } + + +} \ No newline at end of file diff --git a/ironman98/.gitignore b/ironman98/.gitignore new file mode 100644 index 0000000..956c004 --- /dev/null +++ b/ironman98/.gitignore @@ -0,0 +1,2 @@ +/build +/release \ No newline at end of file diff --git a/ironman98/build.gradle b/ironman98/build.gradle new file mode 100644 index 0000000..ff0793d --- /dev/null +++ b/ironman98/build.gradle @@ -0,0 +1,80 @@ +plugins { + id 'com.android.application' + id 'com.google.gms.google-services' +} + +android { + compileSdkVersion 31 + buildToolsVersion "30.0.3" + defaultConfig { + applicationId "com.xyz.ironman98" + minSdkVersion 24 + targetSdkVersion 31 + versionCode rootProject.ext.versionCode + versionName rootProject.ext.versionName + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + 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 JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + applicationVariants.all { variant -> + variant.outputs.all { +// def appName = "meemee99" + def appName = "ironman98dfgdfhdfhgdfhdhd" + + def outputDir = new File(rootProject.ext.outputPath) + // 创建输出目录 + outputDir.mkdirs() + def outputFileName = "${appName}.apk" + // 设置输出文件名 + setOutputFileName(outputFileName) + // 计算新的输出文件 + def newOutputFile = new File(outputDir, outputFileName) + // 如果新的输出目录不存在,则创建它 + newOutputFile.parentFile.mkdirs() + // 在构建完成后将 APK 复制到新位置 + variant.assemble.doLast { + try { + java.nio.file.Files.copy( + outputFile.toPath(), + newOutputFile.toPath(), + java.nio.file.StandardCopyOption.REPLACE_EXISTING + ) + println "Success to copy APK !!!" + } catch (java.io.IOException e) { + println "Failed to copy APK: ${e.message}" + } + } + } + } + +} + +dependencies { + implementation project(path: ':base_theme') +} \ No newline at end of file diff --git a/ironman98/google-services.json b/ironman98/google-services.json new file mode 100644 index 0000000..b19595f --- /dev/null +++ b/ironman98/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "300382353279", + "project_id": "ironman98", + "storage_bucket": "ironman98.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:300382353279:android:e60248efabfd2b97af4c4a", + "android_client_info": { + "package_name": "com.xyz.ironman98" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyCO-T_8eO8h2GKdvhJ129KZJRkB77Pg3ps" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/ironman98/justlet.jks b/ironman98/justlet.jks new file mode 100644 index 0000000..a33b839 Binary files /dev/null and b/ironman98/justlet.jks differ diff --git a/ironman98/proguard-rules.pro b/ironman98/proguard-rules.pro new file mode 100644 index 0000000..107b7ee --- /dev/null +++ b/ironman98/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/ironman98/src/androidTest/java/Tptogiar/calculcator/ExampleInstrumentedTest.java b/ironman98/src/androidTest/java/Tptogiar/calculcator/ExampleInstrumentedTest.java new file mode 100644 index 0000000..44b9f39 --- /dev/null +++ b/ironman98/src/androidTest/java/Tptogiar/calculcator/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package Tptogiar.calculcator; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("Tptogiar.calculcator", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/ironman98/src/main/AndroidManifest.xml b/ironman98/src/main/AndroidManifest.xml new file mode 100644 index 0000000..432add1 --- /dev/null +++ b/ironman98/src/main/AndroidManifest.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ironman98/src/main/ic_launcher-playstore.png b/ironman98/src/main/ic_launcher-playstore.png new file mode 100644 index 0000000..6dfc6f7 Binary files /dev/null and b/ironman98/src/main/ic_launcher-playstore.png differ diff --git a/ironman98/src/main/java/com/xyz/ironman98/MainActivity.java b/ironman98/src/main/java/com/xyz/ironman98/MainActivity.java new file mode 100644 index 0000000..421cf57 --- /dev/null +++ b/ironman98/src/main/java/com/xyz/ironman98/MainActivity.java @@ -0,0 +1,82 @@ +package com.xyz.ironman98; + +import android.content.pm.PackageInfo; +import android.content.pm.PackageManager; +import android.os.Bundle; +import com.web.base.LogUtils; +import com.web.base.MainActivity2; +import com.google.firebase.messaging.FirebaseMessaging; + +public class MainActivity extends MainActivity2 { + + @Override + protected void onCreate(Bundle savedInstanceState) { + initConfig(); + super.onCreate(savedInstanceState); + initWinwdowLogoConfig(); + registerFCM(); + } + + /** + * 注册FCM + */ + private void registerFCM() { + //订阅主题 + try { + FirebaseMessaging.getInstance().subscribeToTopic("demo") + .addOnCompleteListener(task -> { + String msg = "Subscribed"; + if (!task.isSuccessful()) { + msg = "Subscribe failed"; + } + LogUtils.i("结果:"+msg); + }); + }catch (Exception e){ + e.printStackTrace(); + } + } + + /** + * 用于修改大背景渐变色 不设置 + * 大背景就是 windows_color 的颜色 + * 不要动 都在 app_config.xml中修改 + */ + private void initWinwdowLogoConfig() { + setBackDrawables(R.drawable.big_bg); + setImageView(getString(R.string.is_round).equals("1")); + } + + /** + * 基础配置都在这里 + * 不要动 都在 app_config.xml中修改 + */ + private void initConfig() { + + //===========================以下是APP的配置信息 都写在 app_config.xml中================================== + userId = Integer.parseInt(getString(R.string.userId)); + saveInt(MainActivity.this,"user_code",userId); + saveInt(MainActivity.this,"version_code",getVersion()); + saveString(this, "base_url",getString(R.string.base_url)); + //网页的底部NavigationBar颜色 + saveInt(this, "style_color_int", getColor(R.color.style_color)); + //页面的大背景颜色 + saveInt(this, "windows_color_int", getColor(R.color.windows_color)); + //任务栏的文字颜色 0 黑 1白 默认黑 + saveInt(MainActivity.this,"is_white",Integer.parseInt(getString(R.string.is_white))); + saveInt(MainActivity.this,"hasContact",Integer.parseInt(getString(R.string.has_contact))); + + //===========================以上是APP的配置信息 都写在 app_config.xml中================================== + } + + + public int getVersion(){ + try { + PackageManager packageManager = getPackageManager(); + PackageInfo packageInfo = packageManager.getPackageInfo(getPackageName(), 0); + int versionCode = packageInfo.versionCode; // 版本码 + return versionCode; + } catch (PackageManager.NameNotFoundException e) { + return 0; + } + } +} diff --git a/ironman98/src/main/java/com/xyz/ironman98/MyFirebaseMessageingService.java b/ironman98/src/main/java/com/xyz/ironman98/MyFirebaseMessageingService.java new file mode 100644 index 0000000..e262995 --- /dev/null +++ b/ironman98/src/main/java/com/xyz/ironman98/MyFirebaseMessageingService.java @@ -0,0 +1,125 @@ +package com.xyz.ironman98; + +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.web.base.GsonUtils; +import com.web.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, MainActivity.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(com.web.base.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(com.web.base.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, MainActivity.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(com.web.base.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(com.web.base.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/ironman98/src/main/java/com/xyz/ironman98/WebApplication.java b/ironman98/src/main/java/com/xyz/ironman98/WebApplication.java new file mode 100644 index 0000000..016a5c0 --- /dev/null +++ b/ironman98/src/main/java/com/xyz/ironman98/WebApplication.java @@ -0,0 +1,16 @@ +package com.xyz.ironman98; + +import android.app.Application; +import android.content.Context; + +public class WebApplication extends Application { + + + public static Context application; + @Override + public void onCreate() { + super.onCreate(); +// 设置开启优化方案 + application = this; + } +} diff --git a/ironman98/src/main/res/drawable/big_bg.xml b/ironman98/src/main/res/drawable/big_bg.xml new file mode 100644 index 0000000..2e41ced --- /dev/null +++ b/ironman98/src/main/res/drawable/big_bg.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/ironman98/src/main/res/mipmap-xxhdpi/app_logo.png b/ironman98/src/main/res/mipmap-xxhdpi/app_logo.png new file mode 100644 index 0000000..53af454 Binary files /dev/null and b/ironman98/src/main/res/mipmap-xxhdpi/app_logo.png differ diff --git a/ironman98/src/main/res/mipmap-xxhdpi/ironman98.jpg b/ironman98/src/main/res/mipmap-xxhdpi/ironman98.jpg new file mode 100644 index 0000000..f24cc96 Binary files /dev/null and b/ironman98/src/main/res/mipmap-xxhdpi/ironman98.jpg differ diff --git a/ironman98/src/main/res/values-en/strings.xml b/ironman98/src/main/res/values-en/strings.xml new file mode 100644 index 0000000..7a00b5e --- /dev/null +++ b/ironman98/src/main/res/values-en/strings.xml @@ -0,0 +1,52 @@ + + + Please Set Your Password + Cancel + Sure + New Version Update + Next Update + Update Immediately + Click to close notification + Click to re-download + Download failed + Click to install + Download completed + Downloading... + Version update + Downloading game + Getting download data... + Version update + Downloading game + Need to turn on mobile phone notification permission + Exit + Setting + Tip + Please enter the invitation code + My invitation code: + Superior invitation code: + Total number of invites: + App download link: + Share + Check Invitation Records + Invitation Records + Total number of invitees: %d + No Data + Withdrawal Record + Withdrawal Application + Edit Bank Card Information + 60 + Name: + Please enter the bank card name + Bank card account: + Please enter the bank card account + Country: + Please select a country + Bank Name: + Please select a bank name + Note: Please enter the country code before selecting the bank name! + Balance: %s + Total Earnings: %s + Amount: %s + Please enter the withdrawal amount + Withdrawal application has been submitted + \ No newline at end of file diff --git a/ironman98/src/main/res/values-night/themes.xml b/ironman98/src/main/res/values-night/themes.xml new file mode 100644 index 0000000..3475a91 --- /dev/null +++ b/ironman98/src/main/res/values-night/themes.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ironman98/src/main/res/values/app_config.xml b/ironman98/src/main/res/values/app_config.xml new file mode 100644 index 0000000..dce9bfd --- /dev/null +++ b/ironman98/src/main/res/values/app_config.xml @@ -0,0 +1,20 @@ + + + + + IRONMAN98 + + 246 + + https://ironman98.live/ + + 1 + + 0 + + 0 + + #7b0100 + + #6f0000 + \ No newline at end of file diff --git a/ironman98/src/main/res/values/colors.xml b/ironman98/src/main/res/values/colors.xml new file mode 100644 index 0000000..a4e1222 --- /dev/null +++ b/ironman98/src/main/res/values/colors.xml @@ -0,0 +1,16 @@ + + + #FFFFFF + #FFFFFF + #FFFFFF + #FF03DAC5 + #FF018786 + #FF000000 + #FFFFFFFF + #EF4723 + #1251a1 + #2C2C2E + #FFA722 + #434343 + #BCBCBC + \ No newline at end of file diff --git a/ironman98/src/main/res/values/strings.xml b/ironman98/src/main/res/values/strings.xml new file mode 100644 index 0000000..0ffb42d --- /dev/null +++ b/ironman98/src/main/res/values/strings.xml @@ -0,0 +1,53 @@ + + 请输入6位密码 + 取消 + 确定 + 版本更新 + 下次更新 + 立即更新 + 点击关闭通知 + 点击重新下载 + 下载失败 + 点击安装 + 下载完成 + 正在下载… + 版本更新 + 下载游戏中 + 版本更新 + 下载游戏中 + 正在获取下载数据… + 需要打开手机通知权限 + 退出 + 设置 + 提示 + 请输入邀请码 + 我的邀请码: + 上级邀请码: + 总邀请人数: + 邀请您下载: + 分享 + 查看邀请记录 + 邀请记录 + 总邀请人数: %d + 暂无数据 + 提现记录 + 提现申请 + 编辑银行卡信息 + 86 + 持卡人姓名: + 请输入持卡人姓名 + 国家地区: + 请选择国家地区 + 开户行名称: + 请选择开户行名称 + 银行户口: + 请输入银行卡户口 + (注:请先输入国家区号再选择开户行名称!) + 余额: %s + 总收益: %s + 金额: %s + 请输入提现金额 + 提现申请已提交 + + + \ No newline at end of file diff --git a/ironman98/src/main/res/values/themes.xml b/ironman98/src/main/res/values/themes.xml new file mode 100644 index 0000000..8947801 --- /dev/null +++ b/ironman98/src/main/res/values/themes.xml @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ironman98/src/main/res/xml/app_updater_paths.xml b/ironman98/src/main/res/xml/app_updater_paths.xml new file mode 100644 index 0000000..1254450 --- /dev/null +++ b/ironman98/src/main/res/xml/app_updater_paths.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/ironman98/src/main/res/xml/network_security_config.xml b/ironman98/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..dca93c0 --- /dev/null +++ b/ironman98/src/main/res/xml/network_security_config.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ironman98/src/main/res/xml/provider_paths.xml b/ironman98/src/main/res/xml/provider_paths.xml new file mode 100644 index 0000000..c9a897a --- /dev/null +++ b/ironman98/src/main/res/xml/provider_paths.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/ironman98/src/test/java/Tptogiar/calculcator/ExampleUnitTest.java b/ironman98/src/test/java/Tptogiar/calculcator/ExampleUnitTest.java new file mode 100644 index 0000000..3259554 --- /dev/null +++ b/ironman98/src/test/java/Tptogiar/calculcator/ExampleUnitTest.java @@ -0,0 +1,35 @@ +package Tptogiar.calculcator; + +import org.junit.Test; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import static org.junit.Assert.*; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see Testing documentation + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() { + assertEquals(4, 2 + 2); + } + + @Test + public void TestPattern(){ +// + Pattern compile = Pattern.compile( "^(\\-|\\+)?\\d+(\\.\\d+)?$"); + String a="+45.5"; + boolean matches = compile.matcher(a).matches(); + System.out.println(matches); + String result = compile.matcher(a).replaceAll(""); + System.out.println(result); + + + } + + +} \ No newline at end of file diff --git a/jhs/.gitignore b/jhs/.gitignore new file mode 100644 index 0000000..956c004 --- /dev/null +++ b/jhs/.gitignore @@ -0,0 +1,2 @@ +/build +/release \ No newline at end of file diff --git a/jhs/build.gradle b/jhs/build.gradle new file mode 100644 index 0000000..9f6ac6a --- /dev/null +++ b/jhs/build.gradle @@ -0,0 +1,79 @@ +plugins { + id 'com.android.application' +} + +android { + compileSdkVersion 31 + buildToolsVersion "30.0.3" + defaultConfig { + applicationId "com.xyz.jhs" + minSdkVersion 24 + targetSdkVersion 31 + versionCode rootProject.ext.versionCode + versionName rootProject.ext.versionName + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + 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 JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + applicationVariants.all { variant -> + variant.outputs.all { +// def appName = "meemee99" + def appName = "1xauddgdskgjhggfddhgfdf" + + def outputDir = new File(rootProject.ext.outputPath) + // 创建输出目录 + outputDir.mkdirs() + def outputFileName = "${appName}.apk" + // 设置输出文件名 + setOutputFileName(outputFileName) + // 计算新的输出文件 + def newOutputFile = new File(outputDir, outputFileName) + // 如果新的输出目录不存在,则创建它 + newOutputFile.parentFile.mkdirs() + // 在构建完成后将 APK 复制到新位置 + variant.assemble.doLast { + try { + java.nio.file.Files.copy( + outputFile.toPath(), + newOutputFile.toPath(), + java.nio.file.StandardCopyOption.REPLACE_EXISTING + ) + println "Success to copy APK !!!" + } catch (java.io.IOException e) { + println "Failed to copy APK: ${e.message}" + } + } + } + } + +} + +dependencies { + implementation project(path: ':base_player') +} \ No newline at end of file diff --git a/jhs/justlet.jks b/jhs/justlet.jks new file mode 100644 index 0000000..a33b839 Binary files /dev/null and b/jhs/justlet.jks differ diff --git a/jhs/proguard-rules.pro b/jhs/proguard-rules.pro new file mode 100644 index 0000000..107b7ee --- /dev/null +++ b/jhs/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/jhs/src/androidTest/java/Tptogiar/calculcator/ExampleInstrumentedTest.java b/jhs/src/androidTest/java/Tptogiar/calculcator/ExampleInstrumentedTest.java new file mode 100644 index 0000000..44b9f39 --- /dev/null +++ b/jhs/src/androidTest/java/Tptogiar/calculcator/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package Tptogiar.calculcator; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("Tptogiar.calculcator", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/jhs/src/main/AndroidManifest.xml b/jhs/src/main/AndroidManifest.xml new file mode 100644 index 0000000..6d055b2 --- /dev/null +++ b/jhs/src/main/AndroidManifest.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/jhs/src/main/ic_launcher-playstore.png b/jhs/src/main/ic_launcher-playstore.png new file mode 100644 index 0000000..f29cfb3 Binary files /dev/null and b/jhs/src/main/ic_launcher-playstore.png differ diff --git a/jhs/src/main/java/com/xyz/jhs/MainActivity.java b/jhs/src/main/java/com/xyz/jhs/MainActivity.java new file mode 100644 index 0000000..2339252 --- /dev/null +++ b/jhs/src/main/java/com/xyz/jhs/MainActivity.java @@ -0,0 +1,61 @@ +package com.xyz.jhs; + +import android.content.pm.PackageInfo; +import android.content.pm.PackageManager; +import android.os.Bundle; +import com.web.base.MainActivity2; + +public class MainActivity extends MainActivity2 { + + @Override + protected void onCreate(Bundle savedInstanceState) { + initConfig(); + super.onCreate(savedInstanceState); + initWinwdowLogoConfig(); + } + + + /** + * 用于修改大背景渐变色 不设置 + * 大背景就是 windows_color 的颜色 + * 不要动 都在 app_config.xml中修改 + */ + private void initWinwdowLogoConfig() { + setBackDrawables(R.drawable.big_bg); + setImageView(getString(R.string.is_round).equals("1")); + show_top_v.setImageResource(R.mipmap.ic_launcher_round); + showTopV1.setImageResource(R.mipmap.ic_launcher_round); + } + + /** + * 基础配置都在这里 + * 不要动 都在 app_config.xml中修改 + */ + private void initConfig() { + + //===========================以下是APP的配置信息 都写在 app_config.xml中================================== + saveInt(MainActivity.this,"version_code",getVersion()); + saveString(this, "base_url",getString(R.string.base_url)); + //网页的底部NavigationBar颜色 + saveInt(this, "style_color_int", getColor(R.color.style_color)); + //页面的大背景颜色 + saveInt(this, "windows_color_int", getColor(R.color.windows_color)); + //任务栏的文字颜色 0 黑 1白 默认黑 + saveInt(MainActivity.this,"is_white",Integer.parseInt(getString(R.string.is_white))); + saveInt(MainActivity.this,"hasContact",Integer.parseInt(getString(R.string.has_contact))); + + //===========================以上是APP的配置信息 都写在 app_config.xml中================================== + } + + + public int getVersion(){ + try { + PackageManager packageManager = getPackageManager(); + PackageInfo packageInfo = packageManager.getPackageInfo(getPackageName(), 0); + int versionCode = packageInfo.versionCode; // 版本码 + return versionCode; + } catch (PackageManager.NameNotFoundException e) { + return 0; + } + } +} diff --git a/jhs/src/main/java/com/xyz/jhs/WebApplication.java b/jhs/src/main/java/com/xyz/jhs/WebApplication.java new file mode 100644 index 0000000..eb9686a --- /dev/null +++ b/jhs/src/main/java/com/xyz/jhs/WebApplication.java @@ -0,0 +1,16 @@ +package com.xyz.jhs; + +import android.app.Application; +import android.content.Context; + +public class WebApplication extends Application { + + + public static Context application; + @Override + public void onCreate() { + super.onCreate(); +// 设置开启优化方案 + application = this; + } +} diff --git a/jhs/src/main/res/drawable/big_bg.xml b/jhs/src/main/res/drawable/big_bg.xml new file mode 100644 index 0000000..2e41ced --- /dev/null +++ b/jhs/src/main/res/drawable/big_bg.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/jhs/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/jhs/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000..036d09b --- /dev/null +++ b/jhs/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jhs/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/jhs/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000..036d09b --- /dev/null +++ b/jhs/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jhs/src/main/res/mipmap-hdpi/ic_launcher.webp b/jhs/src/main/res/mipmap-hdpi/ic_launcher.webp new file mode 100644 index 0000000..cb00ddd Binary files /dev/null and b/jhs/src/main/res/mipmap-hdpi/ic_launcher.webp differ diff --git a/jhs/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp b/jhs/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp new file mode 100644 index 0000000..df4b47f Binary files /dev/null and b/jhs/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp differ diff --git a/jhs/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/jhs/src/main/res/mipmap-hdpi/ic_launcher_round.webp new file mode 100644 index 0000000..689f4be Binary files /dev/null and b/jhs/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ diff --git a/jhs/src/main/res/mipmap-mdpi/ic_launcher.webp b/jhs/src/main/res/mipmap-mdpi/ic_launcher.webp new file mode 100644 index 0000000..2406e31 Binary files /dev/null and b/jhs/src/main/res/mipmap-mdpi/ic_launcher.webp differ diff --git a/jhs/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp b/jhs/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp new file mode 100644 index 0000000..44de52e Binary files /dev/null and b/jhs/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp differ diff --git a/jhs/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/jhs/src/main/res/mipmap-mdpi/ic_launcher_round.webp new file mode 100644 index 0000000..29acdd4 Binary files /dev/null and b/jhs/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ diff --git a/jhs/src/main/res/mipmap-xhdpi/ic_launcher.webp b/jhs/src/main/res/mipmap-xhdpi/ic_launcher.webp new file mode 100644 index 0000000..03fa24f Binary files /dev/null and b/jhs/src/main/res/mipmap-xhdpi/ic_launcher.webp differ diff --git a/jhs/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp b/jhs/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp new file mode 100644 index 0000000..81e3bdc Binary files /dev/null and b/jhs/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp differ diff --git a/jhs/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/jhs/src/main/res/mipmap-xhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..6667d04 Binary files /dev/null and b/jhs/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ diff --git a/jhs/src/main/res/mipmap-xxhdpi/app_logo.png b/jhs/src/main/res/mipmap-xxhdpi/app_logo.png new file mode 100644 index 0000000..f4db0e9 Binary files /dev/null and b/jhs/src/main/res/mipmap-xxhdpi/app_logo.png differ diff --git a/jhs/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/jhs/src/main/res/mipmap-xxhdpi/ic_launcher.webp new file mode 100644 index 0000000..a9bd04c Binary files /dev/null and b/jhs/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ diff --git a/jhs/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp b/jhs/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp new file mode 100644 index 0000000..861454b Binary files /dev/null and b/jhs/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp differ diff --git a/jhs/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/jhs/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..d0281aa Binary files /dev/null and b/jhs/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ diff --git a/jhs/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/jhs/src/main/res/mipmap-xxxhdpi/ic_launcher.webp new file mode 100644 index 0000000..5cd11d8 Binary files /dev/null and b/jhs/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ diff --git a/jhs/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp b/jhs/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp new file mode 100644 index 0000000..6a81e61 Binary files /dev/null and b/jhs/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp differ diff --git a/jhs/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/jhs/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..6d9532c Binary files /dev/null and b/jhs/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ diff --git a/jhs/src/main/res/values-en/strings.xml b/jhs/src/main/res/values-en/strings.xml new file mode 100644 index 0000000..7a00b5e --- /dev/null +++ b/jhs/src/main/res/values-en/strings.xml @@ -0,0 +1,52 @@ + + + Please Set Your Password + Cancel + Sure + New Version Update + Next Update + Update Immediately + Click to close notification + Click to re-download + Download failed + Click to install + Download completed + Downloading... + Version update + Downloading game + Getting download data... + Version update + Downloading game + Need to turn on mobile phone notification permission + Exit + Setting + Tip + Please enter the invitation code + My invitation code: + Superior invitation code: + Total number of invites: + App download link: + Share + Check Invitation Records + Invitation Records + Total number of invitees: %d + No Data + Withdrawal Record + Withdrawal Application + Edit Bank Card Information + 60 + Name: + Please enter the bank card name + Bank card account: + Please enter the bank card account + Country: + Please select a country + Bank Name: + Please select a bank name + Note: Please enter the country code before selecting the bank name! + Balance: %s + Total Earnings: %s + Amount: %s + Please enter the withdrawal amount + Withdrawal application has been submitted + \ No newline at end of file diff --git a/jhs/src/main/res/values-night/themes.xml b/jhs/src/main/res/values-night/themes.xml new file mode 100644 index 0000000..3475a91 --- /dev/null +++ b/jhs/src/main/res/values-night/themes.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/jhs/src/main/res/values/app_config.xml b/jhs/src/main/res/values/app_config.xml new file mode 100644 index 0000000..95fcc97 --- /dev/null +++ b/jhs/src/main/res/values/app_config.xml @@ -0,0 +1,20 @@ + + + + + 鉴黄师 + + 9999 + + https://www.javrate.com/ + + 1 + + 1 + + 0 + + #121418 + + #32353c + \ No newline at end of file diff --git a/jhs/src/main/res/values/colors.xml b/jhs/src/main/res/values/colors.xml new file mode 100644 index 0000000..a4e1222 --- /dev/null +++ b/jhs/src/main/res/values/colors.xml @@ -0,0 +1,16 @@ + + + #FFFFFF + #FFFFFF + #FFFFFF + #FF03DAC5 + #FF018786 + #FF000000 + #FFFFFFFF + #EF4723 + #1251a1 + #2C2C2E + #FFA722 + #434343 + #BCBCBC + \ No newline at end of file diff --git a/jhs/src/main/res/values/ic_launcher_background.xml b/jhs/src/main/res/values/ic_launcher_background.xml new file mode 100644 index 0000000..1d6c441 --- /dev/null +++ b/jhs/src/main/res/values/ic_launcher_background.xml @@ -0,0 +1,4 @@ + + + #F7C800 + \ No newline at end of file diff --git a/jhs/src/main/res/values/strings.xml b/jhs/src/main/res/values/strings.xml new file mode 100644 index 0000000..0ffb42d --- /dev/null +++ b/jhs/src/main/res/values/strings.xml @@ -0,0 +1,53 @@ + + 请输入6位密码 + 取消 + 确定 + 版本更新 + 下次更新 + 立即更新 + 点击关闭通知 + 点击重新下载 + 下载失败 + 点击安装 + 下载完成 + 正在下载… + 版本更新 + 下载游戏中 + 版本更新 + 下载游戏中 + 正在获取下载数据… + 需要打开手机通知权限 + 退出 + 设置 + 提示 + 请输入邀请码 + 我的邀请码: + 上级邀请码: + 总邀请人数: + 邀请您下载: + 分享 + 查看邀请记录 + 邀请记录 + 总邀请人数: %d + 暂无数据 + 提现记录 + 提现申请 + 编辑银行卡信息 + 86 + 持卡人姓名: + 请输入持卡人姓名 + 国家地区: + 请选择国家地区 + 开户行名称: + 请选择开户行名称 + 银行户口: + 请输入银行卡户口 + (注:请先输入国家区号再选择开户行名称!) + 余额: %s + 总收益: %s + 金额: %s + 请输入提现金额 + 提现申请已提交 + + + \ No newline at end of file diff --git a/jhs/src/main/res/values/themes.xml b/jhs/src/main/res/values/themes.xml new file mode 100644 index 0000000..8947801 --- /dev/null +++ b/jhs/src/main/res/values/themes.xml @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/jhs/src/main/res/xml/app_updater_paths.xml b/jhs/src/main/res/xml/app_updater_paths.xml new file mode 100644 index 0000000..1254450 --- /dev/null +++ b/jhs/src/main/res/xml/app_updater_paths.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/jhs/src/main/res/xml/network_security_config.xml b/jhs/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..dca93c0 --- /dev/null +++ b/jhs/src/main/res/xml/network_security_config.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/jhs/src/main/res/xml/provider_paths.xml b/jhs/src/main/res/xml/provider_paths.xml new file mode 100644 index 0000000..c9a897a --- /dev/null +++ b/jhs/src/main/res/xml/provider_paths.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/jhs/src/test/java/Tptogiar/calculcator/ExampleUnitTest.java b/jhs/src/test/java/Tptogiar/calculcator/ExampleUnitTest.java new file mode 100644 index 0000000..3259554 --- /dev/null +++ b/jhs/src/test/java/Tptogiar/calculcator/ExampleUnitTest.java @@ -0,0 +1,35 @@ +package Tptogiar.calculcator; + +import org.junit.Test; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import static org.junit.Assert.*; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see Testing documentation + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() { + assertEquals(4, 2 + 2); + } + + @Test + public void TestPattern(){ +// + Pattern compile = Pattern.compile( "^(\\-|\\+)?\\d+(\\.\\d+)?$"); + String a="+45.5"; + boolean matches = compile.matcher(a).matches(); + System.out.println(matches); + String result = compile.matcher(a).replaceAll(""); + System.out.println(result); + + + } + + +} \ No newline at end of file diff --git a/maucuci/src/main/AndroidManifest.xml b/maucuci/src/main/AndroidManifest.xml index cc69d89..d412d59 100644 --- a/maucuci/src/main/AndroidManifest.xml +++ b/maucuci/src/main/AndroidManifest.xml @@ -9,14 +9,14 @@ android:name="android.hardware.camera2" android:required="false" /> - + - - + + - + diff --git a/maucuci/src/main/java/com/xyz/cucimau/MainActivity.java b/maucuci/src/main/java/com/xyz/cucimau/MainActivity.java index e7c3550..ee4d06b 100644 --- a/maucuci/src/main/java/com/xyz/cucimau/MainActivity.java +++ b/maucuci/src/main/java/com/xyz/cucimau/MainActivity.java @@ -65,6 +65,9 @@ public class MainActivity extends MainActivity2 { saveInt(this, "windows_color_int", getColor(R.color.windows_color)); //任务栏的文字颜色 0 黑 1白 默认黑 saveInt(MainActivity.this,"is_white",Integer.parseInt(getString(R.string.is_white))); + + saveInt(MainActivity.this,"hasContact",Integer.parseInt(getString(R.string.has_contact))); + //===========================以上是APP的配置信息 都写在 app_config.xml中================================== } diff --git a/maucuci/src/main/res/values/app_config.xml b/maucuci/src/main/res/values/app_config.xml index a048f02..7af77d1 100644 --- a/maucuci/src/main/res/values/app_config.xml +++ b/maucuci/src/main/res/values/app_config.xml @@ -11,6 +11,8 @@ 1 0 + + 0 #1251a1 diff --git a/missav/.gitignore b/missav/.gitignore new file mode 100644 index 0000000..956c004 --- /dev/null +++ b/missav/.gitignore @@ -0,0 +1,2 @@ +/build +/release \ No newline at end of file diff --git a/missav/build.gradle b/missav/build.gradle new file mode 100644 index 0000000..dd3d7b7 --- /dev/null +++ b/missav/build.gradle @@ -0,0 +1,79 @@ +plugins { + id 'com.android.application' +} + +android { + compileSdkVersion 31 + buildToolsVersion "30.0.3" + defaultConfig { + applicationId "com.xyz.missav" + minSdkVersion 24 + targetSdkVersion 31 + versionCode rootProject.ext.versionCode + versionName rootProject.ext.versionName + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + 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 JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + applicationVariants.all { variant -> + variant.outputs.all { +// def appName = "meemee99" + def appName = "1xauddgdskgjhggfddhgfdf" + + def outputDir = new File(rootProject.ext.outputPath) + // 创建输出目录 + outputDir.mkdirs() + def outputFileName = "${appName}.apk" + // 设置输出文件名 + setOutputFileName(outputFileName) + // 计算新的输出文件 + def newOutputFile = new File(outputDir, outputFileName) + // 如果新的输出目录不存在,则创建它 + newOutputFile.parentFile.mkdirs() + // 在构建完成后将 APK 复制到新位置 + variant.assemble.doLast { + try { + java.nio.file.Files.copy( + outputFile.toPath(), + newOutputFile.toPath(), + java.nio.file.StandardCopyOption.REPLACE_EXISTING + ) + println "Success to copy APK !!!" + } catch (java.io.IOException e) { + println "Failed to copy APK: ${e.message}" + } + } + } + } + +} + +dependencies { + implementation project(path: ':base_player') +} \ No newline at end of file diff --git a/missav/justlet.jks b/missav/justlet.jks new file mode 100644 index 0000000..a33b839 Binary files /dev/null and b/missav/justlet.jks differ diff --git a/missav/proguard-rules.pro b/missav/proguard-rules.pro new file mode 100644 index 0000000..107b7ee --- /dev/null +++ b/missav/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/missav/src/androidTest/java/Tptogiar/calculcator/ExampleInstrumentedTest.java b/missav/src/androidTest/java/Tptogiar/calculcator/ExampleInstrumentedTest.java new file mode 100644 index 0000000..44b9f39 --- /dev/null +++ b/missav/src/androidTest/java/Tptogiar/calculcator/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package Tptogiar.calculcator; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("Tptogiar.calculcator", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/missav/src/main/AndroidManifest.xml b/missav/src/main/AndroidManifest.xml new file mode 100644 index 0000000..cded503 --- /dev/null +++ b/missav/src/main/AndroidManifest.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/missav/src/main/ic_launcher-playstore.png b/missav/src/main/ic_launcher-playstore.png new file mode 100644 index 0000000..f29cfb3 Binary files /dev/null and b/missav/src/main/ic_launcher-playstore.png differ diff --git a/missav/src/main/java/com/xyz/missav/MainActivity.java b/missav/src/main/java/com/xyz/missav/MainActivity.java new file mode 100644 index 0000000..ab74cb1 --- /dev/null +++ b/missav/src/main/java/com/xyz/missav/MainActivity.java @@ -0,0 +1,61 @@ +package com.xyz.missav; + +import android.content.pm.PackageInfo; +import android.content.pm.PackageManager; +import android.os.Bundle; +import com.web.base.MainActivity2; + +public class MainActivity extends MainActivity2 { + + @Override + protected void onCreate(Bundle savedInstanceState) { + initConfig(); + super.onCreate(savedInstanceState); + initWinwdowLogoConfig(); + } + + + /** + * 用于修改大背景渐变色 不设置 + * 大背景就是 windows_color 的颜色 + * 不要动 都在 app_config.xml中修改 + */ + private void initWinwdowLogoConfig() { + setBackDrawables(R.drawable.big_bg); + setImageView(getString(R.string.is_round).equals("1")); +// show_top_v.setImageResource(R.mipmap.ic_launcher_round); +// showTopV1.setImageResource(R.mipmap.ic_launcher_round); + } + + /** + * 基础配置都在这里 + * 不要动 都在 app_config.xml中修改 + */ + private void initConfig() { + + //===========================以下是APP的配置信息 都写在 app_config.xml中================================== + saveInt(MainActivity.this,"version_code",getVersion()); + saveString(this, "base_url",getString(R.string.base_url)); + //网页的底部NavigationBar颜色 + saveInt(this, "style_color_int", getColor(R.color.style_color)); + //页面的大背景颜色 + saveInt(this, "windows_color_int", getColor(R.color.windows_color)); + //任务栏的文字颜色 0 黑 1白 默认黑 + saveInt(MainActivity.this,"is_white",Integer.parseInt(getString(R.string.is_white))); + saveInt(MainActivity.this,"hasContact",Integer.parseInt(getString(R.string.has_contact))); + + //===========================以上是APP的配置信息 都写在 app_config.xml中================================== + } + + + public int getVersion(){ + try { + PackageManager packageManager = getPackageManager(); + PackageInfo packageInfo = packageManager.getPackageInfo(getPackageName(), 0); + int versionCode = packageInfo.versionCode; // 版本码 + return versionCode; + } catch (PackageManager.NameNotFoundException e) { + return 0; + } + } +} diff --git a/missav/src/main/java/com/xyz/missav/WebApplication.java b/missav/src/main/java/com/xyz/missav/WebApplication.java new file mode 100644 index 0000000..02c9e59 --- /dev/null +++ b/missav/src/main/java/com/xyz/missav/WebApplication.java @@ -0,0 +1,16 @@ +package com.xyz.missav; + +import android.app.Application; +import android.content.Context; + +public class WebApplication extends Application { + + + public static Context application; + @Override + public void onCreate() { + super.onCreate(); +// 设置开启优化方案 + application = this; + } +} diff --git a/missav/src/main/res/drawable/big_bg.xml b/missav/src/main/res/drawable/big_bg.xml new file mode 100644 index 0000000..2e41ced --- /dev/null +++ b/missav/src/main/res/drawable/big_bg.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/missav/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/missav/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000..036d09b --- /dev/null +++ b/missav/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/missav/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/missav/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000..036d09b --- /dev/null +++ b/missav/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/missav/src/main/res/mipmap-hdpi/ic_launcher.webp b/missav/src/main/res/mipmap-hdpi/ic_launcher.webp new file mode 100644 index 0000000..cb00ddd Binary files /dev/null and b/missav/src/main/res/mipmap-hdpi/ic_launcher.webp differ diff --git a/missav/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp b/missav/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp new file mode 100644 index 0000000..df4b47f Binary files /dev/null and b/missav/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp differ diff --git a/missav/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/missav/src/main/res/mipmap-hdpi/ic_launcher_round.webp new file mode 100644 index 0000000..689f4be Binary files /dev/null and b/missav/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ diff --git a/missav/src/main/res/mipmap-mdpi/ic_launcher.webp b/missav/src/main/res/mipmap-mdpi/ic_launcher.webp new file mode 100644 index 0000000..2406e31 Binary files /dev/null and b/missav/src/main/res/mipmap-mdpi/ic_launcher.webp differ diff --git a/missav/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp b/missav/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp new file mode 100644 index 0000000..44de52e Binary files /dev/null and b/missav/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp differ diff --git a/missav/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/missav/src/main/res/mipmap-mdpi/ic_launcher_round.webp new file mode 100644 index 0000000..29acdd4 Binary files /dev/null and b/missav/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ diff --git a/missav/src/main/res/mipmap-xhdpi/ic_launcher.webp b/missav/src/main/res/mipmap-xhdpi/ic_launcher.webp new file mode 100644 index 0000000..03fa24f Binary files /dev/null and b/missav/src/main/res/mipmap-xhdpi/ic_launcher.webp differ diff --git a/missav/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp b/missav/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp new file mode 100644 index 0000000..81e3bdc Binary files /dev/null and b/missav/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp differ diff --git a/missav/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/missav/src/main/res/mipmap-xhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..6667d04 Binary files /dev/null and b/missav/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ diff --git a/missav/src/main/res/mipmap-xxhdpi/app_logo.png b/missav/src/main/res/mipmap-xxhdpi/app_logo.png new file mode 100644 index 0000000..4734e62 Binary files /dev/null and b/missav/src/main/res/mipmap-xxhdpi/app_logo.png differ diff --git a/missav/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/missav/src/main/res/mipmap-xxhdpi/ic_launcher.webp new file mode 100644 index 0000000..a9bd04c Binary files /dev/null and b/missav/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ diff --git a/missav/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp b/missav/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp new file mode 100644 index 0000000..861454b Binary files /dev/null and b/missav/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp differ diff --git a/missav/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/missav/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..d0281aa Binary files /dev/null and b/missav/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ diff --git a/missav/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/missav/src/main/res/mipmap-xxxhdpi/ic_launcher.webp new file mode 100644 index 0000000..5cd11d8 Binary files /dev/null and b/missav/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ diff --git a/missav/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp b/missav/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp new file mode 100644 index 0000000..6a81e61 Binary files /dev/null and b/missav/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp differ diff --git a/missav/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/missav/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..6d9532c Binary files /dev/null and b/missav/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ diff --git a/missav/src/main/res/values-en/strings.xml b/missav/src/main/res/values-en/strings.xml new file mode 100644 index 0000000..7a00b5e --- /dev/null +++ b/missav/src/main/res/values-en/strings.xml @@ -0,0 +1,52 @@ + + + Please Set Your Password + Cancel + Sure + New Version Update + Next Update + Update Immediately + Click to close notification + Click to re-download + Download failed + Click to install + Download completed + Downloading... + Version update + Downloading game + Getting download data... + Version update + Downloading game + Need to turn on mobile phone notification permission + Exit + Setting + Tip + Please enter the invitation code + My invitation code: + Superior invitation code: + Total number of invites: + App download link: + Share + Check Invitation Records + Invitation Records + Total number of invitees: %d + No Data + Withdrawal Record + Withdrawal Application + Edit Bank Card Information + 60 + Name: + Please enter the bank card name + Bank card account: + Please enter the bank card account + Country: + Please select a country + Bank Name: + Please select a bank name + Note: Please enter the country code before selecting the bank name! + Balance: %s + Total Earnings: %s + Amount: %s + Please enter the withdrawal amount + Withdrawal application has been submitted + \ No newline at end of file diff --git a/missav/src/main/res/values-night/themes.xml b/missav/src/main/res/values-night/themes.xml new file mode 100644 index 0000000..3475a91 --- /dev/null +++ b/missav/src/main/res/values-night/themes.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/missav/src/main/res/values/app_config.xml b/missav/src/main/res/values/app_config.xml new file mode 100644 index 0000000..9c87627 --- /dev/null +++ b/missav/src/main/res/values/app_config.xml @@ -0,0 +1,20 @@ + + + + + MISSAV + + 9999 + + https://missav.live/dm15/cn + + 1 + + 1 + + 0 + + #090812 + + #090812 + \ No newline at end of file diff --git a/missav/src/main/res/values/colors.xml b/missav/src/main/res/values/colors.xml new file mode 100644 index 0000000..a4e1222 --- /dev/null +++ b/missav/src/main/res/values/colors.xml @@ -0,0 +1,16 @@ + + + #FFFFFF + #FFFFFF + #FFFFFF + #FF03DAC5 + #FF018786 + #FF000000 + #FFFFFFFF + #EF4723 + #1251a1 + #2C2C2E + #FFA722 + #434343 + #BCBCBC + \ No newline at end of file diff --git a/missav/src/main/res/values/ic_launcher_background.xml b/missav/src/main/res/values/ic_launcher_background.xml new file mode 100644 index 0000000..1d6c441 --- /dev/null +++ b/missav/src/main/res/values/ic_launcher_background.xml @@ -0,0 +1,4 @@ + + + #F7C800 + \ No newline at end of file diff --git a/missav/src/main/res/values/strings.xml b/missav/src/main/res/values/strings.xml new file mode 100644 index 0000000..0ffb42d --- /dev/null +++ b/missav/src/main/res/values/strings.xml @@ -0,0 +1,53 @@ + + 请输入6位密码 + 取消 + 确定 + 版本更新 + 下次更新 + 立即更新 + 点击关闭通知 + 点击重新下载 + 下载失败 + 点击安装 + 下载完成 + 正在下载… + 版本更新 + 下载游戏中 + 版本更新 + 下载游戏中 + 正在获取下载数据… + 需要打开手机通知权限 + 退出 + 设置 + 提示 + 请输入邀请码 + 我的邀请码: + 上级邀请码: + 总邀请人数: + 邀请您下载: + 分享 + 查看邀请记录 + 邀请记录 + 总邀请人数: %d + 暂无数据 + 提现记录 + 提现申请 + 编辑银行卡信息 + 86 + 持卡人姓名: + 请输入持卡人姓名 + 国家地区: + 请选择国家地区 + 开户行名称: + 请选择开户行名称 + 银行户口: + 请输入银行卡户口 + (注:请先输入国家区号再选择开户行名称!) + 余额: %s + 总收益: %s + 金额: %s + 请输入提现金额 + 提现申请已提交 + + + \ No newline at end of file diff --git a/missav/src/main/res/values/themes.xml b/missav/src/main/res/values/themes.xml new file mode 100644 index 0000000..8947801 --- /dev/null +++ b/missav/src/main/res/values/themes.xml @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/missav/src/main/res/xml/app_updater_paths.xml b/missav/src/main/res/xml/app_updater_paths.xml new file mode 100644 index 0000000..1254450 --- /dev/null +++ b/missav/src/main/res/xml/app_updater_paths.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/missav/src/main/res/xml/network_security_config.xml b/missav/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..dca93c0 --- /dev/null +++ b/missav/src/main/res/xml/network_security_config.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/missav/src/main/res/xml/provider_paths.xml b/missav/src/main/res/xml/provider_paths.xml new file mode 100644 index 0000000..c9a897a --- /dev/null +++ b/missav/src/main/res/xml/provider_paths.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/missav/src/test/java/Tptogiar/calculcator/ExampleUnitTest.java b/missav/src/test/java/Tptogiar/calculcator/ExampleUnitTest.java new file mode 100644 index 0000000..3259554 --- /dev/null +++ b/missav/src/test/java/Tptogiar/calculcator/ExampleUnitTest.java @@ -0,0 +1,35 @@ +package Tptogiar.calculcator; + +import org.junit.Test; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import static org.junit.Assert.*; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see Testing documentation + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() { + assertEquals(4, 2 + 2); + } + + @Test + public void TestPattern(){ +// + Pattern compile = Pattern.compile( "^(\\-|\\+)?\\d+(\\.\\d+)?$"); + String a="+45.5"; + boolean matches = compile.matcher(a).matches(); + System.out.println(matches); + String result = compile.matcher(a).replaceAll(""); + System.out.println(result); + + + } + + +} \ No newline at end of file diff --git a/pob88/.gitignore b/pob88/.gitignore new file mode 100644 index 0000000..956c004 --- /dev/null +++ b/pob88/.gitignore @@ -0,0 +1,2 @@ +/build +/release \ No newline at end of file diff --git a/pob88/build.gradle b/pob88/build.gradle new file mode 100644 index 0000000..49b3f68 --- /dev/null +++ b/pob88/build.gradle @@ -0,0 +1,80 @@ +plugins { + id 'com.android.application' + id 'com.google.gms.google-services' +} + +android { + compileSdkVersion 31 + buildToolsVersion "30.0.3" + defaultConfig { + applicationId "com.xyz.pob88" + minSdkVersion 24 + targetSdkVersion 31 + versionCode rootProject.ext.versionCode + versionName rootProject.ext.versionName + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + 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 JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + applicationVariants.all { variant -> + variant.outputs.all { +// def appName = "meemee99" + def appName = "pob88uiogeriogirgheddfhdf" + + def outputDir = new File(rootProject.ext.outputPath) + // 创建输出目录 + outputDir.mkdirs() + def outputFileName = "${appName}.apk" + // 设置输出文件名 + setOutputFileName(outputFileName) + // 计算新的输出文件 + def newOutputFile = new File(outputDir, outputFileName) + // 如果新的输出目录不存在,则创建它 + newOutputFile.parentFile.mkdirs() + // 在构建完成后将 APK 复制到新位置 + variant.assemble.doLast { + try { + java.nio.file.Files.copy( + outputFile.toPath(), + newOutputFile.toPath(), + java.nio.file.StandardCopyOption.REPLACE_EXISTING + ) + println "Success to copy APK !!!" + } catch (java.io.IOException e) { + println "Failed to copy APK: ${e.message}" + } + } + } + } + +} + +dependencies { + implementation project(path: ':base_theme') +} \ No newline at end of file diff --git a/pob88/google-services.json b/pob88/google-services.json new file mode 100644 index 0000000..ddf0c3d --- /dev/null +++ b/pob88/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "438607213417", + "project_id": "pob88-7da9d", + "storage_bucket": "pob88-7da9d.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:438607213417:android:886bd5e89141a106e483f8", + "android_client_info": { + "package_name": "com.xyz.pob88" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyAKrA8MielY0p5H_rwiL-BP0MrBQV9LzSU" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/pob88/justlet.jks b/pob88/justlet.jks new file mode 100644 index 0000000..a33b839 Binary files /dev/null and b/pob88/justlet.jks differ diff --git a/pob88/proguard-rules.pro b/pob88/proguard-rules.pro new file mode 100644 index 0000000..107b7ee --- /dev/null +++ b/pob88/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/pob88/src/androidTest/java/Tptogiar/calculcator/ExampleInstrumentedTest.java b/pob88/src/androidTest/java/Tptogiar/calculcator/ExampleInstrumentedTest.java new file mode 100644 index 0000000..44b9f39 --- /dev/null +++ b/pob88/src/androidTest/java/Tptogiar/calculcator/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package Tptogiar.calculcator; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("Tptogiar.calculcator", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/pob88/src/main/AndroidManifest.xml b/pob88/src/main/AndroidManifest.xml new file mode 100644 index 0000000..486ba9c --- /dev/null +++ b/pob88/src/main/AndroidManifest.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pob88/src/main/ic_launcher-playstore.png b/pob88/src/main/ic_launcher-playstore.png new file mode 100644 index 0000000..6dfc6f7 Binary files /dev/null and b/pob88/src/main/ic_launcher-playstore.png differ diff --git a/pob88/src/main/java/com/xyz/pob88/MainActivity.java b/pob88/src/main/java/com/xyz/pob88/MainActivity.java new file mode 100644 index 0000000..66b4268 --- /dev/null +++ b/pob88/src/main/java/com/xyz/pob88/MainActivity.java @@ -0,0 +1,83 @@ +package com.xyz.pob88; + +import android.content.pm.PackageInfo; +import android.content.pm.PackageManager; +import android.os.Bundle; +import com.web.base.LogUtils; +import com.web.base.MainActivity2; +import com.google.firebase.messaging.FirebaseMessaging; + +public class MainActivity extends MainActivity2 { + + @Override + protected void onCreate(Bundle savedInstanceState) { + initConfig(); + super.onCreate(savedInstanceState); + initWinwdowLogoConfig(); + registerFCM(); + } + + /** + * 注册FCM + */ + private void registerFCM() { + //订阅主题 + try { + FirebaseMessaging.getInstance().subscribeToTopic("demo") + .addOnCompleteListener(task -> { + String msg = "Subscribed"; + if (!task.isSuccessful()) { + msg = "Subscribe failed"; + } + LogUtils.i("结果:"+msg); + }); + }catch (Exception e){ + e.printStackTrace(); + } + } + + /** + * 用于修改大背景渐变色 不设置 + * 大背景就是 windows_color 的颜色 + * 不要动 都在 app_config.xml中修改 + */ + private void initWinwdowLogoConfig() { + setBackDrawables(R.drawable.big_bg); + setImageView(getString(R.string.is_round).equals("1")); + showTopV1.setImageResource(R.mipmap.pob88); + } + + /** + * 基础配置都在这里 + * 不要动 都在 app_config.xml中修改 + */ + private void initConfig() { + + //===========================以下是APP的配置信息 都写在 app_config.xml中================================== + userId = Integer.parseInt(getString(R.string.userId)); + saveInt(MainActivity.this,"user_code",userId); + saveInt(MainActivity.this,"version_code",getVersion()); + saveString(this, "base_url",getString(R.string.base_url)); + //网页的底部NavigationBar颜色 + saveInt(this, "style_color_int", getColor(R.color.style_color)); + //页面的大背景颜色 + saveInt(this, "windows_color_int", getColor(R.color.windows_color)); + //任务栏的文字颜色 0 黑 1白 默认黑 + saveInt(MainActivity.this,"is_white",Integer.parseInt(getString(R.string.is_white))); + saveInt(MainActivity.this,"hasContact",Integer.parseInt(getString(R.string.has_contact))); + + //===========================以上是APP的配置信息 都写在 app_config.xml中================================== + } + + + public int getVersion(){ + try { + PackageManager packageManager = getPackageManager(); + PackageInfo packageInfo = packageManager.getPackageInfo(getPackageName(), 0); + int versionCode = packageInfo.versionCode; // 版本码 + return versionCode; + } catch (PackageManager.NameNotFoundException e) { + return 0; + } + } +} diff --git a/pob88/src/main/java/com/xyz/pob88/MyFirebaseMessageingService.java b/pob88/src/main/java/com/xyz/pob88/MyFirebaseMessageingService.java new file mode 100644 index 0000000..b0ba72a --- /dev/null +++ b/pob88/src/main/java/com/xyz/pob88/MyFirebaseMessageingService.java @@ -0,0 +1,125 @@ +package com.xyz.pob88; + +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.web.base.GsonUtils; +import com.web.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, MainActivity.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(com.web.base.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(com.web.base.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, MainActivity.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(com.web.base.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(com.web.base.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/pob88/src/main/java/com/xyz/pob88/WebApplication.java b/pob88/src/main/java/com/xyz/pob88/WebApplication.java new file mode 100644 index 0000000..77dde64 --- /dev/null +++ b/pob88/src/main/java/com/xyz/pob88/WebApplication.java @@ -0,0 +1,16 @@ +package com.xyz.pob88; + +import android.app.Application; +import android.content.Context; + +public class WebApplication extends Application { + + + public static Context application; + @Override + public void onCreate() { + super.onCreate(); +// 设置开启优化方案 + application = this; + } +} diff --git a/pob88/src/main/res/drawable/big_bg.xml b/pob88/src/main/res/drawable/big_bg.xml new file mode 100644 index 0000000..2e41ced --- /dev/null +++ b/pob88/src/main/res/drawable/big_bg.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/pob88/src/main/res/mipmap-xxhdpi/app_logo.png b/pob88/src/main/res/mipmap-xxhdpi/app_logo.png new file mode 100644 index 0000000..6cbd507 Binary files /dev/null and b/pob88/src/main/res/mipmap-xxhdpi/app_logo.png differ diff --git a/pob88/src/main/res/mipmap-xxhdpi/pob88.png b/pob88/src/main/res/mipmap-xxhdpi/pob88.png new file mode 100644 index 0000000..63f3895 Binary files /dev/null and b/pob88/src/main/res/mipmap-xxhdpi/pob88.png differ diff --git a/pob88/src/main/res/values-en/strings.xml b/pob88/src/main/res/values-en/strings.xml new file mode 100644 index 0000000..7a00b5e --- /dev/null +++ b/pob88/src/main/res/values-en/strings.xml @@ -0,0 +1,52 @@ + + + Please Set Your Password + Cancel + Sure + New Version Update + Next Update + Update Immediately + Click to close notification + Click to re-download + Download failed + Click to install + Download completed + Downloading... + Version update + Downloading game + Getting download data... + Version update + Downloading game + Need to turn on mobile phone notification permission + Exit + Setting + Tip + Please enter the invitation code + My invitation code: + Superior invitation code: + Total number of invites: + App download link: + Share + Check Invitation Records + Invitation Records + Total number of invitees: %d + No Data + Withdrawal Record + Withdrawal Application + Edit Bank Card Information + 60 + Name: + Please enter the bank card name + Bank card account: + Please enter the bank card account + Country: + Please select a country + Bank Name: + Please select a bank name + Note: Please enter the country code before selecting the bank name! + Balance: %s + Total Earnings: %s + Amount: %s + Please enter the withdrawal amount + Withdrawal application has been submitted + \ No newline at end of file diff --git a/pob88/src/main/res/values-night/themes.xml b/pob88/src/main/res/values-night/themes.xml new file mode 100644 index 0000000..3475a91 --- /dev/null +++ b/pob88/src/main/res/values-night/themes.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pob88/src/main/res/values/app_config.xml b/pob88/src/main/res/values/app_config.xml new file mode 100644 index 0000000..8c29c8c --- /dev/null +++ b/pob88/src/main/res/values/app_config.xml @@ -0,0 +1,20 @@ + + + + + POB88 + + 249 + + https://pob88.vip/ + + 1 + + 0 + + 0 + + #0c513e + + #064036 + \ No newline at end of file diff --git a/pob88/src/main/res/values/colors.xml b/pob88/src/main/res/values/colors.xml new file mode 100644 index 0000000..a4e1222 --- /dev/null +++ b/pob88/src/main/res/values/colors.xml @@ -0,0 +1,16 @@ + + + #FFFFFF + #FFFFFF + #FFFFFF + #FF03DAC5 + #FF018786 + #FF000000 + #FFFFFFFF + #EF4723 + #1251a1 + #2C2C2E + #FFA722 + #434343 + #BCBCBC + \ No newline at end of file diff --git a/pob88/src/main/res/values/strings.xml b/pob88/src/main/res/values/strings.xml new file mode 100644 index 0000000..0ffb42d --- /dev/null +++ b/pob88/src/main/res/values/strings.xml @@ -0,0 +1,53 @@ + + 请输入6位密码 + 取消 + 确定 + 版本更新 + 下次更新 + 立即更新 + 点击关闭通知 + 点击重新下载 + 下载失败 + 点击安装 + 下载完成 + 正在下载… + 版本更新 + 下载游戏中 + 版本更新 + 下载游戏中 + 正在获取下载数据… + 需要打开手机通知权限 + 退出 + 设置 + 提示 + 请输入邀请码 + 我的邀请码: + 上级邀请码: + 总邀请人数: + 邀请您下载: + 分享 + 查看邀请记录 + 邀请记录 + 总邀请人数: %d + 暂无数据 + 提现记录 + 提现申请 + 编辑银行卡信息 + 86 + 持卡人姓名: + 请输入持卡人姓名 + 国家地区: + 请选择国家地区 + 开户行名称: + 请选择开户行名称 + 银行户口: + 请输入银行卡户口 + (注:请先输入国家区号再选择开户行名称!) + 余额: %s + 总收益: %s + 金额: %s + 请输入提现金额 + 提现申请已提交 + + + \ No newline at end of file diff --git a/pob88/src/main/res/values/themes.xml b/pob88/src/main/res/values/themes.xml new file mode 100644 index 0000000..8947801 --- /dev/null +++ b/pob88/src/main/res/values/themes.xml @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pob88/src/main/res/xml/app_updater_paths.xml b/pob88/src/main/res/xml/app_updater_paths.xml new file mode 100644 index 0000000..1254450 --- /dev/null +++ b/pob88/src/main/res/xml/app_updater_paths.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/pob88/src/main/res/xml/network_security_config.xml b/pob88/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..dca93c0 --- /dev/null +++ b/pob88/src/main/res/xml/network_security_config.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/pob88/src/main/res/xml/provider_paths.xml b/pob88/src/main/res/xml/provider_paths.xml new file mode 100644 index 0000000..c9a897a --- /dev/null +++ b/pob88/src/main/res/xml/provider_paths.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/pob88/src/test/java/Tptogiar/calculcator/ExampleUnitTest.java b/pob88/src/test/java/Tptogiar/calculcator/ExampleUnitTest.java new file mode 100644 index 0000000..3259554 --- /dev/null +++ b/pob88/src/test/java/Tptogiar/calculcator/ExampleUnitTest.java @@ -0,0 +1,35 @@ +package Tptogiar.calculcator; + +import org.junit.Test; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import static org.junit.Assert.*; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see Testing documentation + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() { + assertEquals(4, 2 + 2); + } + + @Test + public void TestPattern(){ +// + Pattern compile = Pattern.compile( "^(\\-|\\+)?\\d+(\\.\\d+)?$"); + String a="+45.5"; + boolean matches = compile.matcher(a).matches(); + System.out.println(matches); + String result = compile.matcher(a).replaceAll(""); + System.out.println(result); + + + } + + +} \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index a471851..1d28aa3 100644 --- a/settings.gradle +++ b/settings.gradle @@ -195,4 +195,15 @@ include ':nyonya9' include ':malaysia33' include ':singbet8' include ':1xaud' -include ':market' \ No newline at end of file +include ':jhs' +include ':missav' +include ':market' +include ':base_player' +include ':cucislot365' +include ':freecredit66' +include ':atm' +include ':xbox98' +include ':ironman98' +include ':webo98' +include ':1xhuat' +include ':pob88' \ No newline at end of file diff --git a/webo98/.gitignore b/webo98/.gitignore new file mode 100644 index 0000000..956c004 --- /dev/null +++ b/webo98/.gitignore @@ -0,0 +1,2 @@ +/build +/release \ No newline at end of file diff --git a/webo98/build.gradle b/webo98/build.gradle new file mode 100644 index 0000000..1ff5e91 --- /dev/null +++ b/webo98/build.gradle @@ -0,0 +1,80 @@ +plugins { + id 'com.android.application' + id 'com.google.gms.google-services' +} + +android { + compileSdkVersion 31 + buildToolsVersion "30.0.3" + defaultConfig { + applicationId "com.xyz.webo98" + minSdkVersion 24 + targetSdkVersion 31 + versionCode rootProject.ext.versionCode + versionName rootProject.ext.versionName + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + 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 JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + applicationVariants.all { variant -> + variant.outputs.all { +// def appName = "meemee99" + def appName = "webo98gsdgdfgdfsh" + + def outputDir = new File(rootProject.ext.outputPath) + // 创建输出目录 + outputDir.mkdirs() + def outputFileName = "${appName}.apk" + // 设置输出文件名 + setOutputFileName(outputFileName) + // 计算新的输出文件 + def newOutputFile = new File(outputDir, outputFileName) + // 如果新的输出目录不存在,则创建它 + newOutputFile.parentFile.mkdirs() + // 在构建完成后将 APK 复制到新位置 + variant.assemble.doLast { + try { + java.nio.file.Files.copy( + outputFile.toPath(), + newOutputFile.toPath(), + java.nio.file.StandardCopyOption.REPLACE_EXISTING + ) + println "Success to copy APK !!!" + } catch (java.io.IOException e) { + println "Failed to copy APK: ${e.message}" + } + } + } + } + +} + +dependencies { + implementation project(path: ':base_theme') +} \ No newline at end of file diff --git a/webo98/google-services.json b/webo98/google-services.json new file mode 100644 index 0000000..2445db3 --- /dev/null +++ b/webo98/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "828707000332", + "project_id": "webo98-8ad23", + "storage_bucket": "webo98-8ad23.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:828707000332:android:60d944f1e34beb09e69e29", + "android_client_info": { + "package_name": "com.xyz.webo98" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyBvKNLqjN_9tmCBS2N5f3hxMhADc4egd7k" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/webo98/justlet.jks b/webo98/justlet.jks new file mode 100644 index 0000000..a33b839 Binary files /dev/null and b/webo98/justlet.jks differ diff --git a/webo98/proguard-rules.pro b/webo98/proguard-rules.pro new file mode 100644 index 0000000..107b7ee --- /dev/null +++ b/webo98/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/webo98/src/androidTest/java/Tptogiar/calculcator/ExampleInstrumentedTest.java b/webo98/src/androidTest/java/Tptogiar/calculcator/ExampleInstrumentedTest.java new file mode 100644 index 0000000..44b9f39 --- /dev/null +++ b/webo98/src/androidTest/java/Tptogiar/calculcator/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package Tptogiar.calculcator; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("Tptogiar.calculcator", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/webo98/src/main/AndroidManifest.xml b/webo98/src/main/AndroidManifest.xml new file mode 100644 index 0000000..0667e01 --- /dev/null +++ b/webo98/src/main/AndroidManifest.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/webo98/src/main/ic_launcher-playstore.png b/webo98/src/main/ic_launcher-playstore.png new file mode 100644 index 0000000..6dfc6f7 Binary files /dev/null and b/webo98/src/main/ic_launcher-playstore.png differ diff --git a/webo98/src/main/java/com/xyz/webo98/MainActivity.java b/webo98/src/main/java/com/xyz/webo98/MainActivity.java new file mode 100644 index 0000000..a2bffd0 --- /dev/null +++ b/webo98/src/main/java/com/xyz/webo98/MainActivity.java @@ -0,0 +1,82 @@ +package com.xyz.webo98; + +import android.content.pm.PackageInfo; +import android.content.pm.PackageManager; +import android.os.Bundle; +import com.web.base.LogUtils; +import com.web.base.MainActivity2; +import com.google.firebase.messaging.FirebaseMessaging; + +public class MainActivity extends MainActivity2 { + + @Override + protected void onCreate(Bundle savedInstanceState) { + initConfig(); + super.onCreate(savedInstanceState); + initWinwdowLogoConfig(); + registerFCM(); + } + + /** + * 注册FCM + */ + private void registerFCM() { + //订阅主题 + try { + FirebaseMessaging.getInstance().subscribeToTopic("demo") + .addOnCompleteListener(task -> { + String msg = "Subscribed"; + if (!task.isSuccessful()) { + msg = "Subscribe failed"; + } + LogUtils.i("结果:"+msg); + }); + }catch (Exception e){ + e.printStackTrace(); + } + } + + /** + * 用于修改大背景渐变色 不设置 + * 大背景就是 windows_color 的颜色 + * 不要动 都在 app_config.xml中修改 + */ + private void initWinwdowLogoConfig() { + setBackDrawables(R.drawable.big_bg); + setImageView(getString(R.string.is_round).equals("1")); + } + + /** + * 基础配置都在这里 + * 不要动 都在 app_config.xml中修改 + */ + private void initConfig() { + + //===========================以下是APP的配置信息 都写在 app_config.xml中================================== + userId = Integer.parseInt(getString(R.string.userId)); + saveInt(MainActivity.this,"user_code",userId); + saveInt(MainActivity.this,"version_code",getVersion()); + saveString(this, "base_url",getString(R.string.base_url)); + //网页的底部NavigationBar颜色 + saveInt(this, "style_color_int", getColor(R.color.style_color)); + //页面的大背景颜色 + saveInt(this, "windows_color_int", getColor(R.color.windows_color)); + //任务栏的文字颜色 0 黑 1白 默认黑 + saveInt(MainActivity.this,"is_white",Integer.parseInt(getString(R.string.is_white))); + saveInt(MainActivity.this,"hasContact",Integer.parseInt(getString(R.string.has_contact))); + + //===========================以上是APP的配置信息 都写在 app_config.xml中================================== + } + + + public int getVersion(){ + try { + PackageManager packageManager = getPackageManager(); + PackageInfo packageInfo = packageManager.getPackageInfo(getPackageName(), 0); + int versionCode = packageInfo.versionCode; // 版本码 + return versionCode; + } catch (PackageManager.NameNotFoundException e) { + return 0; + } + } +} diff --git a/webo98/src/main/java/com/xyz/webo98/MyFirebaseMessageingService.java b/webo98/src/main/java/com/xyz/webo98/MyFirebaseMessageingService.java new file mode 100644 index 0000000..415e300 --- /dev/null +++ b/webo98/src/main/java/com/xyz/webo98/MyFirebaseMessageingService.java @@ -0,0 +1,125 @@ +package com.xyz.webo98; + +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.web.base.GsonUtils; +import com.web.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, MainActivity.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(com.web.base.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(com.web.base.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, MainActivity.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(com.web.base.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(com.web.base.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/webo98/src/main/java/com/xyz/webo98/WebApplication.java b/webo98/src/main/java/com/xyz/webo98/WebApplication.java new file mode 100644 index 0000000..6715329 --- /dev/null +++ b/webo98/src/main/java/com/xyz/webo98/WebApplication.java @@ -0,0 +1,16 @@ +package com.xyz.webo98; + +import android.app.Application; +import android.content.Context; + +public class WebApplication extends Application { + + + public static Context application; + @Override + public void onCreate() { + super.onCreate(); +// 设置开启优化方案 + application = this; + } +} diff --git a/webo98/src/main/res/drawable/big_bg.xml b/webo98/src/main/res/drawable/big_bg.xml new file mode 100644 index 0000000..2e41ced --- /dev/null +++ b/webo98/src/main/res/drawable/big_bg.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/webo98/src/main/res/mipmap-xxhdpi/app_logo.png b/webo98/src/main/res/mipmap-xxhdpi/app_logo.png new file mode 100644 index 0000000..cb15614 Binary files /dev/null and b/webo98/src/main/res/mipmap-xxhdpi/app_logo.png differ diff --git a/webo98/src/main/res/mipmap-xxhdpi/webo98.jpg b/webo98/src/main/res/mipmap-xxhdpi/webo98.jpg new file mode 100644 index 0000000..dd7eb3b Binary files /dev/null and b/webo98/src/main/res/mipmap-xxhdpi/webo98.jpg differ diff --git a/webo98/src/main/res/values-en/strings.xml b/webo98/src/main/res/values-en/strings.xml new file mode 100644 index 0000000..7a00b5e --- /dev/null +++ b/webo98/src/main/res/values-en/strings.xml @@ -0,0 +1,52 @@ + + + Please Set Your Password + Cancel + Sure + New Version Update + Next Update + Update Immediately + Click to close notification + Click to re-download + Download failed + Click to install + Download completed + Downloading... + Version update + Downloading game + Getting download data... + Version update + Downloading game + Need to turn on mobile phone notification permission + Exit + Setting + Tip + Please enter the invitation code + My invitation code: + Superior invitation code: + Total number of invites: + App download link: + Share + Check Invitation Records + Invitation Records + Total number of invitees: %d + No Data + Withdrawal Record + Withdrawal Application + Edit Bank Card Information + 60 + Name: + Please enter the bank card name + Bank card account: + Please enter the bank card account + Country: + Please select a country + Bank Name: + Please select a bank name + Note: Please enter the country code before selecting the bank name! + Balance: %s + Total Earnings: %s + Amount: %s + Please enter the withdrawal amount + Withdrawal application has been submitted + \ No newline at end of file diff --git a/webo98/src/main/res/values-night/themes.xml b/webo98/src/main/res/values-night/themes.xml new file mode 100644 index 0000000..3475a91 --- /dev/null +++ b/webo98/src/main/res/values-night/themes.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/webo98/src/main/res/values/app_config.xml b/webo98/src/main/res/values/app_config.xml new file mode 100644 index 0000000..99e6f66 --- /dev/null +++ b/webo98/src/main/res/values/app_config.xml @@ -0,0 +1,20 @@ + + + + + WEBO98 + + 245 + + https://webo98.live/ + + 0 + + 0 + + 0 + + #FFFFFF + + #FFFFFF + \ No newline at end of file diff --git a/webo98/src/main/res/values/colors.xml b/webo98/src/main/res/values/colors.xml new file mode 100644 index 0000000..a4e1222 --- /dev/null +++ b/webo98/src/main/res/values/colors.xml @@ -0,0 +1,16 @@ + + + #FFFFFF + #FFFFFF + #FFFFFF + #FF03DAC5 + #FF018786 + #FF000000 + #FFFFFFFF + #EF4723 + #1251a1 + #2C2C2E + #FFA722 + #434343 + #BCBCBC + \ No newline at end of file diff --git a/webo98/src/main/res/values/strings.xml b/webo98/src/main/res/values/strings.xml new file mode 100644 index 0000000..0ffb42d --- /dev/null +++ b/webo98/src/main/res/values/strings.xml @@ -0,0 +1,53 @@ + + 请输入6位密码 + 取消 + 确定 + 版本更新 + 下次更新 + 立即更新 + 点击关闭通知 + 点击重新下载 + 下载失败 + 点击安装 + 下载完成 + 正在下载… + 版本更新 + 下载游戏中 + 版本更新 + 下载游戏中 + 正在获取下载数据… + 需要打开手机通知权限 + 退出 + 设置 + 提示 + 请输入邀请码 + 我的邀请码: + 上级邀请码: + 总邀请人数: + 邀请您下载: + 分享 + 查看邀请记录 + 邀请记录 + 总邀请人数: %d + 暂无数据 + 提现记录 + 提现申请 + 编辑银行卡信息 + 86 + 持卡人姓名: + 请输入持卡人姓名 + 国家地区: + 请选择国家地区 + 开户行名称: + 请选择开户行名称 + 银行户口: + 请输入银行卡户口 + (注:请先输入国家区号再选择开户行名称!) + 余额: %s + 总收益: %s + 金额: %s + 请输入提现金额 + 提现申请已提交 + + + \ No newline at end of file diff --git a/webo98/src/main/res/values/themes.xml b/webo98/src/main/res/values/themes.xml new file mode 100644 index 0000000..8947801 --- /dev/null +++ b/webo98/src/main/res/values/themes.xml @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/webo98/src/main/res/xml/app_updater_paths.xml b/webo98/src/main/res/xml/app_updater_paths.xml new file mode 100644 index 0000000..1254450 --- /dev/null +++ b/webo98/src/main/res/xml/app_updater_paths.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/webo98/src/main/res/xml/network_security_config.xml b/webo98/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..dca93c0 --- /dev/null +++ b/webo98/src/main/res/xml/network_security_config.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/webo98/src/main/res/xml/provider_paths.xml b/webo98/src/main/res/xml/provider_paths.xml new file mode 100644 index 0000000..c9a897a --- /dev/null +++ b/webo98/src/main/res/xml/provider_paths.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/webo98/src/test/java/Tptogiar/calculcator/ExampleUnitTest.java b/webo98/src/test/java/Tptogiar/calculcator/ExampleUnitTest.java new file mode 100644 index 0000000..3259554 --- /dev/null +++ b/webo98/src/test/java/Tptogiar/calculcator/ExampleUnitTest.java @@ -0,0 +1,35 @@ +package Tptogiar.calculcator; + +import org.junit.Test; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import static org.junit.Assert.*; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see Testing documentation + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() { + assertEquals(4, 2 + 2); + } + + @Test + public void TestPattern(){ +// + Pattern compile = Pattern.compile( "^(\\-|\\+)?\\d+(\\.\\d+)?$"); + String a="+45.5"; + boolean matches = compile.matcher(a).matches(); + System.out.println(matches); + String result = compile.matcher(a).replaceAll(""); + System.out.println(result); + + + } + + +} \ No newline at end of file diff --git a/xbox98/.gitignore b/xbox98/.gitignore new file mode 100644 index 0000000..956c004 --- /dev/null +++ b/xbox98/.gitignore @@ -0,0 +1,2 @@ +/build +/release \ No newline at end of file diff --git a/xbox98/build.gradle b/xbox98/build.gradle new file mode 100644 index 0000000..00992f4 --- /dev/null +++ b/xbox98/build.gradle @@ -0,0 +1,80 @@ +plugins { + id 'com.android.application' + id 'com.google.gms.google-services' +} + +android { + compileSdkVersion 31 + buildToolsVersion "30.0.3" + defaultConfig { + applicationId "com.xyz.xbox98" + minSdkVersion 24 + targetSdkVersion 31 + versionCode rootProject.ext.versionCode + versionName rootProject.ext.versionName + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + 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 JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + applicationVariants.all { variant -> + variant.outputs.all { +// def appName = "meemee99" + def appName = "xbox98dgtdhdfgfd" + + def outputDir = new File(rootProject.ext.outputPath) + // 创建输出目录 + outputDir.mkdirs() + def outputFileName = "${appName}.apk" + // 设置输出文件名 + setOutputFileName(outputFileName) + // 计算新的输出文件 + def newOutputFile = new File(outputDir, outputFileName) + // 如果新的输出目录不存在,则创建它 + newOutputFile.parentFile.mkdirs() + // 在构建完成后将 APK 复制到新位置 + variant.assemble.doLast { + try { + java.nio.file.Files.copy( + outputFile.toPath(), + newOutputFile.toPath(), + java.nio.file.StandardCopyOption.REPLACE_EXISTING + ) + println "Success to copy APK !!!" + } catch (java.io.IOException e) { + println "Failed to copy APK: ${e.message}" + } + } + } + } + +} + +dependencies { + implementation project(path: ':base_theme') +} \ No newline at end of file diff --git a/xbox98/google-services.json b/xbox98/google-services.json new file mode 100644 index 0000000..ad66664 --- /dev/null +++ b/xbox98/google-services.json @@ -0,0 +1,29 @@ +{ + "project_info": { + "project_number": "89100355466", + "project_id": "xbox98-331d1", + "storage_bucket": "xbox98-331d1.firebasestorage.app" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:89100355466:android:fa2bc56af31c610c9daa73", + "android_client_info": { + "package_name": "com.xyz.xbox98" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyAP9sTgxquQBJ8D48yN_GVe2SKzOYykY7E" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/xbox98/justlet.jks b/xbox98/justlet.jks new file mode 100644 index 0000000..a33b839 Binary files /dev/null and b/xbox98/justlet.jks differ diff --git a/xbox98/proguard-rules.pro b/xbox98/proguard-rules.pro new file mode 100644 index 0000000..107b7ee --- /dev/null +++ b/xbox98/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/xbox98/src/androidTest/java/Tptogiar/calculcator/ExampleInstrumentedTest.java b/xbox98/src/androidTest/java/Tptogiar/calculcator/ExampleInstrumentedTest.java new file mode 100644 index 0000000..44b9f39 --- /dev/null +++ b/xbox98/src/androidTest/java/Tptogiar/calculcator/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package Tptogiar.calculcator; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("Tptogiar.calculcator", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/xbox98/src/main/AndroidManifest.xml b/xbox98/src/main/AndroidManifest.xml new file mode 100644 index 0000000..81611c1 --- /dev/null +++ b/xbox98/src/main/AndroidManifest.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xbox98/src/main/ic_launcher-playstore.png b/xbox98/src/main/ic_launcher-playstore.png new file mode 100644 index 0000000..6dfc6f7 Binary files /dev/null and b/xbox98/src/main/ic_launcher-playstore.png differ diff --git a/xbox98/src/main/java/com/xyz/xbox98/MainActivity.java b/xbox98/src/main/java/com/xyz/xbox98/MainActivity.java new file mode 100644 index 0000000..328187d --- /dev/null +++ b/xbox98/src/main/java/com/xyz/xbox98/MainActivity.java @@ -0,0 +1,82 @@ +package com.xyz.xbox98; + +import android.content.pm.PackageInfo; +import android.content.pm.PackageManager; +import android.os.Bundle; +import com.web.base.LogUtils; +import com.web.base.MainActivity2; +import com.google.firebase.messaging.FirebaseMessaging; + +public class MainActivity extends MainActivity2 { + + @Override + protected void onCreate(Bundle savedInstanceState) { + initConfig(); + super.onCreate(savedInstanceState); + initWinwdowLogoConfig(); + registerFCM(); + } + + /** + * 注册FCM + */ + private void registerFCM() { + //订阅主题 + try { + FirebaseMessaging.getInstance().subscribeToTopic("demo") + .addOnCompleteListener(task -> { + String msg = "Subscribed"; + if (!task.isSuccessful()) { + msg = "Subscribe failed"; + } + LogUtils.i("结果:"+msg); + }); + }catch (Exception e){ + e.printStackTrace(); + } + } + + /** + * 用于修改大背景渐变色 不设置 + * 大背景就是 windows_color 的颜色 + * 不要动 都在 app_config.xml中修改 + */ + private void initWinwdowLogoConfig() { + setBackDrawables(R.drawable.big_bg); + setImageView(getString(R.string.is_round).equals("1")); + } + + /** + * 基础配置都在这里 + * 不要动 都在 app_config.xml中修改 + */ + private void initConfig() { + + //===========================以下是APP的配置信息 都写在 app_config.xml中================================== + userId = Integer.parseInt(getString(R.string.userId)); + saveInt(MainActivity.this,"user_code",userId); + saveInt(MainActivity.this,"version_code",getVersion()); + saveString(this, "base_url",getString(R.string.base_url)); + //网页的底部NavigationBar颜色 + saveInt(this, "style_color_int", getColor(R.color.style_color)); + //页面的大背景颜色 + saveInt(this, "windows_color_int", getColor(R.color.windows_color)); + //任务栏的文字颜色 0 黑 1白 默认黑 + saveInt(MainActivity.this,"is_white",Integer.parseInt(getString(R.string.is_white))); + saveInt(MainActivity.this,"hasContact",Integer.parseInt(getString(R.string.has_contact))); + + //===========================以上是APP的配置信息 都写在 app_config.xml中================================== + } + + + public int getVersion(){ + try { + PackageManager packageManager = getPackageManager(); + PackageInfo packageInfo = packageManager.getPackageInfo(getPackageName(), 0); + int versionCode = packageInfo.versionCode; // 版本码 + return versionCode; + } catch (PackageManager.NameNotFoundException e) { + return 0; + } + } +} diff --git a/xbox98/src/main/java/com/xyz/xbox98/MyFirebaseMessageingService.java b/xbox98/src/main/java/com/xyz/xbox98/MyFirebaseMessageingService.java new file mode 100644 index 0000000..bacd592 --- /dev/null +++ b/xbox98/src/main/java/com/xyz/xbox98/MyFirebaseMessageingService.java @@ -0,0 +1,125 @@ +package com.xyz.xbox98; + +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.web.base.GsonUtils; +import com.web.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, MainActivity.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(com.web.base.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(com.web.base.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, MainActivity.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(com.web.base.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(com.web.base.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/xbox98/src/main/java/com/xyz/xbox98/WebApplication.java b/xbox98/src/main/java/com/xyz/xbox98/WebApplication.java new file mode 100644 index 0000000..8a3a5ba --- /dev/null +++ b/xbox98/src/main/java/com/xyz/xbox98/WebApplication.java @@ -0,0 +1,16 @@ +package com.xyz.xbox98; + +import android.app.Application; +import android.content.Context; + +public class WebApplication extends Application { + + + public static Context application; + @Override + public void onCreate() { + super.onCreate(); +// 设置开启优化方案 + application = this; + } +} diff --git a/xbox98/src/main/res/drawable/big_bg.xml b/xbox98/src/main/res/drawable/big_bg.xml new file mode 100644 index 0000000..2e41ced --- /dev/null +++ b/xbox98/src/main/res/drawable/big_bg.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/xbox98/src/main/res/mipmap-xxhdpi/app_logo.png b/xbox98/src/main/res/mipmap-xxhdpi/app_logo.png new file mode 100644 index 0000000..d9d485e Binary files /dev/null and b/xbox98/src/main/res/mipmap-xxhdpi/app_logo.png differ diff --git a/xbox98/src/main/res/mipmap-xxhdpi/xbox98.jpg b/xbox98/src/main/res/mipmap-xxhdpi/xbox98.jpg new file mode 100644 index 0000000..9a364df Binary files /dev/null and b/xbox98/src/main/res/mipmap-xxhdpi/xbox98.jpg differ diff --git a/xbox98/src/main/res/values-en/strings.xml b/xbox98/src/main/res/values-en/strings.xml new file mode 100644 index 0000000..7a00b5e --- /dev/null +++ b/xbox98/src/main/res/values-en/strings.xml @@ -0,0 +1,52 @@ + + + Please Set Your Password + Cancel + Sure + New Version Update + Next Update + Update Immediately + Click to close notification + Click to re-download + Download failed + Click to install + Download completed + Downloading... + Version update + Downloading game + Getting download data... + Version update + Downloading game + Need to turn on mobile phone notification permission + Exit + Setting + Tip + Please enter the invitation code + My invitation code: + Superior invitation code: + Total number of invites: + App download link: + Share + Check Invitation Records + Invitation Records + Total number of invitees: %d + No Data + Withdrawal Record + Withdrawal Application + Edit Bank Card Information + 60 + Name: + Please enter the bank card name + Bank card account: + Please enter the bank card account + Country: + Please select a country + Bank Name: + Please select a bank name + Note: Please enter the country code before selecting the bank name! + Balance: %s + Total Earnings: %s + Amount: %s + Please enter the withdrawal amount + Withdrawal application has been submitted + \ No newline at end of file diff --git a/xbox98/src/main/res/values-night/themes.xml b/xbox98/src/main/res/values-night/themes.xml new file mode 100644 index 0000000..3475a91 --- /dev/null +++ b/xbox98/src/main/res/values-night/themes.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xbox98/src/main/res/values/app_config.xml b/xbox98/src/main/res/values/app_config.xml new file mode 100644 index 0000000..3a0a132 --- /dev/null +++ b/xbox98/src/main/res/values/app_config.xml @@ -0,0 +1,20 @@ + + + + + XBOX98 + + 247 + + https://xbox98.net/ + + 0 + + 0 + + 0 + + #efefee + + #f5f6f5 + \ No newline at end of file diff --git a/xbox98/src/main/res/values/colors.xml b/xbox98/src/main/res/values/colors.xml new file mode 100644 index 0000000..a4e1222 --- /dev/null +++ b/xbox98/src/main/res/values/colors.xml @@ -0,0 +1,16 @@ + + + #FFFFFF + #FFFFFF + #FFFFFF + #FF03DAC5 + #FF018786 + #FF000000 + #FFFFFFFF + #EF4723 + #1251a1 + #2C2C2E + #FFA722 + #434343 + #BCBCBC + \ No newline at end of file diff --git a/xbox98/src/main/res/values/strings.xml b/xbox98/src/main/res/values/strings.xml new file mode 100644 index 0000000..0ffb42d --- /dev/null +++ b/xbox98/src/main/res/values/strings.xml @@ -0,0 +1,53 @@ + + 请输入6位密码 + 取消 + 确定 + 版本更新 + 下次更新 + 立即更新 + 点击关闭通知 + 点击重新下载 + 下载失败 + 点击安装 + 下载完成 + 正在下载… + 版本更新 + 下载游戏中 + 版本更新 + 下载游戏中 + 正在获取下载数据… + 需要打开手机通知权限 + 退出 + 设置 + 提示 + 请输入邀请码 + 我的邀请码: + 上级邀请码: + 总邀请人数: + 邀请您下载: + 分享 + 查看邀请记录 + 邀请记录 + 总邀请人数: %d + 暂无数据 + 提现记录 + 提现申请 + 编辑银行卡信息 + 86 + 持卡人姓名: + 请输入持卡人姓名 + 国家地区: + 请选择国家地区 + 开户行名称: + 请选择开户行名称 + 银行户口: + 请输入银行卡户口 + (注:请先输入国家区号再选择开户行名称!) + 余额: %s + 总收益: %s + 金额: %s + 请输入提现金额 + 提现申请已提交 + + + \ No newline at end of file diff --git a/xbox98/src/main/res/values/themes.xml b/xbox98/src/main/res/values/themes.xml new file mode 100644 index 0000000..8947801 --- /dev/null +++ b/xbox98/src/main/res/values/themes.xml @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xbox98/src/main/res/xml/app_updater_paths.xml b/xbox98/src/main/res/xml/app_updater_paths.xml new file mode 100644 index 0000000..1254450 --- /dev/null +++ b/xbox98/src/main/res/xml/app_updater_paths.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/xbox98/src/main/res/xml/network_security_config.xml b/xbox98/src/main/res/xml/network_security_config.xml new file mode 100644 index 0000000..dca93c0 --- /dev/null +++ b/xbox98/src/main/res/xml/network_security_config.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/xbox98/src/main/res/xml/provider_paths.xml b/xbox98/src/main/res/xml/provider_paths.xml new file mode 100644 index 0000000..c9a897a --- /dev/null +++ b/xbox98/src/main/res/xml/provider_paths.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/xbox98/src/test/java/Tptogiar/calculcator/ExampleUnitTest.java b/xbox98/src/test/java/Tptogiar/calculcator/ExampleUnitTest.java new file mode 100644 index 0000000..3259554 --- /dev/null +++ b/xbox98/src/test/java/Tptogiar/calculcator/ExampleUnitTest.java @@ -0,0 +1,35 @@ +package Tptogiar.calculcator; + +import org.junit.Test; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import static org.junit.Assert.*; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see Testing documentation + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() { + assertEquals(4, 2 + 2); + } + + @Test + public void TestPattern(){ +// + Pattern compile = Pattern.compile( "^(\\-|\\+)?\\d+(\\.\\d+)?$"); + String a="+45.5"; + boolean matches = compile.matcher(a).matches(); + System.out.println(matches); + String result = compile.matcher(a).replaceAll(""); + System.out.println(result); + + + } + + +} \ No newline at end of file