Added notifications

I added notifications for new messages. Additionally, I replaced Java-7-exclusive language features (such as the diamond operator and a string switch), so that the code compiles in ADT/Eclipse, too.