Simple implementation of GCM, handling registration and receipt of a notification.