Send an automatic SMS, without the user having to be active

Hi Guys,
I would like to automatically send an SMS at a certain time (variabel), without the user having to be active. (The app runs all the time in the background,)
What do I have to consider for the app to perform this function?
It would be great if someone could help me if it works with Inventor and how …
regards Carsten

App Inventor apps can not run in the background.

1 Like

Too bad … thank you anyway!

You might be able to do what you want by using a crutch. As Peter indicated, you can not run App Inventor 2 apps in the background. However, you can force the Android to StayAwake

Sorry. App Inventor 2 apps do not have any capability to run in the background. The best one can do is use a Stay Awake routine.

Either use a Stay Awake block routine using a Notifier

or you use Taifun’s Tools Extension: https://puravidaapps.com/tools.php

Be aware using either an extension or a block routine drains your device battery rapidly. These work around methods are not running the app in the Background, they force the app

screen to stay open.

If the app is running, you might use the Clock to send your sms at a particular time.

What you do depends on why you need to automatically send an SMS at a certain time (variable), without the user having to be active.

if you want to use one of the methods to keep the screen on, you might want to reduce the brightness of the device the reduce battery usage… the settings extension is able to do that
https://puravidaapps.com/settings.php

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

You can try this extension: https://github.com/OpenSourceAIX/ColinTreeGoHome/blob/master/cn.colintree.aix.ColinTreeGoHome.aix?raw=true
It leaves the application running in the background, but it will not work if the application is completely closed

Hello “Point” and thanks for the extension.
I’ll try it out and get in touch again …

1 Like

I have to import the extension and then just put it on the sreen1 and do not set otherwise … right?

This extension will not allow your application to perform background operations, but if you enable this block: 20200202_152843 your application will be able to run even if it is not in the front of the screen (but not off)