B4A Question Launching the application at the required time - DonManfred (first post)    Jan 07, 2023 1. StartServiceAt(Me, NextTimeInstance(21, 50) ,True) Is a code to start A SERVICE! You CAN NOT start an activity as a Service. FORGET about Activities: Switch to B4XPages. And use a SERVICE to start with StartServiceAt B4A Question How to solve a problem? - JohnC (first post)    Feb 13, 2021   (1 reaction) Just do a search in this forum - this was the first entry:
StartServiceAt (Service As Object, Time As Long, DuringSleep As Boolean)Schedules the given service to start at the given time.
Service - The service module. Pass Me when calling from a service module that schedules itself.
Time - The time B4A Tutorial Receivers and Services in 2023+ - Erel (first post)    Jan 15, 2023   (2 reactions) StartServiceAt / StartServiceAtExact will not work on Android 12+. This is related to new Android restrictions.
You need to use StartReceiverAt instead.
It has nothing to do with Google. This is a permission that the user grants your app. B4A-Bridge uses it for example.
With push notifications y B4A Tutorial [B4X] Features that Erel recommends to avoid - Erel (first post)    Oct 08, 2023   (5 reactions) Point #27: StartServiceAt / StartServiceAtExact -> StartReceiverAt / Exact With a few exceptions, it is no longer possible to start services in the background. Thanks @Sandman B4A Question App show alert and makes sound until user accepts or declines the alert, no matter if the phone is blocked or app is not active - Erel (first post)    Jan 20, 2021   (1 reaction) You can use StartServiceAt to schedule a service to start at a specific time. B4A Question startserviceat when user closes app - DonManfred (first post)    Sep 18, 2019   (1 reaction) Upload a small project where it is not working.
I don´t see a reason why it should not work at all.
Only keep in mind that you´ll not able to restart your app every 5 minutes.... The time between should be 30 minutes+
Also note that you should NOT use the starter service for this. Use another servic B4A Question StartServiceAt() quetion - jayshen    Sep 10, 2018 I made a project with B4A_3.82 + JDK_1.7 + API_19 about many years ago.
It runs normally in Android 4.4 devices.
But it runs abnormally in Android 5.0 or above devices.
StartServiceAt("", DateTime.Now + 1000, True)
It runs every 1000 ms in Android 4.4 devices , but it runs every 5000 ms to 7000 B4A Question StartServiceAt - An Schi (first post)    Jul 27, 2017   (1 reaction) You can try
StartServiceAtExact
StartServiceAndAllowWhileIdle
Other then that you can check if your phone uses any kind of powersaving or if you can exclude your app from protection. B4A Question Sticky Service Not ReStarting - Jonathan Rigley (first post)    Aug 26, 2015   (2 reactions) Use:
StartServiceAt(YourServiceName, DateTime.Now, True)
This will start your service straight away. The service will get killed but will automataclly start again.
Don't forget to add:
#Region Service Attributes
#StartAtBoot: True
#StartCommandReturnValue: android.app.Service.START_STIC B4A Question Alarm Date Problem - Erel (first post)    Feb 10, 2020 StartServiceAt(AlarmService, Alarm, True) Page: 1   2   3   4   5   6   7   Powered by ColBERT |