private void saveVoucherList(byte[] buffer) { try { String fname = ((User) getApplication()).loaduserIdFromPreferences(); String getVoucherResultString = FileUtils.convertByteArrayToString(buffer); boolean isGetVoucherSuccess = isgetVoucherSuccess(getVoucherResultString); if (buffer != null && isGetVoucherSuccess) { VoucherListUtils.writeInternalStoragePrivate(this, fname, buffer); VoucherListUtils.writeToExternalStoragePrivate(this, fname, buffer); } else { } } catch (Exception e) { } }
public void clearUserData() { clearCookie(); ((User) getApplication()).setvoucherCount(0); ((User) getApplication()).saveVoucherCountToPreferences(); String fname = ((User) getApplication()).getuserId(); if (fname != null) { VoucherListUtils.deleteInternalStoragePrivate(this, fname); } FileUtils.deleteExternalStorageAll(this, ""); }