Android Notification Bar

367 views
Skip to first unread message

Andi

unread,
Sep 15, 2011, 3:17:14 AM9/15/11
to Robotium Developers
Hi,

I read on the Robotium-Page that it is not possible to test if there
are notifications or even which notifications. My problem is that I
want to test an application which recieves Notifications if the
communication with the server was successfull or not. So I wanted know
if somebody else have any idea, how to check if Notifcations were
recieved using something different within Robotium.

Thanks for every answer, which will help me with this issue.

Andi

unread,
Sep 23, 2011, 7:09:41 AM9/23/11
to Robotium Developers
Hi,

i found a solution which might be interesting for someone. What i did
was to create a BroadcastReciever in my Testproject
which will invoke his onRecieve-Methode if there are intents with the
action which will represent the notification. This was the only way
i can determine if there are and which notifications were send or not.
To determine on which actions the onRecieve-Methode should be invoke
you can
determine the Action in the AndroidManifest.xml by adding an intent
Filter with the actions you would like to recieve.

Yahor Paulavets

unread,
Sep 23, 2011, 7:42:54 AM9/23/11
to robotium-...@googlegroups.com
Hello,

Thank you for sharing hard investigation results. I had no Idea how to test it.

Now I have it :)

Thanks!

Best regards,
Yahor

--
You received this message because you are subscribed to the Google Groups "Robotium Developers" group.
To post to this group, send email to robotium-...@googlegroups.com.
To unsubscribe from this group, send email to robotium-develo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/robotium-developers?hl=en.


infoTest

unread,
Oct 14, 2011, 3:32:52 AM10/14/11
to robotium-...@googlegroups.com
Hello Andi,

can you please share the code snippet of how you check for notifications.
Also, how to check for the notification intents when you dont have access to the code of the app under test?

Appreciate your help


Yahor Paulavets

unread,
Oct 14, 2011, 2:57:12 PM10/14/11
to robotium-...@googlegroups.com
"Also, how to check for the notification intents when you dont have access to the code of the app under test?"

You can find intent in the logcat.

"can you please share the code snippet of how you check for notifications."

Just google for any simple broadcast receiver sample. Register it in setUp, deregister in teardown.

Best regards,
Yahor 

--
You received this message because you are subscribed to the Google Groups "Robotium Developers" group.

Andi

unread,
Nov 8, 2011, 3:41:00 AM11/8/11
to Robotium Developers
Hi,

my purpose was wrong. This only works if the app sends broadcast
intents when a notification was send.
I´m sry for giving you wrong information, I´m new to android
development and I just figured it out a few days ago.

But if someone else has good suggestions how to check for
notifications, especially the message would be great, please post it.

Thanks,

Andi

Andi

unread,
Nov 8, 2011, 3:41:45 AM11/8/11
to Robotium Developers


On Oct 14, 7:57 pm, Yahor Paulavets <ypaulav...@agilefusion.com>
wrote:
> >http://groups.google.com/group/robotium-developers?hl=en.- Hide quoted text -
>
> - Show quoted text -

Zhichao Ren

unread,
Mar 16, 2016, 11:10:28 PM3/16/16
to Robotium Developers, andi.h...@googlemail.com
Hi, Andi

I have same problem as you now. Do you figure out how to dismiss the notification bar during the testing?

Thanks,
Zhichao
Reply all
Reply to author
Forward
0 new messages