Wake up app when receive notification

Hello,
it's possible to use App Inventor Extensions: Notification Listener | Pura Vida Apps to listen notifications from system. but if the app is closed this extension will just store notification in TinyDB.

if I use this extension Ullis Roboter Seite/AI2 Alarm I can create an alarm wich will open my app when alarm will fire.

but i didn't find a way to open my app when a notification is received. how could i do that ?

do you like to open your app when any notification from any app is received? Please elaborate...

See also this example

Btw. my alarmmanager extension is not only able to send a notification at a given time, it also can open your app at that time no matter if the screen is locked or not

Taifun

well,

the idea is : when a notification from my calendar is received, then i create an alarm wich open my app.

sometimes it works, but most of time the notification is catch by itoo but "onNotificationReceived" doesn't fire....so no textToSpeech and no alarm...
and if i open my app textToSpeech fire !!!

what is my problem ?

How do you receive a notification from your calendar?

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun


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

my calendar app send a notification when an event fire.

Oh sorry ! I wanted to post my project and i forgot it ! :see_no_evil:

CER_test.aia (802,2 Ko)

this looks a bit cumbersome... the calendar sends a notification, you listen to all notifications on the device and if there is a notification from the calendar, then you send another notification which on button click finally opens your app...

I'm not familiar with the calendar extensions we already have... it would be nice to have a calendar extension which can trigger an event...

btw. you do not need an alarmmanager in this case, the MelonNotification extension would be sufficient to send a notification

does the example project from here Notification Listener (powered by itoox-wrapper) and Itoo work for you?

Also for debugging let me suggest to use the Notifier.LogInfo method (see again my example project) and use logcat to check the log Capturing Device Logs using adb logcat

did you ask for post notification permission?

Taifun

yes you're rigth. i first tried like that, but i didn't find any extension to do this and i didn't succeded to do one...

I will have a look on it but my goal is not to send a notification but to open my app

yes i tried it and it worked. As you can see my blocks are copy of those one that's why i'm suprise to not succed to make it work !

i'm not familiar with adb that's why i use a log file wich is appened ..is there really a difference ?

I don't post notification !
my calendar app does it ! and i can see them...

If you want to find out, why sometimes it does not work, then use logcat. The blocks look fine.

Taifun

ok. i will invastigate this way...