Extension: Notification and run application.

638 views
Skip to first unread message

Juan Antonio

unread,
Jan 20, 2018, 11:55:57 AM1/20/18
to mitappinv...@googlegroups.com
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 "AppInventor" 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
StartAppInventor (activityPackage) ---> Run directly an installed 'AppInventor' application (without notification).
Example: appinventor.ai_juananton1991.p193B_gif_animado
Example: com.thunkable.android.juananton1991.p193B_gif_animado

ToBackground
ToForeground (works when app is installed) (if app is "very asleep" doesn't trigger.)

ScreenOnAcquire.

PowerManager powerManager = (PowerManager) getSystemService(POWER_SERVICE);
WakeLock wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "MyWakelockTag");
wakeLock.acquire();

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






Regards
Juan Antonio Villalpando
com.KIO4_Notification.aix
p191B_notificacion_ejecutar.aia

Juan Antonio

unread,
Jan 20, 2018, 12:21:12 PM1/20/18
to mitappinv...@googlegroups.com
Notification - Arduino - Bluetooth HC-06

In this post, there is an example for send information from Arduino-BT to Android and from Android to Arduino-BT.

- We let's keep the same connections and the same Arduino sketch

--------------------------------------------------------------------------------------------------------------------

- Now when we Click a Button in Arduino-BT (boton2 or boton3) a message is sent to Android:

"Hola amigo" or "Me llamo Juan" (those messages are in sketch Arduino)


- Android receives that message.

- If message contains "Hola" trigger a Notification, if contains "Juan" trigger other Notification.

- These Notifications carry another signal message: "Click button Hola" or "Click button Juan"

- When user touch Notification that message is shown in Label2 


- Install and try this app with blocks: ToBackground, ToForegroun, ScreenOnAcquire, ScreenOnRelease.


http://kio4.com/appinventor/291B_extension_notificacion.htm

Bluetooh_Dos_Pulsadores.ino
p41i_arduino_a_movil_BackG.aia
Reply all
Reply to author
Forward
0 new messages