diff --git a/timestamp/build.properties b/timestamp/build.properties index 015e1f0d..a61d8985 100644 --- a/timestamp/build.properties +++ b/timestamp/build.properties @@ -1,8 +1,8 @@ #Created by .winboll/winboll_app_build.gradle -#Thu Jul 24 15:25:52 HKT 2025 +#Mon Jul 28 03:33:08 GMT 2025 stageCount=3 libraryProject= baseVersion=15.1 publishVersion=15.1.2 -buildCount=0 +buildCount=3 baseBetaVersion=15.1.3 diff --git a/timestamp/src/main/AndroidManifest.xml b/timestamp/src/main/AndroidManifest.xml index fe353647..b1705ab9 100644 --- a/timestamp/src/main/AndroidManifest.xml +++ b/timestamp/src/main/AndroidManifest.xml @@ -3,6 +3,9 @@ xmlns:android="http://schemas.android.com/apk/res/android" package="cc.winboll.studio.timestamp"> + + + @@ -45,6 +48,20 @@ + + + + + + + + + + diff --git a/timestamp/src/main/java/cc/winboll/studio/timestamp/receivers/MainReceiver.java b/timestamp/src/main/java/cc/winboll/studio/timestamp/receivers/MainReceiver.java new file mode 100644 index 00000000..05f0811f --- /dev/null +++ b/timestamp/src/main/java/cc/winboll/studio/timestamp/receivers/MainReceiver.java @@ -0,0 +1,40 @@ +package cc.winboll.studio.timestamp.receivers; + +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import cc.winboll.studio.libappbase.LogUtils; +import cc.winboll.studio.timestamp.MainService; +import cc.winboll.studio.timestamp.models.AppConfigsModel; +import cc.winboll.studio.timestamp.utils.AppConfigsUtil; + +/** + * @Author ZhanGSKen&豆包大模型 + * @Date 2025/07/28 11:15 + * @Describe MainReceiver + */ +public class MainReceiver extends BroadcastReceiver { + + public static final String TAG = "MainReceiver"; + + static final String ACTION_BOOT_COMPLETED = "android.intent.action.BOOT_COMPLETED"; + + AppConfigsUtil mAppConfigsUtil; + + @Override + public void onReceive(Context context, Intent intent) { + String szAction = intent.getAction(); + if (szAction.equals(ACTION_BOOT_COMPLETED)) { + AppConfigsModel appConfigs = AppConfigsUtil.getInstance(context).loadAppConfigs(); + boolean isEnable = appConfigs.isEnableService(); + AppConfigsUtil.getInstance(context).saveAppConfigs(); + + Intent intentMainService = new Intent(context, MainService.class); + if (isEnable) { + context.startService(intentMainService); + } + LogUtils.i(TAG, "System Boot And Start ManagerService Completed!"); + } + } + +}