diff --git a/Bintang918/build.gradle b/Bintang918/build.gradle index 2337db3..6021716 100644 --- a/Bintang918/build.gradle +++ b/Bintang918/build.gradle @@ -8,7 +8,7 @@ android { buildToolsVersion "30.0.3" defaultConfig { - applicationId "com.web.bintang918" + applicationId "com.web.bintang" minSdkVersion 24 targetSdkVersion 31 versionCode 109 diff --git a/Bintang918/google-services.json b/Bintang918/google-services.json index 508bc9a..e8a6695 100644 --- a/Bintang918/google-services.json +++ b/Bintang918/google-services.json @@ -5,6 +5,25 @@ "storage_bucket": "bintang918-ios.firebasestorage.app" }, "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:985316013410:android:fe369439e4bc860cc6e83b", + "android_client_info": { + "package_name": "com.web.bintang" + } + }, + "oauth_client": [], + "api_key": [ + { + "current_key": "AIzaSyAhLRvWS13LTqexIcRVWptbPSXwcLmmLzM" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [] + } + } + }, { "client_info": { "mobilesdk_app_id": "1:985316013410:android:1af4f1fec28e354cc6e83b", diff --git a/Bintang918/release/Bintang918.apk b/Bintang918/release/Bintang918.apk index eba46c8..ae19735 100644 Binary files a/Bintang918/release/Bintang918.apk and b/Bintang918/release/Bintang918.apk differ diff --git a/Bintang918/release/output-metadata.json b/Bintang918/release/output-metadata.json index e668e4e..cf39f40 100644 --- a/Bintang918/release/output-metadata.json +++ b/Bintang918/release/output-metadata.json @@ -4,7 +4,7 @@ "type": "APK", "kind": "Directory" }, - "applicationId": "com.web.bintang918", + "applicationId": "com.web.bintang", "variantName": "processReleaseResources", "elements": [ { diff --git a/Bintang918/src/main/AndroidManifest.xml b/Bintang918/src/main/AndroidManifest.xml index 31659d9..4d72b71 100644 --- a/Bintang918/src/main/AndroidManifest.xml +++ b/Bintang918/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@ + package="com.web.bintang"> () { - @Override - public void onComplete(@NonNull Task 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; - } - - } - -} diff --git a/Bintang918/src/main/java/com/web/bintang918/MyFirebaseMessageingService.java b/Bintang918/src/main/java/com/web/bintang918/MyFirebaseMessageingService.java deleted file mode 100644 index ff98d8f..0000000 --- a/Bintang918/src/main/java/com/web/bintang918/MyFirebaseMessageingService.java +++ /dev/null @@ -1,171 +0,0 @@ -package com.web.bintang918; - -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); -// 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, com.web.base.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.ic_launcher) - .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.ic_launcher) - .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.ic_launcher) - .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.ic_launcher) - .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(); -// } -} diff --git a/Bintang918/src/main/java/com/web/bintang918/WebApplication.java b/Bintang918/src/main/java/com/web/bintang918/WebApplication.java deleted file mode 100644 index 02531d6..0000000 --- a/Bintang918/src/main/java/com/web/bintang918/WebApplication.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.web.bintang918; - -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); - } -} diff --git a/Mk88aud/build.gradle b/Mk88aud/build.gradle index c0bf23b..bf1aa9d 100644 --- a/Mk88aud/build.gradle +++ b/Mk88aud/build.gradle @@ -8,7 +8,7 @@ android { buildToolsVersion "30.0.3" defaultConfig { - applicationId "com.web.mk88" + applicationId "com.web.mk88aud" minSdkVersion 24 targetSdkVersion 31 versionCode 106 @@ -25,13 +25,13 @@ android { } signingConfigs { debug { - storeFile file('mk88aud.jks') + storeFile file('mk88.jks') storePassword "android2014" keyAlias 'key0' keyPassword "android2014" } release { - storeFile file('mk88aud.jks') + storeFile file('mk88.jks') storePassword "android2014" keyAlias 'key0' keyPassword "android2014" diff --git a/Mk88aud/google-services.json b/Mk88aud/google-services.json index 3d619cf..795f88b 100644 --- a/Mk88aud/google-services.json +++ b/Mk88aud/google-services.json @@ -1,21 +1,21 @@ { "project_info": { - "project_number": "637535395676", - "project_id": "mk88au", - "storage_bucket": "mk88au.firebasestorage.app" + "project_number": "52740131004", + "project_id": "mk88aud", + "storage_bucket": "mk88aud.firebasestorage.app" }, "client": [ { "client_info": { - "mobilesdk_app_id": "1:637535395676:android:4a3c0ba171a6445b11ab99", + "mobilesdk_app_id": "1:52740131004:android:0ac002bce5d93980ee68b9", "android_client_info": { - "package_name": "com.web.mk88" + "package_name": "com.web.mk88aud" } }, "oauth_client": [], "api_key": [ { - "current_key": "AIzaSyBVa3ICPExBtE4YSVn0Fuimd0FoELPCvWA" + "current_key": "AIzaSyBd7vIJNQmpgI-C90GSUSnni3t72feVu_Y" } ], "services": { diff --git a/Mk88aud/mk88.jks b/Mk88aud/mk88.jks new file mode 100644 index 0000000..33a37bb Binary files /dev/null and b/Mk88aud/mk88.jks differ diff --git a/Mk88aud/release/mk88aud.apk b/Mk88aud/release/mk88aud.apk index 3d63569..7aad11d 100644 Binary files a/Mk88aud/release/mk88aud.apk and b/Mk88aud/release/mk88aud.apk differ diff --git a/Mk88aud/release/output-metadata.json b/Mk88aud/release/output-metadata.json index 9b2b426..1e3712e 100644 --- a/Mk88aud/release/output-metadata.json +++ b/Mk88aud/release/output-metadata.json @@ -4,7 +4,7 @@ "type": "APK", "kind": "Directory" }, - "applicationId": "com.web.mk88", + "applicationId": "com.web.mk88aud", "variantName": "processReleaseResources", "elements": [ { diff --git a/Mk88aud/src/main/AndroidManifest.xml b/Mk88aud/src/main/AndroidManifest.xml index 7d6fd5c..3e2097c 100644 --- a/Mk88aud/src/main/AndroidManifest.xml +++ b/Mk88aud/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@ + package="com.web.mk88aud">