[Discontinued] Background Tasks [4.1] 🥳

when sending push ! is firebase unlimited like onesignal?

1 Like

i think that if you show me an exemple with this i will understand so can you please put this in the background ?

1 Like

Please can you give me the aia file? im little bit confuse

1 Like

He created a Guide [With Aia] on it -

1 Like

If you need the .aia :SmartConnect_copie.aia (662.7 KB)

1 Like

You will not be able to pick any custom item in the runtime of the extension. Instead what you can do is pick a fixed devive and attempt to connect to it.

I’ve tested the below blocks (in foreground mode) getting the Bluetooth devices and show it in a notification.

When I turn on my Pc’s bluetooth and connect it to my bluetooth (its automatic) I get a notification of the new devices and the connected device.

Also I hope you can go further like when the device is connected sending data, or sending the same data received from the device as the tests.

I have tested it in a foreground service and not testing without it…

You must have to make sure all the APK permissions are allowed as well (the storage and the location) permission asking or manully. This is because the Bluetooth Admin component attempts to ask these permissions while the app is in the background state and it will crash.

Also read this:

To make it easy for you to understand:

  • The create component block just creates the new component dynamically in the Background.
  • Create Function block is to set up a function or a block with values (as lists) but not calling it. Because this will be called by CallFunction block with the function Id.
  • Regester a event means it will listen to all the events and filter out those which is regestered and accordingly call out the function Ids with the event values that can be accesed like {%0} Zero is the first value of the event or the counting starts from Zero,
1 Like

Yeah it’s the same but One signal should be a stable solution. But doing this way is just easy…


Ok tank you very much for your help, its pretty complexe but i will try to make my app alone !


You can ask here when you’re stuck into something (:

1 Like

Ok ! Just on thing i don’t need notification i can do this without notification ?

You can simply remove the register event block for that. This way the event will be ignored.

You can send a connect request to the device but you’ll need to extract the element from the device list as the device name/address and then connect to it but I realize that you cannot do it for the event values. We can do it through the Bluetooth client component:


This will directly return the address and the names which we can later pick a element. If you invoke this instead of the Bluetooth Admin’s event values and you can connected to it something like this:


If you want to get the first BLE device and connect it then you can use the segment (invoke:result:[0]) with the MakeExtra and send as the device address. But you’ll need to separate the Addresses and Names which is not posible in the current version. So instead you can provide a fixed element to connect.


Ok tank you !

1 Like

i don’t need to connect a device, Actually it is an application for a diy smart whatch so i start the app, i connect the device and when i put the cellphone standby (the screen is off) the app must be stay connected to the device and continue to collect data (time, steps) and send it to the device but it is pretty complicated and i don’t know how i can really made this. (i made the app but i don’t know how to put every fonctionnality on the background and if you want you can check my work)

That’s way complicated work. Why don’t you upload the steps to the database like firebase? And get the data at another end?

The alternative easy solution that requires the internet:

You just store the steps and get the value from another phone.

I can do this because i must not be dependent on the internet because it is a SmartWhatch but Can we do this with tiny DB ?

You should try out some tutorials and experiment you’re friend. Yes, you can store value to the tiny DB (locally)


OK thank’s i will try but please can just made for me the bluetooth for stay connected in the background without notification just stay the connection with the device please :).SmartConnect_copie.aia (662.7 KB)

I will need to find out the time and I don’t have an another phone to test as of now (they are old devices android 5, 6)…

I’ll try to test it with it.

Also i am not familiar with using Bluetooth from long time.

Ok thank you very much i think i just need the background of the bluetooth for made the rest of the application .

Take my app for do that for have the bluetooth already done.

Congratulations @Xoma for this great contribution!