Added basic notification functionality and replaced Java 7-only
functions so that it works with ADT (Eclipse)