Browse Source

Exrate successfully added to splash screen

master
Preyea Regmi 5 years ago
parent
commit
db985ffa7b
  1. 66
      app/src/main/java/com/gmeremit/online/gmeremittance_native/GmeApplication.java
  2. 8
      app/src/main/java/com/gmeremit/online/gmeremittance_native/customwidgets/CustomAlertDialog.java
  3. 12
      app/src/main/java/com/gmeremit/online/gmeremittance_native/homeV2/presenter/HomeV2Presenter.java
  4. 2
      app/src/main/java/com/gmeremit/online/gmeremittance_native/loginV2/presenter/LoginV2Presenter.java
  5. 15
      app/src/main/java/com/gmeremit/online/gmeremittance_native/registerV2/presenter/RegisterV2Presenter.java
  6. 4
      app/src/main/java/com/gmeremit/online/gmeremittance_native/registerV2/presenter/RegisterV2PresenterInterface.java
  7. 6
      app/src/main/java/com/gmeremit/online/gmeremittance_native/registerV2/view/RegisterV2Activity.java
  8. 4
      app/src/main/java/com/gmeremit/online/gmeremittance_native/resetpassV2/presenter/ResetPassV2Presenter.java
  9. 5
      app/src/main/java/com/gmeremit/online/gmeremittance_native/resetpassV2/presenter/ResetPassV2PresenterInterface.java
  10. 6
      app/src/main/java/com/gmeremit/online/gmeremittance_native/resetpassV2/view/ResetPassV2Activity.java
  11. 11
      app/src/main/java/com/gmeremit/online/gmeremittance_native/rewardV2/presenter/rewardredeem/RewardRedeemV2Presenter.java
  12. 3
      app/src/main/java/com/gmeremit/online/gmeremittance_native/rewardV2/presenter/rewardredeem/RewardRedeemV2PresenterInterface.java
  13. 6
      app/src/main/java/com/gmeremit/online/gmeremittance_native/rewardV2/view/rewardredeem/RewardRedeemV2Activity.java
  14. 67
      app/src/main/java/com/gmeremit/online/gmeremittance_native/splash_screen/presenter/SplashScreenPresenter.java
  15. 1
      app/src/main/java/com/gmeremit/online/gmeremittance_native/splash_screen/view/SplashScreen.java
  16. 57
      app/src/main/java/com/gmeremit/online/gmeremittance_native/utils/https/HttpClientV2.java
  17. 12
      app/src/main/res/layout/activity_splash_screen_key_0.xml
  18. 8
      app/src/main/res/layout/activity_splash_screen_key_1.xml
  19. 1
      app/src/main/res/values/strings.xml

66
app/src/main/java/com/gmeremit/online/gmeremittance_native/GmeApplication.java

