Firebase component is not actually meant to be used manually, there are special operations that needs to be done if you use Firebase, (try using Firebase component created by Dynamic Components extension, it would not work, it is the same here).
First you have to Call hidden “DefaultURL” property (which you cannot do directly), then FirebaseURL and at last FirebaseToken. This should be the order.
AppInventor/Kodular generally automatically does this, but isnt really easy doing that manually. I have wrote an autofix in the extension for next update, wait for that.
it will not work using firebase component as it needs to be initialized first, but there’s a firebase addon extension you can use it and it worked fine for me
Edited your aia file but unfortunatley the firebase extension doesn`t support store value yet, so I used on TagChanged event handler in demonstration, Which is working only when a tag is changed in your given bucket backGroundPlayer.aia (70.9 KB)
[1] Fix crashes, and event bugs
[2] Ability to call other procedures
[3] Internal optimizations
[4] Background service from now on will be ignored if the app is active.
[5] Added Cancel Block
[6] Auto Fix for components (Firebase)
Hey
after upgrading to version 1.1 my test project stopped responding, even minimized or even not being active, it doesn’t seem to run the service.
When downgrading to 1.0 it worked normally again.
hey, i just checked the project with v1 and v1.1 and both of them are working properly.
I guess i know where the problem is.
The latency is here set to 2 seconds, the service seems to be starting before you even close the app.
In v1.1, incase the service is started and “App” is not closed yet, the service will be strictly rejected. This was done because to prevent any false/miss/bad errors from appearing.
I set the “Latency” to 7 seconds and it was fine.
In the next update, i will try to add a feature “OnlyInBackground” which makes the task/service run when the app isnt active.
I thought about the latency issue, but came to the conclusion, “correct me if I’m wrong”.
In this way, I need to use a trigger to start the service in the background, such as a button where the user chooses such an action and in the sequence close the APP intentionally, which most of the time will not happen.
That way it wouldn’t be practical except when dealing with an alarm!