Agn88 ttslot88 改包名 改签名

This commit is contained in:
xuhuixiang
2025-03-19 14:11:31 +08:00
parent 679b3b3ce3
commit 4cc76c45a4
24 changed files with 134 additions and 326 deletions

View File

@@ -45,16 +45,12 @@ android {
// 创建输出目录
outputDir.mkdirs()
def outputFileName = "${appName}.apk"
// 设置输出文件名
setOutputFileName(outputFileName)
// 计算新的输出文件
def newOutputFile = new File(outputDir, outputFileName)
// 如果新的输出目录不存在,则创建它
newOutputFile.parentFile.mkdirs()
// 在构建完成后将 APK 复制到新位置
variant.assemble.doLast {
try {

View File

@@ -6,7 +6,6 @@ plugins {
android {
compileSdkVersion 31
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.web.FreeAUD"
minSdkVersion 24
@@ -50,16 +49,12 @@ android {
// 创建输出目录
outputDir.mkdirs()
def outputFileName = "${appName}.apk"
// 设置输出文件名
setOutputFileName(outputFileName)
// 计算新的输出文件
def newOutputFile = new File(outputDir, outputFileName)
// 如果新的输出目录不存在,则创建它
newOutputFile.parentFile.mkdirs()
// 在构建完成后将 APK 复制到新位置
variant.assemble.doLast {
try {

View File

@@ -10,7 +10,7 @@ android {
defaultConfig {
//37
applicationId "com.web.agn888new"
applicationId "com.web.agn"
minSdkVersion 24
targetSdkVersion 31
versionCode rootProject.ext.versionCode
@@ -20,16 +20,16 @@ android {
}
signingConfigs {
debug {
storeFile file('agn.jks')
storePassword "android2025"
storeFile file('ppn.jks')
storePassword "2014123456"
keyAlias 'key0'
keyPassword "android2025"
keyPassword "2014123456"
}
release {
storeFile file('agn.jks')
storePassword "android2025"
storeFile file('ppn.jks')
storePassword "2014123456"
keyAlias 'key0'
keyPassword "android2025"
keyPassword "2014123456"
}
}
buildTypes {
@@ -42,7 +42,7 @@ android {
applicationVariants.all { variant ->
variant.outputs.all {
def appName = "agn888new"
def appName = "agn888"
def outputDir = new File(rootProject.ext.outputPath)
// 创建输出目录
outputDir.mkdirs()

View File

@@ -5,11 +5,30 @@
"storage_bucket": "agn888-3b8ef.firebasestorage.app"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:908864777300:android:07ba7be57fb0c9d2ac11c1",
"android_client_info": {
"package_name": "com.web.agn"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyB8ISe5W0zOSSvV88sH-u4DMAhO_0Mnjfg"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:908864777300:android:682bf12a10bfa0dbac11c1",
"android_client_info": {
"package_name": "com.web.agn888new"
"package_name": "com.web.agn888"
}
},
"oauth_client": [],
@@ -28,7 +47,7 @@
"client_info": {
"mobilesdk_app_id": "1:908864777300:android:fc7d3cac6abe01c2ac11c1",
"android_client_info": {
"package_name": "com.web.agn888newnew"
"package_name": "com.web.agn888new"
}
},
"oauth_client": [],

BIN
agn888new/ppn.jks Normal file

Binary file not shown.

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.web.agn888new">
package="com.web.agn">
<uses-feature
android:name="android.hardware.camera"

View File

@@ -1,4 +1,4 @@
package com.web.agn888new;
package com.web.agn;
import android.content.pm.PackageInfo;
@@ -18,18 +18,20 @@ public class MainActivity2 extends com.web.base.MainActivity2 {
userId = 37;
saveInt(MainActivity2.this,"user_code",userId);
saveInt(MainActivity2.this,"version_code",getVersion());
// com.web.base.MainActivity.saveString(this, "base_url","");
//网页的底部NavigationBar颜色
com.web.base.MainActivity.saveString(this, "style_color", "#1250a1");
//页面的大背景颜色
com.web.base.MainActivity.saveString(this, "windows_color", "#ffc608");
//任务栏的文字颜色 0 1白 默认黑
saveInt(MainActivity2.this,"is_white",1);
super.onCreate(savedInstanceState);
//用于修改大背景渐变色 不设置 大背景就是 windows_color 的颜色
setBackDrawables(R.drawable.big_bg);
setImageView(false);
//订阅主题
FirebaseMessaging.getInstance().subscribeToTopic("demo")
.addOnCompleteListener(new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
String msg = "Subscribed";
if (!task.isSuccessful()) {
msg = "Subscribe failed";
}
}
.addOnCompleteListener(task -> {
});
}

View File

@@ -1,4 +1,4 @@
package com.web.agn888new;
package com.web.agn;
import android.app.NotificationChannel;
import android.app.NotificationManager;

View File

@@ -1,4 +1,4 @@
package com.web.toto88new;
package com.web.agn;
import android.app.Application;
import android.content.Context;

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="270"
android:startColor="#ffc608"
android:endColor="#ffc608"/>
</shape>

View File

@@ -9,7 +9,7 @@ android {
defaultConfig {
//101
applicationId "com.web.toto88new"
applicationId "com.web.tt88"
minSdkVersion 24
targetSdkVersion 31
versionCode rootProject.ext.versionCode
@@ -19,16 +19,16 @@ android {
signingConfigs {
debug {
storeFile file('toto.jks')
storePassword "android2025"
storeFile file('toto88.jks')
storePassword "dskj123456"
keyAlias 'key0'
keyPassword "android2025"
keyPassword "dskj123456"
}
release {
storeFile file('toto.jks')
storePassword "android2025"
storeFile file('toto88.jks')
storePassword "dskj123456"
keyAlias 'key0'
keyPassword "android2025"
keyPassword "dskj123456"
}
}
@@ -43,7 +43,7 @@ android {
applicationVariants.all { variant ->
variant.outputs.all {
def appName = "toto88new"
def appName = "toto88"
def outputDir = new File(rootProject.ext.outputPath)
// 创建输出目录
outputDir.mkdirs()

View File

@@ -9,7 +9,7 @@
"client_info": {
"mobilesdk_app_id": "1:538250911070:android:a019ab039c5fcdba71c3cf",
"android_client_info": {
"package_name": "com.web.toto88new"
"package_name": "com.web.toto88"
}
},
"oauth_client": [],
@@ -28,7 +28,26 @@
"client_info": {
"mobilesdk_app_id": "1:538250911070:android:4de5657dbba389e071c3cf",
"android_client_info": {
"package_name": "com.web.toto88newnew"
"package_name": "com.web.toto88new"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyCSIHjVDdNqyN5Acc0wG2puTb1XCQZjxkU"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:538250911070:android:7a752e4082f2f6ac71c3cf",
"android_client_info": {
"package_name": "com.web.tt88"
}
},
"oauth_client": [],

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.web.toto88new">
package="com.web.tt88">
<uses-feature
android:name="android.hardware.camera"

View File

@@ -1,51 +0,0 @@
package com.web.toto88new;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import androidx.annotation.NonNull;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.messaging.FirebaseMessaging;
public class MainActivity2 extends com.web.base.MainActivity2 {
@Override
protected void onCreate(Bundle savedInstanceState) {
userId = 101;
saveInt(MainActivity2.this,"user_code",userId);
saveInt(MainActivity2.this,"version_code",getVersion());
super.onCreate(savedInstanceState);
//订阅主题
FirebaseMessaging.getInstance().subscribeToTopic("demo")
.addOnCompleteListener(new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
String msg = "Subscribed";
if (!task.isSuccessful()) {
msg = "Subscribe failed";
}
}
});
}
public int getVersion(){
try {
PackageManager packageManager = getPackageManager();
PackageInfo packageInfo = packageManager.getPackageInfo(getPackageName(), 0);
String StringversionName = packageInfo.versionName; // 版本号
int versionCode = packageInfo.versionCode; // 版本码
// 在这里可以使用versionName和versionCode进行相关的操作
// Log.d("VersionInfo", "VersionName: " + versionName + ", VersionCode: " + versionCode);
return versionCode;
} catch (PackageManager.NameNotFoundException e) {
return 0;
}
}
}

View File

@@ -10,7 +10,7 @@ android {
defaultConfig {
//102
applicationId "com.web.ttslot888new"
applicationId "com.web.ttslot"
minSdkVersion 24
targetSdkVersion 31
versionCode rootProject.ext.versionCode
@@ -20,16 +20,16 @@ android {
signingConfigs {
debug {
storeFile file('ttslotweb.jks')
storePassword "android2025"
storeFile file('ppn.jks')
storePassword "2014123456"
keyAlias 'key0'
keyPassword "android2025"
keyPassword "2014123456"
}
release {
storeFile file('ttslotweb.jks')
storePassword "android2025"
storeFile file('ppn.jks')
storePassword "2014123456"
keyAlias 'key0'
keyPassword "android2025"
keyPassword "2014123456"
}
}
@@ -44,7 +44,7 @@ android {
applicationVariants.all { variant ->
variant.outputs.all {
def appName = "ttslot888new"
def appName = "ttslot888"
def outputDir = new File(rootProject.ext.outputPath)
// 创建输出目录
outputDir.mkdirs()

View File

@@ -5,11 +5,30 @@
"storage_bucket": "ttslot888-29636.firebasestorage.app"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:1098406701837:android:b572337dad631768355e44",
"android_client_info": {
"package_name": "com.web.ttslot"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyBIeR89kn0Q-5TN7yyCQnUehnQYmmVpEqk"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:1098406701837:android:bcb6a76a6acfafb1355e44",
"android_client_info": {
"package_name": "com.web.ttslot888new"
"package_name": "com.web.ttslot888"
}
},
"oauth_client": [],
@@ -28,7 +47,7 @@
"client_info": {
"mobilesdk_app_id": "1:1098406701837:android:a906de8231ccb6d3355e44",
"android_client_info": {
"package_name": "com.web.ttslot888newnew"
"package_name": "com.web.ttslot888new"
}
},
"oauth_client": [],

BIN
ttslot888new/ppn.jks Normal file

Binary file not shown.

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.web.ttslot888new">
package="com.web.ttslot">
<uses-feature
android:name="android.hardware.camera"

View File

@@ -1,4 +1,4 @@
package com.web.ttslot888new;
package com.web.ttslot;
import android.content.pm.PackageInfo;
@@ -18,18 +18,20 @@ public class MainActivity2 extends com.web.base.MainActivity2 {
userId = 102;
saveInt(MainActivity2.this,"user_code",userId);
saveInt(MainActivity2.this,"version_code",getVersion());
// com.web.base.MainActivity.saveString(this, "base_url","https://freeaud.asia/");
//网页的底部NavigationBar颜色
com.web.base.MainActivity.saveString(this, "style_color", "#131313");
//页面的大背景颜色
com.web.base.MainActivity.saveString(this, "windows_color", "#d72026");
//任务栏的文字颜色 0 1白 默认黑
saveInt(MainActivity2.this,"is_white",1);
super.onCreate(savedInstanceState);
//用于修改大背景渐变色 不设置 大背景就是 windows_color 的颜色
setBackDrawables(R.drawable.big_bg);
setImageView(true);
//订阅主题
FirebaseMessaging.getInstance().subscribeToTopic("demo")
.addOnCompleteListener(new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
String msg = "Subscribed";
if (!task.isSuccessful()) {
msg = "Subscribe failed";
}
}
.addOnCompleteListener(task -> {
});
}

View File

@@ -1,4 +1,4 @@
package com.web.toto88new;
package com.web.ttslot;
import android.app.NotificationChannel;
import android.app.NotificationManager;

View File

@@ -1,4 +1,4 @@
package com.web.agn888new;
package com.web.ttslot;
import android.app.Application;
import android.content.Context;

View File

@@ -1,172 +0,0 @@
package com.web.ttslot888new;
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.MainActivity2;
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<String, String> 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);
// if (remoteMessage.getNotification() != null) {
// showNotification(remoteMessage.getNotification().getTitle(), remoteMessage.getNotification().getBody());
// }
} else {
//收到通知 创建notify
if (remoteMessage.getNotification() != null) {
showNotification(remoteMessage.getNotification().getTitle(), remoteMessage.getNotification().getBody());
}
}
}
private void showNotification(MessageInfo messageInfo) {
Intent notifyIntent = new Intent(this, MainActivity2.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);
// Intent notifyIntent = new Intent(this, MainActivity2.class);
// notifyIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
// // notifyIntent.putExtra("message", messageInfo);
// notifyIntent.setAction(Intent.ACTION_VIEW);
// notifyIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // 必须
// PendingIntent pendingIntent;
// pendingIntent = PendingIntent.getActivity
// (this, 0, notifyIntent, PendingIntent.FLAG_ONE_SHOT | 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(com.web.base.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(com.web.base.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, MainActivity2.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(com.web.base.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(com.web.base.R.mipmap.app_logo)
.setContentTitle(title)
.setContentText(body)
.setAutoCancel(true)
.setContentIntent(pendingIntent);
}
notificationManager.notify(0, notificationBuilder.build());
//存储数据
// saveNotifyMessage(body);
}
// public void saveNotifyMessage(String body) {
// MessageInfo messageInfo = GsonUtils.getObjFromJSON(body, MessageInfo.class);
// String savenotify = Utils.get(getApplication(),ApiService.savenotify,"");
// if(messageInfo!=null){
// if(TextUtils.isEmpty(savenotify)){
// GsonUtils.getListFromJSON(savenotify,)
// }
// }
// String jsonString = GsonUtils.beanToJSONString(chatMessageBeans);
// }
//
// /**
// * @param key 要设置的key
// */
// public static void set(Context activity, String key, String is) {
// SharedPreferences nameSetting = getConfigShared(activity);
// SharedPreferences.Editor namePref = nameSetting.edit();
// namePref.putString(key, is);
// namePref.commit();
// }
}

View File

@@ -1,37 +0,0 @@
package com.web.ttslot888new;
import android.app.Application;
import android.content.Context;
import com.tencent.smtt.export.external.TbsCoreSettings;
import com.tencent.smtt.sdk.QbSdk;
import java.util.HashMap;
public class WebApplication extends Application {
public static Context application;
@Override
public void onCreate() {
super.onCreate();
// 设置开启优化方案
application = this;
HashMap map = new HashMap();
map.put(TbsCoreSettings.TBS_SETTINGS_USE_SPEEDY_CLASSLOADER, true);
map.put(TbsCoreSettings.TBS_SETTINGS_USE_DEXLOADER_SERVICE, true);
QbSdk.initTbsSettings(map);
QbSdk.initX5Environment(this, new QbSdk.PreInitCallback() {
@Override
public void onCoreInitFinished() {
}
@Override
public void onViewInitFinished(boolean b) {
}
});
QbSdk.setDownloadWithoutWifi(true);
}
}

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="270"
android:startColor="#d72026"
android:endColor="#d72026"/>
</shape>