@ -25,10 +25,8 @@ import static com.gmeremit.online.gmeremittance_native.base.PrefKeys.USER_PREFER
public class GmeApplication extends MultiDexApplication {
private static SharedPreferences gmeSharedPreferences = null;
private static AppRelatedMetaData appRelatedMetaData = null;
private static StringExtractor stringExtractor = null;
private static File logginFile = null;
@Override
protected void attachBaseContext(Context context) {
@ -42,74 +40,19 @@ public class GmeApplication extends MultiDexApplication {
ChannelIO.initialize(this);
if (!BuildConfig.DEBUG) {
Fabric.with(this, new Crashlytics());
} else {
DateFormat df = new SimpleDateFormat("d_MMM");
String date = df.format(Calendar.getInstance().getTime());
File path = getExternalFilesDir(null);
logginFile = new File(path, "API Log " + date + ".txt");
}
if (appRelatedMetaData == null)
appRelatedMetaData = new AppRelatedMetaData(this);
if (stringExtractor == null)
stringExtractor = new StringExtractor(getResources());
gmeSharedPreferences = this.getSharedPreferences(getString(R.string.gme_sharedpreferences_key), Context.MODE_PRIVATE);
//
// Observable.fromCallable(() -> {
// if (!BuildConfig.DEBUG) {
// Fabric.with(this, new Crashlytics());
// } else {
// DateFormat df = new SimpleDateFormat("d_MMM");
// String date = df.format(Calendar.getInstance().getTime());
// File path = getExternalFilesDir(null);
// logginFile = new File(path, "API Log " + date + ".txt");
// }
//
//
// if (appRelatedMetaData == null)
// appRelatedMetaData = new AppRelatedMetaData(this);
//
// if (stringExtractor == null)
// stringExtractor = new StringExtractor(getResources());
//
// gmeSharedPreferences = this.getSharedPreferences(getString(R.string.gme_sharedpreferences_key), Context.MODE_PRIVATE);
//
// return true;
// })
// .subscribeOn(Schedulers.io())
// .observeOn(AndroidSchedulers.mainThread())
// .subscribe(new Observer<Boolean>() {
// @Override
// public void onSubscribe(Disposable d) {
//
// }
//
// @Override
// public void onNext(Boolean aBoolean) {
//
// }
//
// @Override
// public void onError(Throwable e) {
//
// }
//
// @Override
// public void onComplete() {
//
// }
// });
}
@Override
public void onTerminate() {
super.onTerminate();
appRelatedMetaData = null;
gmeSharedPreferences = null;
stringExtractor = null;
}
@ -119,19 +62,16 @@ public class GmeApplication extends MultiDexApplication {
}
public static AppRelatedMetaData getAppRelatedMetaData() {
return appRelatedMetaData;
public static AppRelatedMetaData getAppRelatedMetaData(Context context) {
return new AppRelatedMetaData(context);
}
public static StringExtractor getStringExtractor() {
return stringExtractor;
}
public static File getLoggingFile() {
return logginFile;
}
public class AppRelatedMetaData {
public static class AppRelatedMetaData {
String deviceId;
String osName;

8
app/src/main/java/com/gmeremit/online/gmeremittance_native/customwidgets/CustomAlertDialog.java

@ -68,8 +68,14 @@ public class CustomAlertDialog extends android.support.v4.app.DialogFragment {
case SUCCESS:
imgStatusImgView.setImageDrawable(ContextCompat.getDrawable(getActivity(), R.drawable.correct));
dialogTitleTxt.setText(getString(R.string.success_text));
break;
case ALERT_RETRY:
imgStatusImgView.setImageDrawable(ContextCompat.getDrawable(getActivity(), R.drawable.alert));
dialogTitleTxt.setText(getString(R.string.important_text));
dialogOkButtonTxt.setText(getString(R.string.retry_text));
break;
default:
imgStatusImgView.setImageDrawable(ContextCompat.getDrawable(getActivity(), R.drawable.error));
dialogTitleTxt.setText(getString( R.string.error_text));
@ -143,7 +149,7 @@ public class CustomAlertDialog extends android.support.v4.app.DialogFragment {
}
public enum AlertType {
SUCCESS,NO_INTERNET, FAILED, ALERT, BAD_REQUEST
SUCCESS,NO_INTERNET, FAILED, ALERT, BAD_REQUEST,ALERT_RETRY
}

12
app/src/main/java/com/gmeremit/online/gmeremittance_native/homeV2/presenter/HomeV2Presenter.java

@ -178,15 +178,15 @@ public class HomeV2Presenter extends BasePresenter implements HomeV2PresenterInt
if (fcmID == null || fcmID.length() < 1)
fcmID = this.gateway.getLastKnownFcmId();
GmeApplication.AppRelatedMetaData appRelatedMetaData=GmeApplication.getAppRelatedMetaData(view.getContext());
return this.gateway.getUserRelatedData(this.gateway.getAuth(),
this.gateway.getUserID(),
fcmID,
GmeApplication.getAppRelatedMetaData().getAppVersion(),
GmeApplication.getAppRelatedMetaData().getPhoneBrand(),
GmeApplication.getAppRelatedMetaData().getOsName(),
GmeApplication.getAppRelatedMetaData().getDeviceId(),
GmeApplication.getAppRelatedMetaData().getOsVersion()
appRelatedMetaData.getAppVersion(),
appRelatedMetaData.getPhoneBrand(),
appRelatedMetaData.getOsName(),
appRelatedMetaData.getDeviceId(),
appRelatedMetaData.getOsVersion()
).flatMap(userInfoV2DataApiResponse -> {
if (userInfoV2DataApiResponse.getErrorCode().equalsIgnoreCase(Constants.SUCCESS_CODE_V2)) {

2
app/src/main/java/com/gmeremit/online/gmeremittance_native/loginV2/presenter/LoginV2Presenter.java

@ -147,7 +147,7 @@ public class LoginV2Presenter extends BasePresenter implements LoginV2PresenterI
@Override
public void loginUser(String userId, String userPwd) {
String auth = "Basic " + Utils.toBase64("172017F9EC11222E8107142733:QRK2UM0Q:" + GmeApplication.getAppRelatedMetaData().getDeviceId());
String auth = "Basic " + Utils.toBase64("172017F9EC11222E8107142733:QRK2UM0Q:" + GmeApplication.getAppRelatedMetaData(view.getContext()).getDeviceId());
this.gateway.loginUser(auth, userId, encUserPassword)
.subscribeOn(Schedulers.io())
.flatMap(loginResponse -> {

15
app/src/main/java/com/gmeremit/online/gmeremittance_native/registerV2/presenter/RegisterV2Presenter.java

@ -118,7 +118,9 @@ public class RegisterV2Presenter extends BasePresenter implements RegisterV2Pres
@Override
public void registerUser(String userId, String password, String dob) {
String auth = "Basic " + Utils.toBase64("172017F9EC11222E8107142733:QRK2UM0Q:" + GmeApplication.getAppRelatedMetaData().getDeviceId());
GmeApplication.AppRelatedMetaData appRelatedMetaData=GmeApplication.getAppRelatedMetaData(view.getContext());
String auth = "Basic " + Utils.toBase64("172017F9EC11222E8107142733:QRK2UM0Q:" + appRelatedMetaData.getDeviceId());
String fcmID = null;
try {
fcmID= FirebaseInstanceId.getInstance().getToken();
@ -129,6 +131,7 @@ public class RegisterV2Presenter extends BasePresenter implements RegisterV2Pres
}
if (fcmID == null||fcmID.length()<1)
fcmID = this.gateway.getLastKnownFcmId();
compositeDisposable.add(
this.gateway.registerUser(
auth,
@ -138,11 +141,11 @@ public class RegisterV2Presenter extends BasePresenter implements RegisterV2Pres
dob,
"172017F9EC11222E8107142733",
fcmID,
GmeApplication.getAppRelatedMetaData().getAppVersion(),
GmeApplication.getAppRelatedMetaData().getPhoneBrand(),
GmeApplication.getAppRelatedMetaData().getOsName(),
GmeApplication.getAppRelatedMetaData().getDeviceId(),
GmeApplication.getAppRelatedMetaData().getOsVersion())
appRelatedMetaData.getAppVersion(),
appRelatedMetaData.getPhoneBrand(),
appRelatedMetaData.getOsName(),
appRelatedMetaData.getDeviceId(),
appRelatedMetaData.getOsVersion())
.doOnSubscribe(d->view.showProgressBar(true,getStringfromStringId(R.string.processing_request_text)))
.doFinally(()->view.showProgressBar(false,""))
.subscribeOn(Schedulers.io())

4
app/src/main/java/com/gmeremit/online/gmeremittance_native/registerV2/presenter/RegisterV2PresenterInterface.java

@ -1,5 +1,7 @@
package com.gmeremit.online.gmeremittance_native.registerV2.presenter;
import android.content.Context;
import com.gmeremit.online.gmeremittance_native.base.BaseContractInterface;
import com.gmeremit.online.gmeremittance_native.base.BasePresenterInterface;
@ -35,5 +37,7 @@ public interface RegisterV2PresenterInterface extends BasePresenterInterface {
void redirectToLogin();
void redirectToDashboard();
Context getContext();
}
}

6
app/src/main/java/com/gmeremit/online/gmeremittance_native/registerV2/view/RegisterV2Activity.java

@ -1,6 +1,7 @@
package com.gmeremit.online.gmeremittance_native.registerV2.view;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.graphics.Rect;
import android.os.Bundle;
@ -275,6 +276,11 @@ public class RegisterV2Activity extends BaseActivity implements RegisterV2Presen
finish();
}
@Override
public Context getContext() {
return this;
}
@Override
public boolean onTouch(View v, MotionEvent event) {

4
app/src/main/java/com/gmeremit/online/gmeremittance_native/resetpassV2/presenter/ResetPassV2Presenter.java

@ -30,7 +30,9 @@ public class ResetPassV2Presenter extends BasePresenter implements ResetPassV2Pr
@Override
public void resetPassword(String emailId, String dob) {
String auth = "Basic " + Utils.toBase64("172017F9EC11222E8107142733:QRK2UM0Q:" + GmeApplication.getAppRelatedMetaData().getDeviceId());
GmeApplication.AppRelatedMetaData appRelatedMetaData=GmeApplication.getAppRelatedMetaData(view.getContext());
String auth = "Basic " + Utils.toBase64("172017F9EC11222E8107142733:QRK2UM0Q:" + appRelatedMetaData.getDeviceId());
compositeDisposable.add(
gateway.resetPassV2(auth,emailId,dob)
.doOnSubscribe(d->view.showProgressBar(true,getStringfromStringId(R.string.processing_request_text)))

5
app/src/main/java/com/gmeremit/online/gmeremittance_native/resetpassV2/presenter/ResetPassV2PresenterInterface.java

@ -1,5 +1,7 @@
package com.gmeremit.online.gmeremittance_native.resetpassV2.presenter;
import android.content.Context;
import com.gmeremit.online.gmeremittance_native.base.BaseContractInterface;
import com.gmeremit.online.gmeremittance_native.base.BasePresenterInterface;
@ -19,4 +21,5 @@ public interface ResetPassV2PresenterInterface extends BasePresenterInterface {
void showIncorrectEmail(String message);
void showIncorrectDob(String message);
}}
Context getContext();
}}

6
app/src/main/java/com/gmeremit/online/gmeremittance_native/resetpassV2/view/ResetPassV2Activity.java

@ -1,6 +1,7 @@
package com.gmeremit.online.gmeremittance_native.resetpassV2.view;
import android.app.DatePickerDialog;
import android.content.Context;
import android.graphics.Rect;
import android.support.design.widget.TextInputLayout;
import android.support.v4.view.GestureDetectorCompat;
@ -162,6 +163,11 @@ public class ResetPassV2Activity extends BaseActivity implements View.OnClickLis
dateErrorTxt.setErrorText(message);
}
@Override
public Context getContext() {
return this;
}
class ResetDobClickGestureDetector extends GestureDetector.SimpleOnGestureListener {
@Override

11
app/src/main/java/com/gmeremit/online/gmeremittance_native/rewardV2/presenter/rewardredeem/RewardRedeemV2Presenter.java

@ -107,15 +107,16 @@ public class RewardRedeemV2Presenter extends BasePresenter implements RewardRede
if (fcmID == null || fcmID.length() < 1)
fcmID = this.gateway.getLastKnownFcmId();
GmeApplication.AppRelatedMetaData appRelatedMetaData=GmeApplication.getAppRelatedMetaData(view.getContext());
return this.gateway.getUserRelatedData(this.gateway.getAuth(),
this.gateway.getUserID(),
fcmID,
GmeApplication.getAppRelatedMetaData().getAppVersion(),
GmeApplication.getAppRelatedMetaData().getPhoneBrand(),
GmeApplication.getAppRelatedMetaData().getOsName(),
GmeApplication.getAppRelatedMetaData().getDeviceId(),
GmeApplication.getAppRelatedMetaData().getOsVersion()
appRelatedMetaData.getAppVersion(),
appRelatedMetaData.getPhoneBrand(),
appRelatedMetaData.getOsName(),
appRelatedMetaData.getDeviceId(),
appRelatedMetaData.getOsVersion()
).flatMap(userInfoV2DataApiResponse -> {
if (userInfoV2DataApiResponse.getErrorCode().equalsIgnoreCase(Constants.SUCCESS_CODE_V2)) {
return this.gateway.saveUserInfo(userInfoV2DataApiResponse.getData());

3
app/src/main/java/com/gmeremit/online/gmeremittance_native/rewardV2/presenter/rewardredeem/RewardRedeemV2PresenterInterface.java

@ -1,5 +1,6 @@
package com.gmeremit.online.gmeremittance_native.rewardV2.presenter.rewardredeem;
import android.content.Context;
import android.widget.ImageView;
import com.gmeremit.online.gmeremittance_native.base.BaseContractInterface;
@ -28,5 +29,7 @@ public interface RewardRedeemV2PresenterInterface extends BasePresenterInterface
void showRewardFooter(String message);
void redeemSuccess();
Context getContext();
}
}

6
app/src/main/java/com/gmeremit/online/gmeremittance_native/rewardV2/view/rewardredeem/RewardRedeemV2Activity.java

@ -1,6 +1,7 @@
package com.gmeremit.online.gmeremittance_native.rewardV2.view.rewardredeem;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Parcelable;
import android.support.v7.app.AppCompatActivity;
@ -156,6 +157,11 @@ public class RewardRedeemV2Activity extends BaseActivity implements RewardRedeem
finish();
}
@Override
public Context getContext() {
return this;
}
@Override
public void onClick(View v) {
if(v.getId()==R.id.ed_branch)

67
app/src/main/java/com/gmeremit/online/gmeremittance_native/splash_screen/presenter/SplashScreenPresenter.java

@ -18,9 +18,14 @@ import com.gmeremit.online.gmeremittance_native.splash_screen.model.LanguageMode
import com.gmeremit.online.gmeremittance_native.utils.Constants;
import com.gmeremit.online.gmeremittance_native.utils.Utils;
import com.gmeremit.online.gmeremittance_native.utils.https.GenericApiObserverResponse;
import com.gmeremit.online.gmeremittance_native.utils.https.HTTPConstants;
import com.gmeremit.online.gmeremittance_native.utils.security.SecurityUtils;
import com.gmeremit.online.gmeremittance_native.utils.security.SignatureCheck;
import com.mtramin.rxfingerprint.data.FingerprintAuthenticationException;
import com.scottyab.rootbeer.RootBeer;
import java.io.IOException;
import java.net.SocketTimeoutException;
import java.util.List;
import java.util.concurrent.TimeUnit;
@ -29,6 +34,7 @@ import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.observers.DisposableObserver;
import io.reactivex.schedulers.Schedulers;
import io.reactivex.subjects.PublishSubject;
public class SplashScreenPresenter extends BasePresenter implements SplashScreenPresenterInterface, SplashScreenInteractorInterface {
@ -39,6 +45,9 @@ public class SplashScreenPresenter extends BasePresenter implements SplashScreen
private final CompositeDisposable compositeDisposables;
private final String sendCountryDefault = "118";
final PublishSubject<Object> retrySubject = PublishSubject.create();
/**
* Exrate Related Data
@ -195,13 +204,12 @@ public class SplashScreenPresenter extends BasePresenter implements SplashScreen
@Override
public void calcExrate() {
view.hideKeyBoard();
if(selectedCountryPaymentService==null)
return;
if(!validateAmount())
{
view.showToastMessage(getStringfromStringId(R.string.sending_amount_error));
return;
}
String calculateFlag = calcByPayoutAmount ? Constants.CALC_BY_RECIPEINT : Constants.CALC_BY_SENDER;
view.hideKeyBoard();
compositeDisposables.add(
this.gateway.sendDataForForexCalculation(gateway.getAuth(),
sendCountryDefault,
@ -218,9 +226,17 @@ public class SplashScreenPresenter extends BasePresenter implements SplashScreen
}
private boolean validateAmount() {
if(calcByPayoutAmount&&pAmount.length()>1)
return true;
else return !calcByPayoutAmount && cAmount.length() > 1;
if(calcByPayoutAmount&&pAmount.length()<1) {
view.showToastMessage(getStringfromStringId(R.string.receiving_amount_error));
return false;
}
else if(!calcByPayoutAmount&&cAmount.length()<1)
{
view.showToastMessage(getStringfromStringId(R.string.sending_amount_error));
return false;
}
return true;
}
private Observable<CountryPaymentServiceSeedValueModel> getDefaultValue(String countryCode) {
@ -282,27 +298,25 @@ public class SplashScreenPresenter extends BasePresenter implements SplashScreen
}
} else {
view.showPopUpMessage(paymentServiceApiResponse.paymentServiceApiResponse.getMessage(), CustomAlertDialog.AlertType.FAILED, null);
view.animateToExrateView(null);
}
}
@Override
public void onFailed(String message) {
view.showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED, alertType -> view.exitView());
view.showPopUpMessage(message, CustomAlertDialog.AlertType.ALERT_RETRY, alertType -> { new Handler().postDelayed(SplashScreenPresenter.this::getExrateRelatedData,200); });
}
@Override
protected void onConnectionNotEstablished(String message) {
view.showPopUpMessage(message, CustomAlertDialog.AlertType.NO_INTERNET, alertType -> view.exitView());
view.showPopUpMessage(message, CustomAlertDialog.AlertType.ALERT_RETRY, alertType -> { new Handler().postDelayed(SplashScreenPresenter.this::getExrateRelatedData,200); });
}
@Override
protected void unauthorizedAccess(String message) {
gateway.clearAllUserData();
view.showPopUpMessage(message, CustomAlertDialog.AlertType.ALERT, alertType -> view.logout());
view.showPopUpMessage(message, CustomAlertDialog.AlertType.ALERT, alertType -> view.exitView());
}
}
@ -348,14 +362,13 @@ public class SplashScreenPresenter extends BasePresenter implements SplashScreen
@Override
public void onFailed(String message) {
// view.clearExrateAndServiceCharge();
view.showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED, alertType -> view.exitView());
view.showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED, null);
}
@Override
protected void onConnectionNotEstablished(String message) {
// view.clearExrateAndServiceCharge();
view.showPopUpMessage(message, CustomAlertDialog.AlertType.NO_INTERNET, alertType -> view.exitView());
view.showPopUpMessage(message, CustomAlertDialog.AlertType.NO_INTERNET, null);
}
@ -367,28 +380,6 @@ public class SplashScreenPresenter extends BasePresenter implements SplashScreen
}
}
public class DefaultRecievingAmountObserver extends DisposableObserver<CountryPaymentServiceSeedValueModel> {
@Override
public void onNext(CountryPaymentServiceSeedValueModel countryPaymentServiceSeedValueModel) {
String receivingAmount = countryPaymentServiceSeedValueModel.getRecipientSeedValue();
// if (receivingAmount != null)
// view.updateReceivingAmountAndFetchExchangeRate(Utils.formatCurrency(receivingAmount));
// else
// view.fallbackToSendingAmountAndFetchExchangeRate(Utils.formatCurrency(Constants.DEFAULT_EXCHANGE_SEND_AMOUNT));
}
@Override
public void onError(Throwable e) {
}
@Override
public void onComplete() {
}
}
public class PaymentServiceData {
private PaymentServiceApiResponse paymentServiceApiResponse;

1
app/src/main/java/com/gmeremit/online/gmeremittance_native/splash_screen/view/SplashScreen.java

@ -63,7 +63,6 @@ public class SplashScreen extends BaseActivity implements View.OnClickListener,
@BindView(R.id.view_pager)
ConstraintLayout view_pager;
ViewPagerAVDSplashAdapter viewPagerAdapter;
@BindView(R.id.rootLayout)

57
app/src/main/java/com/gmeremit/online/gmeremittance_native/utils/https/HttpClientV2.java

@ -58,7 +58,6 @@ public class HttpClientV2 {
if (BuildConfig.DEBUG) {
HttpLoggingInterceptor.Logger fileLogger = s -> {
writeToFile(s);
Platform.get().log(INFO, s, null);
};
HttpLoggingInterceptor logging = new HttpLoggingInterceptor(fileLogger);
@ -96,57 +95,23 @@ public class HttpClientV2 {
}
// private RequestBody processApplicationJsonRequestBody(RequestBody requestBody, String token){
// String customReq = bodyToString(requestBody);
// try {
// JSONObject obj = new JSONObject(customReq);
// obj.put("token", token);
// return RequestBody.create(requestBody.contentType(), obj.toString());
// } catch (JSONException e) {
// e.printStackTrace();
// }
// return null;
// }
// private RequestBody processFormDataRequestBody(RequestBody requestBody, String token){
// RequestBody formBody = new FormBody.Builder()
// .add("token", token)
// .build();
// String postBodyString = bodyToString(requestBody);
// postBodyString += ((postBodyString.length() > 0) ? "&" : "") + bodyToString(formBody);
// return RequestBody.create(requestBody.contentType(), postBodyString);
// }
//
// private String bodyToString(final RequestBody request){
// public static void writeToFile(String data) {
// File file= GmeApplication.getLoggingFile();
//
// if(file==null)
// return;
//
// try {
// final RequestBody copy = request;
// final Buffer buffer = new Buffer();
// if(copy != null)
// copy.writeTo(buffer);
// else
// return "";
// return buffer.readUtf8();
// PrintWriter writer = new PrintWriter(new FileWriter(file,true));
// writer.println(data);
// writer.close();
// }
// catch (final IOException e) {
// return "did not work";
// catch (IOException e) {
// Log.e("Exception", "File write failed: " + e.toString());
// }
// }
public static void writeToFile(String data) {
File file= GmeApplication.getLoggingFile();
if(file==null)
return;
try {
PrintWriter writer = new PrintWriter(new FileWriter(file,true));
writer.println(data);
writer.close();
}
catch (IOException e) {
Log.e("Exception", "File write failed: " + e.toString());
}
}

12
app/src/main/res/layout/activity_splash_screen_key_0.xml

@ -40,8 +40,7 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.43" />
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/selectedLanguageIcon"
@ -124,8 +123,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:layout_marginTop="@dimen/_6sdp"
android:layout_marginBottom="@dimen/_12sdp"
android:layout_marginTop="@dimen/_4sdp"
android:layout_marginBottom="@dimen/_4sdp"
android:orientation="horizontal"
app:layout_constraintBottom_toTopOf="@+id/linearLayout"
app:layout_constraintEnd_toEndOf="parent"
@ -224,7 +223,7 @@
<com.gmeremit.online.gmeremittance_native.customwidgets.CircularIndexView
android:id="@+id/circularIndexView"
android:layout_width="wrap_content"
android:layout_height="35dp"
android:layout_height="@dimen/_30sdp"
android:layout_marginStart="16dp"
android:paddingStart="@dimen/_2sdp"
@ -252,7 +251,7 @@
<com.gmeremit.online.gmeremittance_native.customwidgets.CircularIndexView
android:id="@+id/circularIndexView2"
android:layout_width="wrap_content"
android:layout_height="35dp"
android:layout_height="@dimen/_30sdp"
android:layout_marginStart="16dp"
android:paddingStart="@dimen/_2sdp"
android:paddingEnd="@dimen/_2sdp"
@ -369,6 +368,7 @@
</LinearLayout>
</android.support.constraint.ConstraintLayout>

8
app/src/main/res/layout/activity_splash_screen_key_1.xml

@ -117,8 +117,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:layout_marginTop="@dimen/_6sdp"
android:layout_marginBottom="@dimen/_12sdp"
android:layout_marginTop="@dimen/_4sdp"
android:layout_marginBottom="@dimen/_4sdp"
android:orientation="horizontal"
app:layout_constraintBottom_toTopOf="@+id/linearLayout"
app:layout_constraintEnd_toEndOf="parent"
@ -217,7 +217,7 @@
<com.gmeremit.online.gmeremittance_native.customwidgets.CircularIndexView
android:id="@+id/circularIndexView"
android:layout_width="wrap_content"
android:layout_height="35dp"
android:layout_height="@dimen/_30sdp"
android:layout_marginStart="16dp"
android:paddingStart="@dimen/_2sdp"
@ -245,7 +245,7 @@
<com.gmeremit.online.gmeremittance_native.customwidgets.CircularIndexView
android:id="@+id/circularIndexView2"
android:layout_width="wrap_content"
android:layout_height="35dp"
android:layout_height="@dimen/_30sdp"
android:layout_marginStart="16dp"
android:paddingStart="@dimen/_2sdp"
android:paddingEnd="@dimen/_2sdp"

1
app/src/main/res/values/strings.xml

@ -536,6 +536,7 @@
<string name="id_number_text">Id Number</string>
<string name="idtype_error">Please select an Id Type</string>
<string name="idnumber_error">Id number cannot be empty</string>
<string name="retry_text">Retry</string>
</resources>
Loading…
Cancel
Save