How To Work With Notification Area...
Moderator: Martin
-
- Posts: 8
- Joined: 30 Mar 2016 13:29
How To Work With Notification Area...
So at my office, I keep my phone on the 'guest' network - I get notifications every 4 hours in the android notification area about how I need to 'tap here to sign into "Guest'" when the time has expired. Can I get automagic to pull down the UI, tap and press the I agree button on the company's web page? I played with it a little bit, but was unsure of how to find the "app" that notifications come in on so the flow would be able to assess a true false for if the notification existed.
Open to thoughts....love the product - doing a lot of other stuff with it, but this one has me a bit puzzed.
Thanks for any help!
Open to thoughts....love the product - doing a lot of other stuff with it, but this one has me a bit puzzed.
Thanks for any help!
Re: How To Work With Notification Area...
Hi,
On newer Android devices you can expand the notification drawer and long-click on a notification to show the app that displayed the notification.
Depending on the text shown in the notification, you could also directly use trigger Notification on Statusbar displayed with package name set to * to match all apps and then filter by text. Clicking the notification can be achieved with Perform Action on Notification on Statusbar and then use action Control UI: click("I agree");. You most probably have to add a sleep-action to wait a few seconds to give the browser a chance to load the web page.
Use button Show Overlay Control in action Control UI to see if the button within the web page is detected and can be clicked. You could try to resort to Execute Root Command: input tap <x> <y> (on a rooted device) if control UI is not working.
Regards,
Martin
On newer Android devices you can expand the notification drawer and long-click on a notification to show the app that displayed the notification.
Depending on the text shown in the notification, you could also directly use trigger Notification on Statusbar displayed with package name set to * to match all apps and then filter by text. Clicking the notification can be achieved with Perform Action on Notification on Statusbar and then use action Control UI: click("I agree");. You most probably have to add a sleep-action to wait a few seconds to give the browser a chance to load the web page.
Use button Show Overlay Control in action Control UI to see if the button within the web page is detected and can be clicked. You could try to resort to Execute Root Command: input tap <x> <y> (on a rooted device) if control UI is not working.
Regards,
Martin
-
- Posts: 8
- Joined: 30 Mar 2016 13:29
Re: How To Work With Notification Area...
That helps - the * part was messing me up - I didn't know how to match the app that was doing that notification, but I thought it was an 'and' scenario with the text match so like "this app" and "this text". So in using your long click - apparently I was right - it's android system doing that (I took a WAG). I did try this and it was 'true' and would move on in the flow even though I had wi-fi turned off, maybe the text match was off kilter or something. I'll continue to work on this - but you've put it in context for me which I appreciate VERY much!
Thanks!! If I need more help - I'll drop a note back here.
Thanks!! If I need more help - I'll drop a note back here.
-
- Posts: 8
- Joined: 30 Mar 2016 13:29
Re: How To Work With Notification Area...
I'm still not having much luck with this. So for testing, what I've done is not sign into the wi-fi network. So the status notification will keep showing up in the status bar for testing purposes. When I 'test' execute the flow, I have it sending a SMS to me to see if the condition about the notification is true or false - I get a SMS everytime, so I'm assuming it's thinking the notification is True at all times (even when Wi-Fi is turned off and no notifications exist in the status bar)....which puzzles me. I need to get this part straight before I continue on...anyone have ideas?
Re: How To Work With Notification Area...
Please, post your flow here so it would be easier to see where you are at the moment.
-
- Posts: 8
- Joined: 30 Mar 2016 13:29
Re: How To Work With Notification Area...
Here it is...yhanks for the help!!
- Attachments
-
- flow_Flow1_20160401_210422.xml
- (1.62 KiB) Downloaded 737 times
Re: How To Work With Notification Area...
So, the trigger is working as expected but you need the flow run only when your device is connected to wifi? You need to put Wifi connected condition after the trigger. You can define the ssd if you want only specific wifi networks to affect the flow, or use an asterix(*) if you want any and all wifi networks to affect it.
-
- Posts: 8
- Joined: 30 Mar 2016 13:29
Re: How To Work With Notification Area...
Thanks for the help and input! I appreciate that. I'm not sure that the trigger is working properly. When I have wi-fi off it still sends me a sms...and there's no notification in the status bar at that time. Unless I'm missing something, I'd only expect an sms if the notification is in the task bar with "Guest" from app "android system". Thoughts? Thanks!
Re: How To Work With Notification Area...
Can you reproduce the notification at will? If you can, use the same trigger but write "*" instead on package name and leave the filter empty. Then connect a condition debug dialog. Then reproduce the notification. It should open a debug dialog which contains information about the flow and variables provided by the trigger. There should be variables text, text_big, header, or something like that. From one of those, copy the value on the trigger's text filter and select corresponding variable from drop down menu. Also, check the package_name variable and copy the value in the trigger.
As martin said, you propably should change the send txt msg action to vibrate during testing. That would avoid any possible cost from txt messages and is more convenient fir testing purposes.
As martin said, you propably should change the send txt msg action to vibrate during testing. That would avoid any possible cost from txt messages and is more convenient fir testing purposes.
-
- Posts: 8
- Joined: 30 Mar 2016 13:29
Re: How To Work With Notification Area...
MURTUMA wrote:Can you reproduce the notification at will? If you can, use the same trigger but write "*" instead on package name and leave the filter empty. Then connect a condition debug dialog. Then reproduce the notification. It should open a debug dialog which contains information about the flow and variables provided by the trigger. There should be variables text, text_big, header, or something like that. From one of those, copy the value on the trigger's text filter and select corresponding variable from drop down menu. Also, check the package_name variable and copy the value in the trigger.
As martin said, you propably should change the send txt msg action to vibrate during testing. That would avoid any possible cost from txt messages and is more convenient fir testing purposes.
Ok - this makes sense and I buy in. Interestingly enough - the debug dialog does not show any of the notification variables...I see flow_name, trigger, triggertime, and global variables related to sound/volumes. So it seems like the statusbar is unable to be read by Automagic. I'm running a Samsung Note 5 with MarshMallow if that helps. So I think we know where the problem is, but I don't understand why Automagic can't or is unable to read the notifications in the status bar.