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 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) 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 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 app crashes or force close - Erel (first post)    Aug 18, 2019   (1 reaction) Yes. Note that swiping the app from the recent apps list doesn't put the app in the STOPPED state (on most devices). This is different then closing it from the settings.
An app in the STOPPED state cannot be started without the user explicitly starting it. 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 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 Question How to keep apps running that use StartServiceAt in a loop - Erel (first post)    May 23, 2021 1. StartServiceAt will not help you if you need to do something every 30 seconds. The minimum interval is 15 minutes or 30 minutes.
2. StartServiceAt will not help too much if you want your app to run in the background.
The only way to do it is demonstrated in the background location example.
As y Page: 1   2   3   4   5   6   7   Powered by ColBERT |