Yeah possible, use periodic tasks?
Oh, I understand the problem now.
Please wait some time.
Background Tasks 3.5 A
Feature request
-
Alarm
A block to start the service with the exact instant provided. ID is the service Id that will get started when the alarm is fired.
-
Repeating alarm
Sets the repeating alarm for the service with the Id. Time is the instant. Interval is the time between each repeating alarm.
-
Cancel alarm
Cancels the pending/ongoing alarm. Also, cancel the service by CancelTask block.
Demo blocks
Blocks to show a notification with alarm blocks.
Download extension: com.kumaraswamy.tasks.aix (467.4 KB)
nice keep it up
Titan Geek, now you can use an alarm to do the thing.
Letβs say you want to show a notification at 9:30 AM.
If you just want to show it once (exact moment) then you can use the Alarm block.
If you want to start a service at the exact time but with repeat service, you can use the RepeatingAlarm block.
You need to pass the time, and the interval (if needed) to it. The service will again start at 9:30 AM.
The 3.5 version came, but no AutoStart option visible for the app.
Vivo 1920
I am still looking for a solution.
But, if your app is downloaded from the Play store, auto start maybe enabled automatically.
Great Thank you for this one.
I will test and report.
What autostart?
Auto start is an additional permission that manufacturers like Xiomie, Huawei or in any Chinese phones has. Services requires this permission if your service is non-foreground if you want to run the service also in the background.
Autostart will/may be automatically enabled if your app is installed from Google play according to some articles.
Nice update, Thank you. I noticed 1 thing. RestartAfterKill does not work with alarm
Nope. I have tasker installed on my huawei from App store and I had to enable it manually.
Hello, i want to call Airtable values in background every second. and send notification f new value is added. Please Tell me How can I Call Airtable Values. Please Help
Why every second? What is so important that you have to do it so often.
Yes. Because the service is being called alarm receiver. The value will be always set to false.
Ohh okay.
Yeah. If called every second, the system will just stop the service from overusing resources after some time.
You can use period tasks for this with a minimum interval of 15 minutes or alarm tasks with a minimum interval of 1 minute.
You may, however, use the clock component for the 1-second interval but this is not recommended for very long running tasks.
Ah ok. So the repeating alarm useless if it dies as soon as the screen goes off basically.
Yeah, it is useless to use with an alarm. You can use alarm repeating block instead.
What do you mean by this?
I used Alarm repeating block and repeat time was set to 2 minutes. It worked as it should as long as the screen was on. once the screen goes off it stops and starts again when screen comes on.
What is the thing you are doing in the service?
Nothing in particular just testing it by calling an appscripts that inserts time into a spreadsheet