Update code for registering with GCM