[Discontinued] Background Tasks [4.1] 🥳

If I understood but this block has several values ​​so I don’t know what to put in “values” of the creatFunction block.

This is my blocks

The notification Style component doesn’t function properly with the extension, please wait for the fix by today.

@Xoma Ahhh i see… So what extension you are using on Background Tasks extension 3.0 A [STABILIZED] - #136 by Xoma ??

I am using the Notification component one from Kodular. To enable it you have to Got to account → Settings → And turn on Experimental properties.

@Xoma Thankyou so much it works

But i have a problem, the notification display only 17, but the firebase was 17:19, 17:20, etc. How to fix this?

1 Like

So now is it possible to run download in background ? :thinking::thinking:

Can you please show me you’re firebase DB data?
Also, the foreground service is not required You may turn it off.

Also, make sure you use it correctly. Try to use the URI decode block. The extension just shows the one value got from the Firebase component.

Maybe, I’ve never tried it but.

I am trying it but it’s not working :roll_eyes: :roll_eyes:

@Xoma Here is my firebase DB data
“Waktu” is a string value. But the notification shows “18”.
I dont know whats wrong

It’s because you have not stored the value in a proper way.
If your value contains a special character or the value is a string that it must be stored in this way​:point_down:

"\" Your value\"'
1 Like

The notification style component doesn’t work. Just wait, the new version will support it!

1 Like

@Xoma Owhh my bad, the data was send by arduino. im gonna change the arduino first.
Thankyou so much for your explanation

1 Like

Extension 3.1 A

:smiley: The new version is ready and includes the below changes:

  • Extension is now more likely to work with components like Notification style and other things :grin:.

    It was my mistake actually… When the Notification style extension has called (.getClassName) while preparing for the start value for the notification, it would be null and it could not function.

  • Added support towards comparing objects/boolean values (true/false) and others like a string when any registered event is raised.

    Here is the usage of the new component ExtraFunction. It’s the same as a function that will compare the texts and if the result is true it will call another function. It basically filters values.

    Wherever you will use {$0} in the Extra function block that means the event values, its the same as the function block which replaces data.

    For the function to know (differentiate) if the function Id is extra functions or the normal functions, you’ll need to add the dollar symbol before that.

    To compare strings you should use "anotherstring".equals("comparingstring") or the equals segment. To compare numbers or true or false values you will have to use the = symbol twice like ({$0} == 7). Suppose the {$0} is the event value which means 7 the extension will replace and will compare it like this 7 == 7 and the condition is true so it’ll execute the function.

    After the comparison, put a space and put :: with the function inside the function Id, then it’ll call the function, below is an example of how it works.

    Also make sure not to put many spaces or the extension will fail to understand it.
    The extension can also execute multiple items (provided as list). So you’ll be able to call many functions as well.

0 event value: "77" (this is string and NOT number)
functionId: "show-notification"

"{$0}".equals("77") :: function(show-notification)
"77".equals("77") :: function(show-notification)
true :: function(show-notification)

(now the result is true so it will call the function id 'show-notification')

  • Download the extension: com.kumaraswamy.tasks.aix (431.1 KB)

  • Download demo AIA file to work with notification style and with filtering the Firebase data change:

    FirebaseFilter.aia (467.8 KB)

    Make sure to update firebase token, and api, also the extension will only listen to the only tag text. You can change the value in the extra function block.


Great extension !!

what is more, it’s for free!!

thank you !!!


How to run a sensor-based app in the background? Like I want to run Accelometer in the background to get values?

Hello, @gdeveloper

You can take a look to the post above, which includes pedometer sensor running in the Foreground service and accordingly it’ll send the simple steps event value to the firebase.

You may change the event and the component and try running it.

And a note to everyone:

Do not name the function Id with any upper case letters, If you will be using with the ExtraFunction Id, it will not work because of a bug.

Hello. Last time I successfully received the firebase data and displayed it in the notification. Now I want to fetch data from firebase then save in tinydb. But no data is saved. How to fix it?
The notification (data:data) is always " "



I’ve found the following mistakes in you’re blocks.

  • You have named the initialize function Name initialize which should be Initialize instead.
  • You’re registering the event late so it might not be triggered at first.

Also you’re blocks looks messy, what are you actually trying to achive?

@Xoma Im trying to save firebase data on tinyDB every data changed. Then show notification from tinyDB every hour.