应用服务启动后延迟2秒执行提醒任务

This commit is contained in:
ZhanGSKen 2025-05-03 14:01:56 +08:00
parent 55ce968053
commit 482c007481
2 changed files with 15 additions and 5 deletions

View File

@ -1,8 +1,8 @@
#Created by .winboll/winboll_app_build.gradle
#Tue Apr 29 21:00:39 HKT 2025
#Sat May 03 05:59:40 GMT 2025
stageCount=1
libraryProject=
baseVersion=15.3
publishVersion=15.3.0
buildCount=0
buildCount=3
baseBetaVersion=15.3.1

View File

@ -32,6 +32,8 @@ import cc.winboll.studio.powerbell.utils.AppConfigUtils;
import cc.winboll.studio.powerbell.utils.NotificationHelper;
import cc.winboll.studio.powerbell.utils.ServiceUtils;
import cc.winboll.studio.powerbell.utils.StringUtils;
import android.os.Handler;
import android.os.Looper;
public class ControlCenterService extends Service {
@ -114,9 +116,17 @@ public class ControlCenterService extends Service {
mControlCenterServiceReceiver = new ControlCenterServiceReceiver(this);
mControlCenterServiceReceiver.registerAction(this);
}
startRemindThread(mAppConfigUtils.mAppConfigBean);
ToastUtils.show("Service Is Start.");
LogUtils.i(TAG, "Service Is Start.");
new Handler(Looper.getMainLooper()).postDelayed(new Runnable(){
@Override
public void run() {
startRemindThread(mAppConfigUtils.mAppConfigBean);
ToastUtils.show("Service Is Start.");
LogUtils.i(TAG, "Service Is Start.");
}
}, 2000);
}
}