@Override
 public void onUnregistered(Context context) {
   SharedPreferences prefs = Prefs.get(context);
   String deviceRegistrationID = prefs.getString("deviceRegistrationID", null);
   DeviceRegService.unregisterWithServer(context, deviceRegistrationID);
 }
 @Override
 public void onRegistered(Context context, String registration) {
   DeviceRegService.registerWithServer(context, registration);
 }