Enable and disable flight mode

Hi everyone.

I created a couple apps not long ago and I just had a new idea : I want to create an app which can enable and disable the flight mode (or airplane mode) of my phone at a precise time.

For instance, I choose an hour and when I click on a button, the app is able to program the activation and desactivation of the flight mode of my phone.

Do you know how I can do that with the blocks ? I may need an extension for that, but which one do y’all think is better ?


If it is possible at all Thomas, you would use an intent.
ActivityStarter is the tool used to work with intents in App Inventor 2.

Is what you want to do possible with intents? You can find out.

  1. Go to the MENU on the Designer
  2. Select Help
  3. Select Library
  4. Find Using the Activity Starter and read the article that explains most of what you need.
  5. Can an intent be used to switch airportmode? Here are a list of Settings that probably can be used with the Activity Starter.

Can you enable and disable something at a precise time? Not without a work around. App Inventor 2 cannot create a Service app (an app that runs in the Background). To trip an activity at a specific time, the app would have to run in the background or have a way to prevent the app from going to sleep and shutting down the screen. With App Inventor, you can use a Stay Awake work around and a Clock component within the app.

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.

There may be a way to do something similar using an Extension.

Here are some resources to help you learn to use the AI2 tools. A very good way to learn App Inventor is to read the free Inventor’s Manual here in the AI2 free online eBook http://www.appinventor.org/book2 … the links are at the bottom of the Web page. The book ‘teaches’ users how to program with AI2 blocks.

There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro and the aia files for the projects in the book are here: http://www.appinventor.org/bookFiles

How to do a lot of basic things with App Inventor are described here: http://www.appinventor.org/content/howDoYou/eventHandling .

Also look here http://kio4.com/appinventor/index.htm and here http://www.imagnity.com/tutorial-index/ for more tutorials.

Hopefully this stuff will get you started with this Project.


Hi Steve !

Sorry for my late reply. Thanks a lot ! I’ll work on that later !