How to to run a function in background even after the app is closed?

Thank you Shreyas for your detailed reply.
If this barrier is cut, we can develop even more innovatieve extensions which could help the app developers to stretch their wings broader.

It lets the kiwi fly !


It is still possible,
With this repo by @jarlissonlira2 : GitHub - jarlisson2/appinventor-sources at edi1
I am able to generate my BackgroundTasks extension with service element in it,
Now you would have a question in mind that how can it work without update
It’s because main extension information is stored in 4 Json Files inside extension in which 2 of them contains all the annotation and if you add service there then it will work(As a activity inside the json)(Not in extension)


This should finally solve the problem with the outdated ExoPlayer version:
[ grafik ] → @Mika

See e.g. here:

1 Like

Kodular tried to implement Tasks in the past. But they stopped implementing because of bugs
Why not Kodular try again implementing it?
App Inventor implemented but they shutdown the service
What are Tasks?
You can drag and drop invisible components like clock on tasks screen and you can program them in blocks which works in background

Yes, we already know this:


I still don’t understand how it will work. For the compiler to be able to understand these annotations, some changes are required to be done in the and other files, so that the compiler would be able to process them, and, for this particular case, add the <service> tag in AndroidManifest.xml.

1 Like

If so, then his extension should not work because those changes are missing in App Inventor’s compiler till now.

But someone has tested his extension and it worked.
Am I missing something?

1 Like

Okay, so to test this out, I created an app containing a service extension in AI2. It got compiled but crashed when I opened it. The same happened with Kodular Creator.

Perhaps, @Atom_Developer might want to answer this.


Yes background extention is working verry gud atom developer done great job

Yes, confirmed.
More precise: I tested his test APK.


Yes, the APK works, apparently because he decompiled it and manually adjusted the Manifest.

I got this last sentence in a post via PM from @Shreyash:
PS: Anyways, after the nb184 release there won’t be any need to decompile the app and you’ll directly be able to use that extension.

1 Like

And this means I was correct. You cannot add Services to your app using an extension unless the nb184 release is out.


I think we already know the answer now.


Ok, but why is it working for others without modifying manifest?
Or has no one bought his extension yet?

btw, I was also correct.

Because he used the latest AppInventor repo (nb184, ai2-test).

See this post from Evan Patton (MIT team) in the PowerUser forum (AI2):

1 Like

I understand that @Atom_Developer has used that repo to generate extension but what about Compiler as mentioned by @Shreyash because it has not been updated yet.

Sorry if I am asking too many questions. :slightly_smiling_face:

Check this:


From the information I got from @bodymindpower, they are asking the users of their extension to modify the manifest for the extension to work.


Thank you for clarifying my doubts :hugs:
This is what I was looking for. :innocent:
Thanks to you @bodymindpower too :slightly_smiling_face: