Okay after some works and tests, found a way to call App procedures in the Background, which makes it possible to directly use procedure blocks in the background.
Great extension . I'm always reading this topic to see updates!
hello,
I'm trying this extension to include it in my app. The goal is to prevent the device doze mode when I run my app and also not consume much battery. I have set it to only 5 seconds to test, but I would like it to work with any time interval.
But it doesn't work for me in the 2 ways I have tried. What is the error in the blocks?
Thanks
@kumarswamy or someone can help me please?
I am not sure about those things
but you created this extension, didn't you?
Yeah, but in your way, I'm not that expert.
A simple foreground service can be applied.
You download the 4.0 from here:
I havent released it here yet.
Hello @Kumaraswamy
I am not a professional, I am an amateur and in my free time sometimes I dedicate myself to make an app with inventor and I am learning.
I just wanted to make the app work internally even when the screen is locked. I found a solution but I think it is not very suitable, and it consists of putting a player to play an mp3 file without sound. This way I managed to get any process to work even when the screen is locked, but I think it must consume a lot of power, that's why I wrote in this forum.
by the way about doze mode someone told me that this could be the problem, but I don't really know what it is....
As per my knowledge, foreground mode helps a little escape the doze mode. But it cannot fully stop that.
This differs on various devices, on Samsung, the foreground mode will be killed just after 5 - 7 mins in case app is cleared out. You have to also give necessary permissions (disabling battery optimizations and other things) for it to work long.
This got it working with the foreground mode. When the player is completed, choose different source of audio and play that (playlist type).
Thank you very much! I'll try it out and see how it goes!
Hi,
I have tested the blocks (on my device with android 12) and what I see is the screen stays on all the time.
Actually my idea is to run the playlist when the screen is locked. Is it possible to do it?
That should be possible, I had forgotten that the extension will flag android to make the screen stay all the time. An alarm triggering it should probably get it work, escaping the lock doze mode.
Hi, there
I'm trying to buid an app to send sms at a schedule time.
I've started by the sending part but it doesn't work
Can you see why?
Thank you!
Well sorry to bump this topic but i think @ABG (sorry for mention) you should add this in -
FAQ Section: Background Services - Frequently Asked Questions - MIT App Inventor Community
This is a very long thread. Which post should I link to from that FAQ?
probably the the first post? -
Background Tasks extension [3.8 A] - Extensions - MIT App Inventor Community
(added to FAQ)