[Free] Notification, run application. Background. Foreground. Run other Thunkable app


Hi friend,

this is a new extension about Notifications and run applications.
The Notifications work properly with the Services, App Inventor yet doesn’t works with Services but we can try Notifications.

In this extension we have several blocks:

NotificationApp (dataUri) —> We can trigger a Notification, touch on it when we receive it and run an Application.
NotificationAppInventor (activityPackage) --> We can trigger a Notification and run an installed “AppInventor” or Thunkable application.
Example: appinventor.ai_juananton1991.p193B_gif_animado
Example: com.thunkable.android.juananton1991.p193B_gif_animado

StartApp (dataUri) —> Run directly an installed application (without notification).
StartApp (dataUri = empty) —> Run an setting android app. Set Property Intent, example: android.settings.APPLICATION_SETTINGS
Example settings: http://kio4.com/appinventor/19C_activystarter_configuracion.htm
Example settings: https://developer.android.com/reference/android/provider/Settings.html
StartAppInventor (activityPackage) —> Run directly an installed ‘AppInventor’ or Thunkable application (without notification).
Example: appinventor.ai_juananton1991.p193B_gif_animado
Example: com.thunkable.android.juananton1991.p193B_gif_animado

ToForeground (works when app is installed) (if app is “very asleep” doesn’t trigger.)

ScreenOnRelease use this code: https://developer.android.com/training/scheduling/wakelock.html

PowerManager powerManager = (PowerManager) getSystemService(POWER_SERVICE);
WakeLock wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, “MyWakelockTag”);

Notification (signal) and NotificationSignal event:
Notification (signal) trigger an Notificacion, when touch on it, get signal (Example with Bluetooh)



  • Hola amigos, aunque las Notificaciones funcionan principalmente con los Servicios y App Inventor aún no los admite, podemos utilizarlas y comprobar su funcionamiento.

  • En esta extensión vuelvo a utilizar el Temporizador para retrasar la aparición de la Notificación.

  • Mediante los bloques podemos lanzar Notificaciones y cuando el usuario la pulse ejecutar una aplicación que tengamos instalada en nuestro móvil. También podemos ejecutar aplicaciones de App inventor y Thunkable.

  • Hay otros bloques para ejecutar las aplicaciones sin necesidad de utilizar las Notificaciones.

  • También podemos lanzar aplicaciones del Android, como las que vemos en:

  • Hay otros bloques que podemos probar, para que funcione algunos de ellos es necesario instalar la aplicación: ToBackground, ToForegroun, ScreenOnAcquire, ScreenOnRelease

  • Puedes ver el tutorial completo en:

Aquí están los archivos:
com.KIO4_Notification.aix (17.7 KB)
com.KIO4_Notification.aix (18.2 KB) (This is Last version. Sound property, deleteNotification)
p191B_notificacion_ejecutar.aia (25.9 KB)


Arduino - Bluetooth HC-06 - Notification. Messages

Well Done bro. Nice and useful extention


Great extension. However, after I install your aia tutorial and clicked on Button4, (Write number of seconds and this app will do a ToBackground and a ToForeground) this happend:


Thank you for try Hassan.

ToForeground (works when app is installed) (if app is “very asleep” doesn’t trigger.)

I have try with Android 5.1 and works for me. Perhaps doesn’t work with others versions.

I have fixed code p191B_notificacion_ejecutar.aia


App is install but ToBackground doesn’t work. (Runtime Error)
ToForeground works fine.

Device: honer 6x
Android Version: 7.0


In this post I have put a tutorial on sending information between the Arduino and Android via Bluetooth. When a message arrives to Android, a Notification is issued. It uses blocks NotificationSignal.


Others tutorials about Arduino and Bluetooth:


Thanks for the tutorial.

I would like to have a custom notification icon and suppress sound.


With this version you can suppress sound.
In Screen1 . Icon you can upload a icon image size 48x48
When you install app, Notification get that icon.

com.KIO4_NotificationS.aix (17.6 KB)



Me sale Error from Companion: Permission Denial: moveTaskToFront() from pid=27207, uid=10109 requires android.permission.REORDER_TASKS


Try after building the app - not in companion. See if that error stops.


@menfhis, como bien dice @mannankhanabdul, instala la aplicación para ver si funciona esos bloques. De todos modos algunos de esos bloques no funcionan en versiones recientes de Android.


Hello is it possible to change the color of led?
Thanks in advance,


Leds are a quite non-standard feature in android phones, in some versions it works with one code and in other versions with another, in this extension I do not implement it


Is it possible to dismiss the notifications from within the app?
Currently when I quit my app sometimes the notification still exist on status bar.



I have added a new block “deleteNotification”
To use the notifications, it is convenient that the application is installed.

com.KIO4_Notification.aix (17.7 KB)


Hi Juan…
Thank you very much!


Hi Juan Antonio! Tnx for your help! Just one question (i’m a totally noob to this world of app developing)
what is that “tick” parameter?
Can you explain that to me?
thank you so much and Well Done!


Hi @Gi_Di

you can look “tick” in this post:


Thank you!


Hey Juan! Excellent extension…exactly what I was looking for!! However, could you please add an option to suppress sound and also to add a notification icon perhaps?

I just saw that you had made these modifications earlier but I don’t seem to find these options in the latest update (the one where you added the deleteNotification block). Could you please add them back?

Thanks a ton,