[Discontinued] Background Tasks [4.1] πŸ₯³

That means we’ll have to check each second or with an interval. Or use Taifun Battery manager.
This is possible, but the current version doesn’t have a feature that auto-starts the service itself manually. You may need to use version 4.0 Beta that adds an ability to define a mode that is expected to restart the service again without depending on the system to do so.

@Xoma yes i have the bettery extension in the app, where can i download the beta version? and then can you send block to me? how can I implement it? Thanks very much

You can get the beta version from:

But wait for me to push the new code.

1 Like

@Xoma You would have an example of how to get the location in the background, because as I mounted the blocks, they don’t send the location to firebase in the background.

Sensor Location

Google Maps

LocationRecorder.aia (472.4 KB)

Yeah, sorry forgot to provide the AIA file.

2 Likes

Thank you very much you helped a lot.
you are doing a great job congratulations.

1 Like

Click on the image to zoom that

TaifunBattery (1).aia (465.8 KB)

Here are the blocks for version 4.0.
We just regester an event and check things using Java through Extra function and pass it to a function that shows a notification.

You will have to change the battery value or the value of battery when reached will trigger the notification.
Here we also use a variable to stop the notification from appearing multiple times.

Go to this link and click on download.
31.08.2021_11.13.39_REC

Select HIGH mode with Repeated ticked that will restart the service once killed. Also test on various devices (at least two) before you roll you app update to production.

3 Likes

Make the extension to running when boot 777 and also in background, When i set 777 in id it only works when receiving boot, but not for the background.

@Xoma Thank you very much, I will do it right away, if it works, thank you very much, can I donate to you at PayPal?

Hi. I saw your video on youtube. But i dont know your language, so i cant understand what you write on note. So, can you share your aia file for me. I try to code same but it is hard for me when I dont know your component
Thank

It works, many thanks. I have a request, I would like that he then plays a sound when the notification is sent.

Friend, this video I made (I think :thinking:) in the first week that the extension was released :slightly_smiling_face:. So, I think a lot of things have changed in the way the extension is used. Maybe that example I posted (in version 1.0 of this great extension), doesn’t work correctly :pensive: anymore or the blocks don’t even exist. I’m not sure because I didn’t follow the releases of the new versions. :confused:

2 Likes

@Xoma I have encountered a problem, a notification is sent even if the phone is not charging. How can I remove this?

Sure, you can P.M me :slightly_smiling_face:

Yes, you just have to change if (val2) == 92 && !is_shown to if (val2) == 92 && !is_shown && val0.equals ("charging"). This will make sure the status of the Taifun battery change event is β€œcharging”.

1 Like

@Xoma Thanks, how can I let the sound play, the player has already been created.

So the sound should only play when a notification is sent

You can just create a function that plays the sound and then use the exact same logic but change the function id to your player play function Id :smiley:

I made a player. and wanted it to be triggered when a notification is also sent, I can’t add that two things are carried out, i.e. notification and the sound.

1 Like

Its really simple!

1 Like

@Xoma i sent you a private message did it arrive?

1 Like

Are my blocks correct to play music for alarm