private void initialize() {
   pendingFormSubmissionService = context.pendingFormSubmissionService();
   SYNC_STARTED.addListener(onSyncStartListener);
   SYNC_COMPLETED.addListener(onSyncCompleteListener);
   FORM_SUBMITTED.addListener(onFormSubmittedListener);
   ACTION_HANDLED.addListener(updateANMDetailsListener);
 }
  @Override
  protected void onDestroy() {
    super.onDestroy();

    SYNC_STARTED.removeListener(onSyncStartListener);
    SYNC_COMPLETED.removeListener(onSyncCompleteListener);
    FORM_SUBMITTED.removeListener(onFormSubmittedListener);
    ACTION_HANDLED.removeListener(updateANMDetailsListener);
  }