Browse Source

Inbound and load to bank started

master
Preyea Regmi 4 years ago
parent
commit
7538d06bca
  1. BIN
      .idea/caches/build_file_checksums.ser
  2. 1
      app/build.gradle
  3. 185
      app/src/main/AndroidManifest.xml
  4. 28
      app/src/main/java/com/swifttech/remit/android/features/cashpickuptowallet/CashPickupViewModelFactory.java
  5. 7
      app/src/main/java/com/swifttech/remit/android/features/cashpickuptowallet/gateway/CashPickupToWalletGateway.java
  6. 185
      app/src/main/java/com/swifttech/remit/android/features/cashpickuptowallet/model/CashPickupTxnDetailDTO.java
  7. 13
      app/src/main/java/com/swifttech/remit/android/features/cashpickuptowallet/presenter/CashPickupToWalletGatewayInterface.java
  8. 210
      app/src/main/java/com/swifttech/remit/android/features/cashpickuptowallet/presenter/CashPickupToWalletPresenter.java
  9. 26
      app/src/main/java/com/swifttech/remit/android/features/cashpickuptowallet/presenter/CashPickupToWalletPresenterInterface.java
  10. 101
      app/src/main/java/com/swifttech/remit/android/features/cashpickuptowallet/view/CashPickupToWalletActivity.java
  11. 129
      app/src/main/java/com/swifttech/remit/android/features/cashpickuptowallet/view/CashPickupTxnDetailFragment.java
  12. 68
      app/src/main/java/com/swifttech/remit/android/features/cashpickuptowallet/view/SearchCashPickupTxnFragment.java
  13. 3
      app/src/main/java/com/swifttech/remit/android/features/login/view/LoginV2Activity.java
  14. 28
      app/src/main/java/com/swifttech/remit/android/features/otpverification/OTPVerificationViewModelFactory.java
  15. 26
      app/src/main/java/com/swifttech/remit/android/features/otpverification/gateway/OTPVerificationGateway.java
  16. 19
      app/src/main/java/com/swifttech/remit/android/features/otpverification/model/OTPSubmitModelDTO.java
  17. 14
      app/src/main/java/com/swifttech/remit/android/features/otpverification/presenter/OTPVerificationGatewayInterface.java
  18. 238
      app/src/main/java/com/swifttech/remit/android/features/otpverification/presenter/OTPVerificationPresenter.java
  19. 27
      app/src/main/java/com/swifttech/remit/android/features/otpverification/presenter/OTPVerificationPresenterInterface.java
  20. 67
      app/src/main/java/com/swifttech/remit/android/features/otpverification/view/OTPRequestFragment.java
  21. 108
      app/src/main/java/com/swifttech/remit/android/features/otpverification/view/OTPVerificationActivity.java
  22. 65
      app/src/main/java/com/swifttech/remit/android/features/otpverification/view/OTPVerifyFragment.java
  23. 8
      app/src/main/java/com/swifttech/remit/android/features/register/RegisterViewModelFactory.java
  24. 5
      app/src/main/java/com/swifttech/remit/android/features/register/gateway/RegisterV2Gateway.java
  25. 2
      app/src/main/java/com/swifttech/remit/android/features/register/presenter/RegisterV2InteractorInterface.java
  26. 25
      app/src/main/java/com/swifttech/remit/android/features/register/presenter/RegisterV2Presenter.java
  27. 14
      app/src/main/java/com/swifttech/remit/android/features/register/view/RegisterV2Activity.java
  28. 3
      app/src/main/java/com/swifttech/remit/android/features/splashscreen/view/SplashScreen.java
  29. 28
      app/src/main/java/com/swifttech/remit/android/features/withdraw/WithdrawViewModelFactory.java
  30. 8
      app/src/main/java/com/swifttech/remit/android/features/withdraw/gateway/WithdrawGateway.java
  31. 4
      app/src/main/java/com/swifttech/remit/android/features/withdraw/presenter/WithdrawGatewayInterface.java
  32. 24
      app/src/main/java/com/swifttech/remit/android/features/withdraw/presenter/WithdrawPresenter.java
  33. 9
      app/src/main/java/com/swifttech/remit/android/features/withdraw/presenter/WithdrawPresenterInterface.java
  34. 44
      app/src/main/java/com/swifttech/remit/android/features/withdraw/view/WithdrawActivity.java
  35. 2
      app/src/main/java/com/swifttech/remit/android/utils/https/API_URL.java
  36. 8
      app/src/main/java/com/swifttech/remit/android/utils/https/ApiEndpoints.java
  37. 9
      app/src/main/res/layout/activity_cash_pickup_to_wallet.xml
  38. 27
      app/src/main/res/layout/activity_otpverification.xml
  39. 3
      app/src/main/res/layout/activity_register_v2.xml
  40. 9
      app/src/main/res/layout/activity_withdraw.xml
  41. 453
      app/src/main/res/layout/fragment_cash_pickup_txn_detail.xml
  42. 57
      app/src/main/res/layout/fragment_otp_request.xml
  43. 52
      app/src/main/res/layout/fragment_otp_verify.xml
  44. 55
      app/src/main/res/layout/fragment_search_cash_pickup_txn.xml
  45. 2
      app/src/main/res/values/strings.xml

BIN
.idea/caches/build_file_checksums.ser

1
app/build.gradle

@ -155,6 +155,7 @@ dependencies {
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'com.github.tbruyelle:rxpermissions:0.10.2'
implementation 'com.facebook.shimmer:shimmer:0.1.0@aar'
implementation 'com.github.mukeshsolanki:android-otpview-pinview:2.1.0'
testImplementation 'junit:junit:4.12'

185
app/src/main/AndroidManifest.xml

@ -15,7 +15,7 @@
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application
android:name="com.swifttech.remit.android.RemitApplication"
android:name=".RemitApplication"
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
@ -27,82 +27,45 @@
android:usesCleartextTraffic="true"
tools:ignore="GoogleAppIndexingWarning"
tools:replace="android:allowBackup,android:supportsRtl">
<activity android:name="com.swifttech.remit.android.features.transactionhistory.view.RemitTransactionHistoryActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden"/>
<activity android:name=".features.withdraw.view.WithdrawActivity"></activity>
<activity android:name=".features.cashpickuptowallet.view.CashPickupToWalletActivity" />
<activity
android:name="com.swifttech.remit.android.features.termsandcondition.view.TermsAndConditionAcitivity"
android:name=".features.otpverification.view.OTPVerificationActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="com.swifttech.remit.android.features.addautodebitV2.view.AddPrimaryAccounAsAutoDebitActivity"
android:name=".features.transactionhistory.view.RemitTransactionHistoryActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="com.swifttech.remit.android.features.kyc.view.KYCV3Activity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden"/>
<activity
android:name="com.swifttech.remit.android.features.inboundreceipt.view.InboundRemitReceiptActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden|adjustPan" />
<activity
android:name="com.swifttech.remit.android.features.accountmanage.view.inboundaccountmanage.InboundAccountAddActivity"
android:theme="@style/ActivityDialog"
android:windowSoftInputMode="stateAlwaysHidden|adjustPan" />
<activity
android:name="com.swifttech.remit.android.features.exrate.view.ExchangeRateActivity"
android:name=".features.termsandcondition.view.TermsAndConditionAcitivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="com.swifttech.remit.android.features.domesticremit.receipt.view.DomesticRemitReceiptActivity"
android:name=".features.kyc.view.KYCV3Activity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="com.swifttech.remit.android.features.domesticremit.recenthistory.view.DomesticRemitRecipientHistoryActivity"
android:name=".features.inboundreceipt.view.InboundRemitReceiptActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="com.swifttech.remit.android.features.domesticremit.send.view.DomesticRemitActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="com.swifttech.remit.android.features.recipientmanagement.view.recipientaddeditV3.RecipientAddEditV3Activity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="com.swifttech.remit.android.features.recipientmanagement.view.recipientlistingV3.RecipientListingV3Activity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
android:windowSoftInputMode="stateAlwaysHidden|adjustPan" />
<activity
android:name="com.swifttech.remit.android.features.rewardV2.view.rewardorderdetail.RewardOrderDetailActivity"
android:name=".features.exrate.view.ExchangeRateActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="com.swifttech.remit.android.features.resendV2.view.TransactionListingV2Activity"
android:name=".features.recipientmanagement.view.recipientaddeditV3.RecipientAddEditV3Activity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="com.swifttech.remit.android.features.resendV2.view.ReSendMoneyV2Activity"
android:name=".features.recipientmanagement.view.recipientlistingV3.RecipientListingV3Activity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
@ -119,30 +82,23 @@
</provider>
<activity
android:name="com.swifttech.remit.android.features.splashscreen.view.SplashScreen"
android:name=".features.splashscreen.view.SplashScreen"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.Launcher"
android:windowSoftInputMode="adjustResize|stateAlwaysHidden">
<intent-filter>
<action android:name="HOME" />
<intent-filter>
<action android:name="HOME" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.swifttech.remit.android.features.aboutscreen.view.AboutGME"
android:name=".features.aboutscreen.view.AboutGME"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateHidden" /> <!-- <activity -->
@ -150,142 +106,99 @@
<!-- android:screenOrientation="portrait" -->
<!-- android:theme="@style/AppTheme.NoActionBar" -->
<!-- android:windowSoftInputMode="stateHidden" /> -->
<activity
android:name="com.swifttech.remit.android.features.settings.view.SettingsView"
android:name=".features.settings.view.SettingsView"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateHidden" />
<activity
android:name="com.swifttech.remit.android.features.userprofile.view.ProfileActivity"
android:name=".features.userprofile.view.ProfileActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar" />
<meta-data
android:name="io.fabric.ApiKey"
android:value="b575c94baafadc63651a9c5ec62f0b5f468a4093" />
<activity
android:name="com.swifttech.remit.android.features.agentslisting.view.AgentListV2Activity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="com.swifttech.remit.android.features.recipientV2.view.recipientadd.RecipientAddV2Activity"
android:name=".features.agentslisting.view.AgentListV2Activity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="com.swifttech.remit.android.features.recipientV2.view.recipientlisting.RecipientListingV2Activity"
android:name=".features.sendmoney.view.SendMoneyV2Activity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="com.swifttech.remit.android.features.sendmoney.view.SendMoneyV2Activity"
android:name=".features.sendmoney.view.SendMoneyV2TransactionCompleteActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="com.swifttech.remit.android.features.sendmoney.view.SendMoneyV2TransactionCompleteActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="com.swifttech.remit.android.features.kycV2.view.KYCFormV2Activity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name="com.swifttech.remit.android.features.login.view.LoginV2Activity"
android:name=".features.login.view.LoginV2Activity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="adjustResize">
<!-- <intent-filter>-->
<!-- <action android:name="HOME" />-->
<!-- <category android:name="android.intent.category.DEFAULT" />-->
<!-- </intent-filter>-->
<!-- <intent-filter>-->
<!-- <action android:name="android.intent.action.MAIN" />-->
<!-- <intent-filter> -->
<!-- <action android:name="HOME" /> -->
<!-- <category android:name="android.intent.category.DEFAULT" /> -->
<!-- </intent-filter> -->
<!-- <intent-filter> -->
<!-- <action android:name="android.intent.action.MAIN" /> -->
<!-- <category android:name="android.intent.category.LAUNCHER" />-->
<!-- </intent-filter>-->
<!-- <category android:name="android.intent.category.LAUNCHER" /> -->
<!-- </intent-filter> -->
</activity>
<activity
android:name="com.swifttech.remit.android.features.register.view.RegisterV2Activity"
android:name=".features.register.view.RegisterV2Activity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="adjustResize|stateAlwaysHidden" />
<activity
android:name="com.swifttech.remit.android.features.resetpassword.view.ResetPassV2Activity"
android:name=".features.resetpassword.view.ResetPassV2Activity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="com.swifttech.remit.android.features.home.view.HomeActivityV2"
android:name=".features.home.view.HomeActivityV2"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="com.swifttech.remit.android.features.support.view.SupportActivityV2"
android:name=".features.support.view.SupportActivityV2"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="com.swifttech.remit.android.features.walletstatement.view.WalletStatementV2Activity"
android:name=".features.walletstatement.view.WalletStatementV2Activity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="com.swifttech.remit.android.features.changepassword.view.UserPasswordChangeV2Activity"
android:name=".features.changepassword.view.UserPasswordChangeV2Activity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden"/>
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
android:theme="@style/Base.Theme.AppCompat" />
<activity
android:name="com.swifttech.remit.android.features.kycV2.view.pennytest.PennyTestActivity"
android:excludeFromRecents="true"
android:theme="@style/ActivityDialog" />
<activity
android:name="com.swifttech.remit.android.features.appupdate.AppUpdateActivity"
android:name=".features.appupdate.AppUpdateActivity"
android:screenOrientation="portrait"
android:theme="@style/AppFullScreenTheme"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="com.swifttech.remit.android.features.accountmanage.view.accountlisting.AccountListingV2Activity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="com.swifttech.remit.android.features.accountmanage.view.AutoDebitWebBrowserActivityV2"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="com.swifttech.remit.android.features.sendmoney.view.verification.TermsAndConditionV2BrowserActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="com.swifttech.remit.android.features.accountmanage.view.bankaccountvalidation.BankAccountValidationV2Activity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="com.swifttech.remit.android.features.rewardV2.view.rewardlisting.RewardListingV2Activity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="com.swifttech.remit.android.features.rewardV2.view.rewardredeem.RewardRedeemV2Activity"
android:name=".features.sendmoney.view.verification.TermsAndConditionV2BrowserActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="com.swifttech.remit.android.features.settings.view.FingerprintEnablePromptActivity"
android:name=".features.settings.view.FingerprintEnablePromptActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />

28
app/src/main/java/com/swifttech/remit/android/features/cashpickuptowallet/CashPickupViewModelFactory.java

@ -0,0 +1,28 @@
package com.swifttech.remit.android.features.cashpickuptowallet;
import androidx.annotation.NonNull;
import androidx.lifecycle.ViewModel;
import androidx.lifecycle.ViewModelProvider;
import com.swifttech.remit.android.features.cashpickuptowallet.gateway.CashPickupToWalletGateway;
import com.swifttech.remit.android.features.cashpickuptowallet.presenter.CashPickupToWalletPresenter;
import com.swifttech.remit.android.features.cashpickuptowallet.presenter.CashPickupToWalletPresenterInterface;
import com.swifttech.remit.android.features.otpverification.gateway.OTPVerificationGateway;
import com.swifttech.remit.android.features.otpverification.presenter.OTPVerificationPresenter;
import com.swifttech.remit.android.features.otpverification.presenter.OTPVerificationPresenterInterface;
public class CashPickupViewModelFactory implements ViewModelProvider.Factory {
private final CashPickupToWalletPresenterInterface.CashPickupToWalletContract view;
public CashPickupViewModelFactory(CashPickupToWalletPresenterInterface.CashPickupToWalletContract view) {
this.view=view;
}
@SuppressWarnings("unchecked")
@NonNull
@Override
public <T extends ViewModel> T create(@NonNull Class<T> modelClass) {
return (T) new CashPickupToWalletPresenter(view,new CashPickupToWalletGateway());
}
}

7
app/src/main/java/com/swifttech/remit/android/features/cashpickuptowallet/gateway/CashPickupToWalletGateway.java

@ -0,0 +1,7 @@
package com.swifttech.remit.android.features.cashpickuptowallet.gateway;
import com.swifttech.remit.android.base.PrivilegedGateway;
import com.swifttech.remit.android.features.cashpickuptowallet.presenter.CashPickupToWalletGatewayInterface;
public class CashPickupToWalletGateway extends PrivilegedGateway implements CashPickupToWalletGatewayInterface {
}

185
app/src/main/java/com/swifttech/remit/android/features/cashpickuptowallet/model/CashPickupTxnDetailDTO.java

@ -0,0 +1,185 @@
package com.swifttech.remit.android.features.cashpickuptowallet.model;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class CashPickupTxnDetailDTO {
@SerializedName("txnId")
@Expose
private String txnId;
@SerializedName("sendingCountryCode")
@Expose
private String sendingCountryCode;
@SerializedName("sendingCountryName")
@Expose
private String sendingCountryName;
@SerializedName("controlNo")
@Expose
private String controlNo;
@SerializedName("tranDate")
@Expose
private String tranDate;
@SerializedName("senderName")
@Expose
private String senderName;
@SerializedName("receiverName")
@Expose
private String receiverName;
@SerializedName("receiverAddress")
@Expose
private String receiverAddress;
@SerializedName("receiverMobile")
@Expose
private String receiverMobile;
@SerializedName("status")
@Expose
private String status;
@SerializedName("serviceFee")
@Expose
private String serviceFee;
@SerializedName("exrate")
@Expose
private String exrate;
@SerializedName("receivedAmount")
@Expose
private String receivedAmount;
@SerializedName("payoutAgent")
@Expose
private String payoutAgent;
public String getTxnId() {
return txnId;
}
public void setTxnId(String txnId) {
this.txnId = txnId;
}
public String getSendingCountryCode() {
return sendingCountryCode;
}
public void setSendingCountryCode(String sendingCountryCode) {
this.sendingCountryCode = sendingCountryCode;
}
public String getSendingCountryName() {
return sendingCountryName;
}
public void setSendingCountryName(String sendingCountryName) {
this.sendingCountryName = sendingCountryName;
}
public String getControlNo() {
return controlNo;
}
public void setControlNo(String controlNo) {
this.controlNo = controlNo;
}
public String getTranDate() {
return tranDate;
}
public void setTranDate(String tranDate) {
this.tranDate = tranDate;
}
public String getSenderName() {
return senderName;
}
public void setSenderName(String senderName) {
this.senderName = senderName;
}
public String getReceiverName() {
return receiverName;
}
public void setReceiverName(String receiverName) {
this.receiverName = receiverName;
}
public String getReceiverAddress() {
return receiverAddress;
}
public void setReceiverAddress(String receiverAddress) {
this.receiverAddress = receiverAddress;
}
public String getReceiverMobile() {
return receiverMobile;
}
public void setReceiverMobile(String receiverMobile) {
this.receiverMobile = receiverMobile;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getServiceFee() {
return serviceFee;
}
public void setServiceFee(String serviceFee) {
this.serviceFee = serviceFee;
}
public String getReceivedAmount() {
return receivedAmount;
}
public void setReceivedAmount(String receivedAmount) {
this.receivedAmount = receivedAmount;
}
public String getPayoutAgent() {
return payoutAgent;
}
public void setPayoutAgent(String payoutAgent) {
this.payoutAgent = payoutAgent;
}
public String getExrate() {
return exrate;
}
public void setExrate(String exrate) {
this.exrate = exrate;
}
public boolean isTxnValidForRedeem()
{
return "unpaid".equalsIgnoreCase(status);
}
public String getTransferStatusLabel() {
if("unpaid".equalsIgnoreCase(status))
{
return "Transaction Pending";
}
else if("paid".equalsIgnoreCase(status))
{
return "Transaction Successful";
}
else if("cancelled".equalsIgnoreCase(status))
{
return "Transaction Cancelled";
}
else
return "Transaction Status Unknown";
}
}

13
app/src/main/java/com/swifttech/remit/android/features/cashpickuptowallet/presenter/CashPickupToWalletGatewayInterface.java

@ -0,0 +1,13 @@
package com.swifttech.remit.android.features.cashpickuptowallet.presenter;
import com.swifttech.remit.android.base.PrivilegedGatewayInterface;
import io.reactivex.Observable;
import io.reactivex.disposables.Disposable;
import okhttp3.ResponseBody;
public interface CashPickupToWalletGatewayInterface extends PrivilegedGatewayInterface {
Observable<ResponseBody> searchTxnByControlNo(String auth,String userID, String selectedControlNo);
Observable<ResponseBody> redeemCashPickupTxn(String auth,String userID, String selectedControlNo,String txnId,String password);
}

210
app/src/main/java/com/swifttech/remit/android/features/cashpickuptowallet/presenter/CashPickupToWalletPresenter.java

@ -0,0 +1,210 @@
package com.swifttech.remit.android.features.cashpickuptowallet.presenter;
import androidx.appcompat.app.AppCompatActivity;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import com.google.gson.reflect.TypeToken;
import com.swifttech.remit.android.base.BaseViewModel;
import com.swifttech.remit.android.common.customwidgets.CustomAlertDialog;
import com.swifttech.remit.android.features.cashpickuptowallet.model.CashPickupTxnDetailDTO;
import com.swifttech.remit.android.features.security.RemitAuthManager;
import com.swifttech.remit.android.features.security.model.RemitAuthFailedResult;
import com.swifttech.remit.android.features.security.model.RemitAuthSuccessResult;
import com.swifttech.remit.android.features.security.model.RemitTxnParam;
import com.swifttech.remit.android.utils.Constants;
import com.swifttech.remit.android.utils.https.GenericApiObserverResponseV2;
import com.swifttech.remit.android.utils.https.GenericResponseDataModel;
import com.swifttech.remit.android.utils.https.MessageResponseDataModel;
import java.lang.reflect.Type;
import io.reactivex.Observable;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.observers.DisposableObserver;
import io.reactivex.schedulers.Schedulers;
public class CashPickupToWalletPresenter extends BaseViewModel implements CashPickupToWalletPresenterInterface {
private final CashPickupToWalletPresenterInterface.CashPickupToWalletContract view;
private final CashPickupToWalletGatewayInterface gateway;
private final MutableLiveData<Boolean> controlNoValidationEventLiveData;
private final MutableLiveData<CashPickupTxnDetailDTO> cashPickupTxnDetailDTOMutableLiveData;
private final CompositeDisposable viewSubs;
private final CompositeDisposable useCaseSubs;
private String selectedControlNo;
private CashPickupTxnDetailDTO currentCashPickupTxnDetail;
public CashPickupToWalletPresenter(CashPickupToWalletPresenterInterface.CashPickupToWalletContract view, CashPickupToWalletGatewayInterface cashPickupToWalletGateway) {
this.view = view;
this.gateway = cashPickupToWalletGateway;
controlNoValidationEventLiveData = new MutableLiveData<>();
cashPickupTxnDetailDTOMutableLiveData = new MutableLiveData<>();
this.viewSubs = new CompositeDisposable();
this.useCaseSubs = new CompositeDisposable();
}
@Override
public void onViewReady() {
}
@Override
public void onViewNotReady() {
}
@Override
public void searchByControlNo() {
useCaseSubs.add(
gateway.searchTxnByControlNo(gateway.getAuth(), gateway.getUserID(), selectedControlNo)
.doOnSubscribe(subs -> view.showProgressBar(true, ""))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.doFinally(() -> view.showProgressBar(false, ""))
.subscribeWith(new CashPickupTxnSearchObserver())
);
}
@Override
public void redeemCashPickup() {
RemitAuthManager.getGmeAuthManager((AppCompatActivity) view.getContext())
.fromPaymentSource(
new RemitTxnParam(
"wallet",
"",
""
).enableFallbackAuth()
).setListener(new RemitAuthManager.RemitAuthListener() {
@Override
public void onRemitAuthSuccess(RemitAuthSuccessResult result) {
useCaseSubs.add(
gateway.redeemCashPickupTxn(gateway.getAuth(), gateway.getUserID(), selectedControlNo, "", "")
.doOnSubscribe(subs -> view.showProgressBar(true, ""))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.doFinally(() -> view.showProgressBar(false, ""))
.subscribeWith(new CashPickupTxnRedeemObserver())
);
}
@Override
public void onRemitAuthFailed(RemitAuthFailedResult failedResult) {
view.showToastMessage(failedResult.getFailedReason());
}
@Override
public void onRemitAuthCancelled() {
}
}).prompt();
}
@Override
public LiveData<Boolean> subscribeToCashPickupSearchEvent(Observable<CharSequence> controlNo) {
viewSubs.add(controlNo.map(this::validateControlNo).subscribeWith(new DisposableObserver<Boolean>() {
@Override
public void onNext(Boolean aBoolean) {
controlNoValidationEventLiveData.setValue(aBoolean);
}
@Override
public void onError(Throwable e) {
}
@Override
public void onComplete() {
}
}));
return controlNoValidationEventLiveData;
}
private boolean validateControlNo(CharSequence controlNo) {
if (controlNo != null && controlNo.length() > 0) {
this.selectedControlNo = controlNo.toString();
return true;
} else {
this.selectedControlNo = null;
return false;
}
}
@Override
public LiveData<CashPickupTxnDetailDTO> subscribeToCashPickupTxnDetailEvent() {
return cashPickupTxnDetailDTOMutableLiveData;
}
public class CashPickupTxnSearchObserver extends GenericApiObserverResponseV2<CashPickupTxnDetailDTO> {
@Override
protected Type getDataType() {
return TypeToken.getParameterized(CashPickupTxnDetailDTO.class).getType();
}
@Override
protected void onSuccess(GenericResponseDataModel<CashPickupTxnDetailDTO> t) {
if (Constants.SUCCESS_CODE_V2.equalsIgnoreCase(t.getErrorCode())) {
currentCashPickupTxnDetail=t.getData();
cashPickupTxnDetailDTOMutableLiveData.setValue(t.getData());
view.showTxnDetailScreen();
} else {
view.showPopUpMessage(t.getMsg(), CustomAlertDialog.AlertType.FAILED, null);
}
}
@Override
public void onFailed(String message) {
view.showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED, null);
}
@Override
protected void onConnectionNotEstablished(String message) {
view.showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED, null);
}
@Override
protected void unauthorizedAccess(String message) {
gateway.clearAllUserData();
view.showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED, alertType -> view.logout());
}
}
public class CashPickupTxnRedeemObserver extends GenericApiObserverResponseV2<MessageResponseDataModel> {
@Override
protected void onSuccess(GenericResponseDataModel<MessageResponseDataModel> t) {
if (Constants.SUCCESS_CODE_V2.equalsIgnoreCase(t.getErrorCode())) {
view.showPopUpMessage(t.getMsg(), CustomAlertDialog.AlertType.SUCCESS, alertType -> view.exitView());
} else {
view.showPopUpMessage(t.getMsg(), CustomAlertDialog.AlertType.FAILED, null);
}
}
@Override
public void onFailed(String message) {
view.showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED, null);
}
@Override
protected void onConnectionNotEstablished(String message) {
view.showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED, null);
}
@Override
protected void unauthorizedAccess(String message) {
gateway.clearAllUserData();
view.showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED, alertType -> view.logout());
}
}
}

26
app/src/main/java/com/swifttech/remit/android/features/cashpickuptowallet/presenter/CashPickupToWalletPresenterInterface.java

@ -0,0 +1,26 @@
package com.swifttech.remit.android.features.cashpickuptowallet.presenter;
import androidx.lifecycle.LiveData;
import com.swifttech.remit.android.base.BaseContractInterface;
import com.swifttech.remit.android.base.BasePresenterInterface;
import com.swifttech.remit.android.features.cashpickuptowallet.model.CashPickupTxnDetailDTO;
import io.reactivex.Observable;
public interface CashPickupToWalletPresenterInterface extends BasePresenterInterface {
void searchByControlNo();
void redeemCashPickup();
LiveData<Boolean> subscribeToCashPickupSearchEvent(Observable<CharSequence> controlNo);
LiveData<CashPickupTxnDetailDTO> subscribeToCashPickupTxnDetailEvent();
interface CashPickupToWalletContract extends BaseContractInterface
{
void showTxnDetailScreen();
}
}

101
app/src/main/java/com/swifttech/remit/android/features/cashpickuptowallet/view/CashPickupToWalletActivity.java

@ -0,0 +1,101 @@
package com.swifttech.remit.android.features.cashpickuptowallet.view;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProvider;
import androidx.viewpager.widget.ViewPager;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import com.swifttech.remit.android.R;
import com.swifttech.remit.android.base.BaseActivity;
import com.swifttech.remit.android.common.customwidgets.GenericViewPagerAdapter;
import com.swifttech.remit.android.features.cashpickuptowallet.CashPickupViewModelFactory;
import com.swifttech.remit.android.features.cashpickuptowallet.presenter.CashPickupToWalletPresenter;
import com.swifttech.remit.android.features.cashpickuptowallet.presenter.CashPickupToWalletPresenterInterface;
import com.swifttech.remit.android.features.otpverification.OTPVerificationViewModelFactory;
import com.swifttech.remit.android.features.otpverification.presenter.OTPVerificationPresenter;
import com.swifttech.remit.android.features.otpverification.view.OTPRequestFragment;
import com.swifttech.remit.android.features.otpverification.view.OTPVerifyFragment;
import java.util.ArrayList;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
public class CashPickupToWalletActivity extends BaseActivity implements CashPickupToWalletPresenterInterface.CashPickupToWalletContract {
@BindView(R.id.otpVerificationViewPager)
ViewPager viewPager;
@BindView(R.id.toolbar_title)
TextView toolbarTitle;
GenericViewPagerAdapter viewPagerAdapter;
private SearchCashPickupTxnFragment searchCashPickupTxnFragment;
private CashPickupTxnDetailFragment cashPickupDetailFragment;
private CashPickupToWalletPresenterInterface viewModel;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_cash_pickup_to_wallet);
ButterKnife.bind(this);
init();
}
private void init() {
toolbarTitle.setText("Redeem CashPickup");
viewModel = new ViewModelProvider(this, new CashPickupViewModelFactory(this)).get(CashPickupToWalletPresenter.class);
setupViewPager();
}
private void setupViewPager() {
viewPagerAdapter = new GenericViewPagerAdapter(getSupportFragmentManager());
ArrayList<Fragment> fragments = new ArrayList<>();
searchCashPickupTxnFragment=new SearchCashPickupTxnFragment();
cashPickupDetailFragment=new CashPickupTxnDetailFragment();
fragments.add(searchCashPickupTxnFragment);
fragments.add(cashPickupDetailFragment);
viewPagerAdapter.addFragments(fragments);
viewPager.setOffscreenPageLimit(3);
viewPager.setAdapter(viewPagerAdapter);
viewPager.setCurrentItem(0);
}
@Override
public void showTxnDetailScreen() {
viewPager.setCurrentItem(1);
}
@OnClick(R.id.iv_back)
public void onBackButtonPressed()
{
onBackPressed();
}
@Override
public void onBackPressed() {
if (viewPager.getCurrentItem() == 0) {
super.onBackPressed();
} else
viewPager.setCurrentItem(viewPager.getCurrentItem() - 1);
}
}

129
app/src/main/java/com/swifttech/remit/android/features/cashpickuptowallet/view/CashPickupTxnDetailFragment.java

@ -0,0 +1,129 @@
package com.swifttech.remit.android.features.cashpickuptowallet.view;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.Nullable;
import androidx.lifecycle.ViewModelProvider;
import com.jakewharton.rxbinding3.widget.RxTextView;
import com.swifttech.remit.android.R;
import com.swifttech.remit.android.base.BaseFragment;
import com.swifttech.remit.android.common.customwidgets.exchangecountrylistingdialog.CountryFlagMapper;
import com.swifttech.remit.android.features.cashpickuptowallet.model.CashPickupTxnDetailDTO;
import com.swifttech.remit.android.features.cashpickuptowallet.presenter.CashPickupToWalletPresenter;
import com.swifttech.remit.android.features.cashpickuptowallet.presenter.CashPickupToWalletPresenterInterface;
import com.swifttech.remit.android.features.inboundreceipt.view.ProgressPathView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
public class CashPickupTxnDetailFragment extends BaseFragment {
@BindView(R.id.tv_control_no)
TextView tv_gme_control_no;
@BindView(R.id.transaction_date)
TextView transaction_date;
@BindView(R.id.tv_receiver)
TextView tv_receiver;
@BindView(R.id.tv_address)
TextView tv_address;
@BindView(R.id.tv_mobile_no)
TextView tv_mobile_no;
@BindView(R.id.tv_agent_bank)
TextView tv_agent_bank;
@BindView(R.id.tv_total_sent_amount)
TextView tv_total_sent_amount;
@BindView(R.id.tv_service_fee)
TextView tv_service_fee;
@BindView(R.id.exrate_fee)
TextView exrate_fee;
@BindView(R.id.transfer_label)
TextView transfer_label;
@BindView(R.id.btn_submit)
Button btn_submit;
@BindView(R.id.senderFlagImageview)
ImageView senderFlagImageview;
private CashPickupToWalletPresenterInterface viewModel;
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_cash_pickup_txn_detail, container, false);
}
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
ButterKnife.bind(this, view);
init();
performDefaultAction(savedInstanceState);
}
private void performDefaultAction(Bundle savedInstanceState) {
viewModel.subscribeToCashPickupTxnDetailEvent().observe(getViewLifecycleOwner(), this::onCashPickupTxnDetailReceived);
}
private void onCashPickupTxnDetailReceived(CashPickupTxnDetailDTO receiptViewModel) {
tv_gme_control_no.setText(receiptViewModel.getControlNo());
transaction_date.setText(receiptViewModel.getTranDate());
tv_receiver.setText(receiptViewModel.getReceiverName());
tv_address.setText(receiptViewModel.getReceiverAddress());
tv_mobile_no.setText(receiptViewModel.getReceiverMobile());
tv_agent_bank.setText(receiptViewModel.getPayoutAgent());
tv_total_sent_amount.setText(receiptViewModel.getReceivedAmount());
tv_service_fee.setText(receiptViewModel.getServiceFee());
exrate_fee.setText(receiptViewModel.getExrate());
transfer_label.setText(receiptViewModel.getTransferStatusLabel());
senderFlagImageview.setImageResource(CountryFlagMapper.getFlagFromCountryCode(receiptViewModel.getSendingCountryCode()));
btn_submit.setEnabled(receiptViewModel.isTxnValidForRedeem());
if (receiptViewModel.isTxnValidForRedeem())
btn_submit.setVisibility(View.VISIBLE);
else
btn_submit.setVisibility(View.GONE);
}
private void init() {
viewModel = new ViewModelProvider(requireActivity()).get(CashPickupToWalletPresenter.class);
}
@OnClick(R.id.btn_submit)
public void searchByControlNo() {
viewModel.searchByControlNo();
}
}

68
app/src/main/java/com/swifttech/remit/android/features/cashpickuptowallet/view/SearchCashPickupTxnFragment.java

@ -0,0 +1,68 @@
package com.swifttech.remit.android.features.cashpickuptowallet.view;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import androidx.annotation.Nullable;
import androidx.lifecycle.ViewModelProvider;
import com.jakewharton.rxbinding3.widget.RxTextView;
import com.swifttech.remit.android.R;
import com.swifttech.remit.android.base.BaseFragment;
import com.swifttech.remit.android.features.cashpickuptowallet.presenter.CashPickupToWalletPresenter;
import com.swifttech.remit.android.features.cashpickuptowallet.presenter.CashPickupToWalletPresenterInterface;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
public class SearchCashPickupTxnFragment extends BaseFragment {
private CashPickupToWalletPresenterInterface viewModel;
@BindView(R.id.controlNo_edTxt)
EditText controlNoEditText;
@BindView(R.id.search_btn)
Button btnSearch;
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_search_cash_pickup_txn, container, false);
}
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
ButterKnife.bind(this, view);
init();
performDefaultAction(savedInstanceState);
}
private void performDefaultAction(Bundle savedInstanceState) {
viewModel.subscribeToCashPickupSearchEvent(RxTextView.textChanges(controlNoEditText).skipInitialValue()).observe(getViewLifecycleOwner(), btnSearch::setEnabled);
}
private void init() {
viewModel=new ViewModelProvider(requireActivity()).get(CashPickupToWalletPresenter.class);
}
@OnClick(R.id.search_btn)
public void searchByControlNo()
{
if(btnSearch.isEnabled())
{
viewModel.searchByControlNo();
}
}
}

3
app/src/main/java/com/swifttech/remit/android/features/login/view/LoginV2Activity.java

@ -22,6 +22,7 @@ import com.swifttech.remit.android.features.login.LoginViewModelFactory;
import com.swifttech.remit.android.features.login.presenter.LoginV2Presenter;
import com.swifttech.remit.android.features.login.presenter.LoginV2PresenterInterface;
import com.swifttech.remit.android.features.login.presenter.LoginViewLiveData;
import com.swifttech.remit.android.features.otpverification.view.OTPVerificationActivity;
import com.swifttech.remit.android.features.register.view.RegisterV2Activity;
import com.swifttech.remit.android.features.resetpassword.view.ResetPassV2Activity;
import com.google.android.material.textfield.TextInputEditText;
@ -186,7 +187,7 @@ public class LoginV2Activity extends BaseActivity implements View.OnClickListene
public void onClick(View v) {
switch (v.getId()) {
case R.id.register:
Intent registerIntent = new Intent(this, RegisterV2Activity.class);
Intent registerIntent = new Intent(this, OTPVerificationActivity.class);
startActivity(registerIntent);
break;

28
app/src/main/java/com/swifttech/remit/android/features/otpverification/OTPVerificationViewModelFactory.java

@ -0,0 +1,28 @@
package com.swifttech.remit.android.features.otpverification;
import androidx.annotation.NonNull;
import androidx.lifecycle.ViewModel;
import androidx.lifecycle.ViewModelProvider;
import com.swifttech.remit.android.features.login.gateway.LoginV2Gateway;
import com.swifttech.remit.android.features.login.presenter.LoginV2Presenter;
import com.swifttech.remit.android.features.login.presenter.LoginV2PresenterInterface;
import com.swifttech.remit.android.features.otpverification.gateway.OTPVerificationGateway;
import com.swifttech.remit.android.features.otpverification.presenter.OTPVerificationPresenter;
import com.swifttech.remit.android.features.otpverification.presenter.OTPVerificationPresenterInterface;
public class OTPVerificationViewModelFactory implements ViewModelProvider.Factory {
private final OTPVerificationPresenterInterface.OTPVerificationContract view;
public OTPVerificationViewModelFactory(OTPVerificationPresenterInterface.OTPVerificationContract view) {
this.view=view;
}
@SuppressWarnings("unchecked")
@NonNull
@Override
public <T extends ViewModel> T create(@NonNull Class<T> modelClass) {
return (T) new OTPVerificationPresenter(view,new OTPVerificationGateway());
}
}

26
app/src/main/java/com/swifttech/remit/android/features/otpverification/gateway/OTPVerificationGateway.java

@ -0,0 +1,26 @@
package com.swifttech.remit.android.features.otpverification.gateway;
import com.google.gson.JsonObject;
import com.swifttech.remit.android.base.PrivilegedGateway;
import com.swifttech.remit.android.features.otpverification.presenter.OTPVerificationGatewayInterface;
import com.swifttech.remit.android.utils.https.HttpClientV2;
import io.reactivex.Observable;
import okhttp3.ResponseBody;
public class OTPVerificationGateway extends PrivilegedGateway implements OTPVerificationGatewayInterface {
@Override
public Observable<ResponseBody> requestOTP(String basicAuth, String mobileNumber) {
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("mobileNumber",mobileNumber);
return HttpClientV2.getInstance().requestRegistrationOTP(basicAuth,jsonObject);
}
@Override
public Observable<ResponseBody> submitOTP(String basicAuth, String selectedMobileNumber, String selectedOTP) {
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("OTP",selectedOTP);
jsonObject.addProperty("mobileNumber",selectedMobileNumber);
return HttpClientV2.getInstance().submitRegistrationOTP(basicAuth,jsonObject);
}
}

19
app/src/main/java/com/swifttech/remit/android/features/otpverification/model/OTPSubmitModelDTO.java

@ -0,0 +1,19 @@
package com.swifttech.remit.android.features.otpverification.model;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class OTPSubmitModelDTO {
@SerializedName("referenceId")
@Expose
private String referenceId;
public String getReferenceId() {
return referenceId;
}
public void setReferenceId(String referenceId) {
this.referenceId = referenceId;
}
}

14
app/src/main/java/com/swifttech/remit/android/features/otpverification/presenter/OTPVerificationGatewayInterface.java

@ -0,0 +1,14 @@
package com.swifttech.remit.android.features.otpverification.presenter;
import com.swifttech.remit.android.base.PrivilegedGatewayInterface;
import io.reactivex.Observable;
import io.reactivex.disposables.Disposable;
import okhttp3.ResponseBody;
public interface OTPVerificationGatewayInterface extends PrivilegedGatewayInterface {
Observable<ResponseBody> requestOTP(String basicAuth, String mobileNumber);
Observable<ResponseBody> submitOTP(String basicAuth, String selectedMobileNumber, String selectedOTP);
}

238
app/src/main/java/com/swifttech/remit/android/features/otpverification/presenter/OTPVerificationPresenter.java

@ -0,0 +1,238 @@
package com.swifttech.remit.android.features.otpverification.presenter;
import android.os.Parcelable;
import android.util.Log;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import com.google.gson.reflect.TypeToken;
import com.swifttech.remit.android.base.BaseViewModel;
import com.swifttech.remit.android.common.customwidgets.CustomAlertDialog;
import com.swifttech.remit.android.features.otpverification.model.OTPSubmitModelDTO;
import com.swifttech.remit.android.utils.Constants;
import com.swifttech.remit.android.utils.https.GenericApiObserverResponseV2;
import com.swifttech.remit.android.utils.https.GenericResponseDataModel;
import com.swifttech.remit.android.utils.https.MessageResponseDataModel;
import java.lang.reflect.Type;
import io.reactivex.Observable;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.observers.DisposableObserver;
import io.reactivex.schedulers.Schedulers;
public class OTPVerificationPresenter extends BaseViewModel implements OTPVerificationPresenterInterface {
private final OTPVerificationContract view;
private final OTPVerificationGatewayInterface gateway;
private final CompositeDisposable useCaseSubs;
private final CompositeDisposable viewSubs;
private final MutableLiveData<Boolean> mobileValidaitonLiveData;
private final MutableLiveData<Boolean> otpValidaitonLiveData;
private String selectedMobileNumber;
private String selectedOTP;
public OTPVerificationPresenter(OTPVerificationContract view, OTPVerificationGatewayInterface gateway) {
this.view=view;
this.gateway=gateway;
this.useCaseSubs=new CompositeDisposable();
this.viewSubs=new CompositeDisposable();
this.mobileValidaitonLiveData =new MutableLiveData<>();
this.otpValidaitonLiveData=new MutableLiveData<>();
}
@Override
public void onViewReady() {
}
@Override
public void onViewNotReady() {
}
@Override
public LiveData<Boolean> subscribeToMobileNumberValidationEvent(Observable<CharSequence> mobileNumber) {
viewSubs.add(
mobileNumber.map(this::validateMobileNoForOTPRequest)
.subscribeWith(new DisposableObserver<Boolean>()
{
@Override
public void onNext(Boolean aBoolean) {
mobileValidaitonLiveData.setValue(aBoolean);
}
@Override
public void onError(Throwable e) {
}
@Override
public void onComplete() {
}
})
);
return mobileValidaitonLiveData;
}
private boolean validateMobileNoForOTPRequest(CharSequence mobileNumber) {
if(mobileNumber!=null&&mobileNumber.length()>0) {
this.selectedMobileNumber = mobileNumber.toString();
return true;
}
else {
this.selectedMobileNumber = null;
return false;
}
}
@Override
public void requestForOTP() {
useCaseSubs.add(
this.gateway.requestOTP(gateway.getBasicAuth(view.getContext()),selectedMobileNumber)
.doOnSubscribe(subs->view.showProgressBar(true,""))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.doFinally(()->view.showProgressBar(false,""))
.subscribeWith(new OTPRequestOBserver())
);
}
@Override
public LiveData<Boolean> subscribeToOTPNumberValidation(Observable<CharSequence> otpSubject) {
viewSubs.add(
otpSubject.map(this::validateOTPForSubmission)
.subscribeWith(new DisposableObserver<Boolean>()
{
@Override
public void onNext(Boolean aBoolean) {
otpValidaitonLiveData.setValue(aBoolean);
}
@Override
public void onError(Throwable e) {
}
@Override
public void onComplete() {
}
})
);
return otpValidaitonLiveData;
}
@Override
public void submitOTP() {
useCaseSubs.add(
this.gateway.submitOTP(gateway.getBasicAuth(view.getContext()),selectedMobileNumber,selectedOTP)
.doOnSubscribe(subs->view.showProgressBar(true,""))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.doFinally(()->view.showProgressBar(false,""))
.subscribeWith(new OTPSubmitObserver())
);
}
private boolean validateOTPForSubmission(CharSequence otp) {
if(otp!=null&&otp.length()==5)
{
this.selectedOTP=otp.toString();
return true;
}
else
{
this.selectedOTP=null;
return false;
}
}
public class OTPRequestOBserver extends GenericApiObserverResponseV2<MessageResponseDataModel>
{
@Override
protected void onSuccess(GenericResponseDataModel<MessageResponseDataModel> t) {
if(Constants.SUCCESS_CODE_V2.equalsIgnoreCase(t.getErrorCode()))
{
view.showPopUpMessage(t.getMsg(), CustomAlertDialog.AlertType.SUCCESS,alertType ->
{
view.showOTPView();
//TODO Currently we receive OTP in the response
view.showToastMessage(t.getExtra());
}
);
}
else
{
view.showPopUpMessage(t.getMsg(), CustomAlertDialog.AlertType.SUCCESS,alertType -> view.exitView());
}
}
@Override
public void onFailed(String message) {
view.showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED,alertType -> view.exitView());
}
@Override
protected void onConnectionNotEstablished(String message) {
view.showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED,alertType -> view.exitView());
}
@Override
protected void unauthorizedAccess(String message) {
gateway.clearAllUserData();
view.showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED,alertType -> view.logout());
}
}
public class OTPSubmitObserver extends GenericApiObserverResponseV2<OTPSubmitModelDTO>
{
@Override
protected Type getDataType() {
return TypeToken.getParameterized(OTPSubmitModelDTO.class).getType();
}
@Override
protected void onSuccess(GenericResponseDataModel<OTPSubmitModelDTO> t) {
if(Constants.SUCCESS_CODE_V2.equalsIgnoreCase(t.getErrorCode()))
{
view.showPopUpMessage(t.getMsg(), CustomAlertDialog.AlertType.SUCCESS,alertType -> view.onOTPVerificationCompleted(selectedMobileNumber,t.getData().getReferenceId()));
}
else
{
view.showPopUpMessage(t.getMsg(), CustomAlertDialog.AlertType.SUCCESS,null);
}
}
@Override
public void onFailed(String message) {
view.showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED,null);
}
@Override
protected void onConnectionNotEstablished(String message) {
view.showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED,null);
}
@Override
protected void unauthorizedAccess(String message) {
gateway.clearAllUserData();
view.showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED,null);
}
}
}

27
app/src/main/java/com/swifttech/remit/android/features/otpverification/presenter/OTPVerificationPresenterInterface.java

@ -0,0 +1,27 @@
package com.swifttech.remit.android.features.otpverification.presenter;
import androidx.lifecycle.LiveData;
import com.jakewharton.rxbinding3.InitialValueObservable;
import com.swifttech.remit.android.base.BaseContractInterface;
import io.reactivex.Observable;
import io.reactivex.subjects.PublishSubject;
public interface OTPVerificationPresenterInterface {
LiveData<Boolean> subscribeToMobileNumberValidationEvent(Observable<CharSequence> mobileObservable);
void requestForOTP();
LiveData<Boolean> subscribeToOTPNumberValidation(Observable<CharSequence> otpObservable);
void submitOTP();
public interface OTPVerificationContract extends BaseContractInterface {
void showOTPView();
void onOTPVerificationCompleted(String selectedMobileNumber, String referenceId);
}
}

67
app/src/main/java/com/swifttech/remit/android/features/otpverification/view/OTPRequestFragment.java

@ -0,0 +1,67 @@
package com.swifttech.remit.android.features.otpverification.view;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import androidx.annotation.Nullable;
import androidx.lifecycle.ViewModelProvider;
import com.jakewharton.rxbinding3.widget.RxTextView;
import com.swifttech.remit.android.R;
import com.swifttech.remit.android.base.BaseFragment;
import com.swifttech.remit.android.features.otpverification.presenter.OTPVerificationPresenter;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
public class OTPRequestFragment extends BaseFragment {
private OTPVerificationPresenter viewModel;
@BindView(R.id.mobile_edTxt)
EditText mobileEditText;
@BindView(R.id.btn_submit)
Button btnSubmit;
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_otp_request, container, false);
}
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
ButterKnife.bind(this, view);
init();
performDefaultAction(savedInstanceState);
}
private void performDefaultAction(Bundle savedInstanceState) {
viewModel.subscribeToMobileNumberValidationEvent(RxTextView.textChanges(mobileEditText).skipInitialValue()).observe(getViewLifecycleOwner(),btnSubmit::setEnabled);
}
private void init() {
viewModel=new ViewModelProvider(requireActivity()).get(OTPVerificationPresenter.class);
}
@OnClick(R.id.btn_submit)
public void requestForOTP()
{
if(btnSubmit.isEnabled())
{
viewModel.requestForOTP();
}
}
}

108
app/src/main/java/com/swifttech/remit/android/features/otpverification/view/OTPVerificationActivity.java

@ -0,0 +1,108 @@
package com.swifttech.remit.android.features.otpverification.view;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProvider;
import androidx.viewpager.widget.ViewPager;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import com.google.android.material.tabs.TabLayout;
import com.swifttech.remit.android.R;
import com.swifttech.remit.android.base.BaseActivity;
import com.swifttech.remit.android.common.customwidgets.GenericViewPagerAdapter;
import com.swifttech.remit.android.features.otpverification.OTPVerificationViewModelFactory;
import com.swifttech.remit.android.features.otpverification.presenter.OTPVerificationPresenter;
import com.swifttech.remit.android.features.otpverification.presenter.OTPVerificationPresenterInterface;
import com.swifttech.remit.android.features.register.view.RegisterV2Activity;
import java.util.ArrayList;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
public class OTPVerificationActivity extends BaseActivity implements OTPVerificationPresenterInterface.OTPVerificationContract {
@BindView(R.id.otpVerificationViewPager)
ViewPager viewPager;
@BindView(R.id.iv_back)
View iv_back;
@BindView(R.id.toolbar_title)
TextView toolbarTitle;
GenericViewPagerAdapter viewPagerAdapter;
private OTPRequestFragment otpRequestFragment;
private OTPVerifyFragment otpVerifyFragment;
private OTPVerificationPresenterInterface viewModel;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_otpverification);
ButterKnife.bind(this);
init();
}
private void init() {
toolbarTitle.setText("Mobile Verification");
viewModel = new ViewModelProvider(this, new OTPVerificationViewModelFactory(this)).get(OTPVerificationPresenter.class);
setupViewPager();
}
private void setupViewPager() {
viewPagerAdapter = new GenericViewPagerAdapter(getSupportFragmentManager());
ArrayList<Fragment> fragments = new ArrayList<>();
otpRequestFragment=new OTPRequestFragment();
otpVerifyFragment=new OTPVerifyFragment();
fragments.add(otpRequestFragment);
fragments.add(otpVerifyFragment);
viewPagerAdapter.addFragments(fragments);
viewPager.setOffscreenPageLimit(3);
viewPager.setAdapter(viewPagerAdapter);
viewPager.setCurrentItem(0);
}
@Override
public void showOTPView() {
hideKeyBoard();
viewPager.setCurrentItem(1);
}
@OnClick(R.id.iv_back)
public void onBackButtonPressed()
{
onBackPressed();
}
@Override
public void onBackPressed() {
if (viewPager.getCurrentItem() == 0) {
super.onBackPressed();
} else
viewPager.setCurrentItem(viewPager.getCurrentItem() - 1);
}
@Override
public void onOTPVerificationCompleted(String selectedMobileNumber, String referenceId) {
RegisterV2Activity.showRegisterActivity(this,referenceId,selectedMobileNumber);
}
}

65
app/src/main/java/com/swifttech/remit/android/features/otpverification/view/OTPVerifyFragment.java

@ -0,0 +1,65 @@
package com.swifttech.remit.android.features.otpverification.view;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import androidx.annotation.Nullable;
import androidx.lifecycle.ViewModelProvider;
import com.jakewharton.rxbinding3.widget.RxTextView;
import com.mukesh.OtpView;
import com.swifttech.remit.android.R;
import com.swifttech.remit.android.base.BaseFragment;
import com.swifttech.remit.android.features.otpverification.presenter.OTPVerificationPresenter;
import com.swifttech.remit.android.features.otpverification.presenter.OTPVerificationPresenterInterface;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import io.reactivex.subjects.PublishSubject;
public class OTPVerifyFragment extends BaseFragment {
@BindView(R.id.otp_view)
OtpView otpView;
@BindView(R.id.btn_submit)
Button btnSubmit;
private OTPVerificationPresenterInterface viewModel;
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_otp_verify, container, false);
}
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
ButterKnife.bind(this, view);
init();
performDefaultAction(savedInstanceState);
}
private void performDefaultAction(Bundle savedInstanceState) {
viewModel.subscribeToOTPNumberValidation(RxTextView.textChanges(otpView)).observe(getViewLifecycleOwner(),btnSubmit::setEnabled);
}
private void init() {
viewModel=new ViewModelProvider(requireActivity()).get(OTPVerificationPresenter.class);
}
@OnClick(R.id.btn_submit)
public void submitOTP()
{
if(btnSubmit.isEnabled())
{
viewModel.submitOTP();
}
}
}

8
app/src/main/java/com/swifttech/remit/android/features/register/RegisterViewModelFactory.java

@ -12,15 +12,19 @@ import com.swifttech.remit.android.features.register.presenter.RegisterV2Present
public class RegisterViewModelFactory implements ViewModelProvider.Factory {
private final RegisterV2PresenterInterface.RegisterV2ContractInterface view;
private final String referenceId;
private final String mobileNo;
public RegisterViewModelFactory(RegisterV2PresenterInterface.RegisterV2ContractInterface view) {
public RegisterViewModelFactory(RegisterV2PresenterInterface.RegisterV2ContractInterface view, String referenceId, String mobileNo) {
this.view=view;
this.referenceId=referenceId;
this.mobileNo=mobileNo;
}
@SuppressWarnings("unchecked")
@NonNull
@Override
public <T extends ViewModel> T create(@NonNull Class<T> modelClass) {
return (T) new RegisterV2Presenter(view,new RegisterV2Gateway(),new LoginV2Gateway());
return (T) new RegisterV2Presenter(view,new RegisterV2Gateway(),new LoginV2Gateway(),this.referenceId,this.mobileNo);
}
}

5
app/src/main/java/com/swifttech/remit/android/features/register/gateway/RegisterV2Gateway.java

@ -25,7 +25,7 @@ public class RegisterV2Gateway extends PrivilegedGateway implements RegisterV2In
@Override
public Observable<RegisterApiResponse> registerUser(String auth,String userId, String encPAssword, String mobileNumber, String nativeCountryId, String clientId, String fcmId, String appVersion, String phoneBrand, String phoneOs, String deviceId, String osVersion) {
public Observable<RegisterApiResponse> registerUser(String auth,String userId, String encPAssword, String mobileNumber, String nativeCountryId, String clientId, String fcmId, String appVersion, String phoneBrand, String phoneOs, String deviceId, String osVersion,String refID) {
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("username", userId);
@ -40,6 +40,9 @@ public class RegisterV2Gateway extends PrivilegedGateway implements RegisterV2In
jsonObject.addProperty("fcmId", fcmId);
jsonObject.addProperty("osVersion", osVersion);
//TOOD add referenceID obtained through OTP validation
jsonObject.addProperty("referenceID", refID);
return HttpClientV2.getInstance().signUpV2(auth, jsonObject);
}

2
app/src/main/java/com/swifttech/remit/android/features/register/presenter/RegisterV2InteractorInterface.java

@ -19,7 +19,7 @@ public interface RegisterV2InteractorInterface extends BaseInteractorInterface {
{
Observable<RegisterApiResponse> registerUser(String auth, String userId, String encPAssword, String mobileNumber, String nativeCountryId, String clientId, String fcmId, String appVersion, String phoneBrand, String phoneOs, String deviceId, String osVersion);
Observable<RegisterApiResponse> registerUser(String auth, String userId, String encPAssword, String mobileNumber, String nativeCountryId, String clientId, String fcmId, String appVersion, String phoneBrand, String phoneOs, String deviceId, String osVersion,String refId);
void updateUserId(String userId);

25
app/src/main/java/com/swifttech/remit/android/features/register/presenter/RegisterV2Presenter.java

@ -42,6 +42,8 @@ public class RegisterV2Presenter extends BaseViewModel implements RegisterV2Pres
private final CompositeDisposable viewEventCompositeDisposable;
private final RegisterViewLiveData registerViewLiveData;
private final RegisterValidator registerValidator;
private final String selectedRefId;
private final String selectedMobileNo;
private MutableLiveData<List<NativeCountry>> nativeCountryListLiveData;
@ -50,7 +52,7 @@ public class RegisterV2Presenter extends BaseViewModel implements RegisterV2Pres
private String registrationSuccessMessage = "";
private RemitAuthManager remitAuthManager;
public RegisterV2Presenter(RegisterV2PresenterInterface.RegisterV2ContractInterface view, Register2GatewayInterface registerGateway, LoginV2InteractorInterface.Login2GatewayInterface loginGateway) {
public RegisterV2Presenter(RegisterV2ContractInterface view, Register2GatewayInterface registerGateway, LoginV2InteractorInterface.Login2GatewayInterface loginGateway, String referenceId, String mobileNo) {
this.view = view;
useCaseCompositeDisposable = new CompositeDisposable();
viewEventCompositeDisposable = new CompositeDisposable();
@ -59,6 +61,8 @@ public class RegisterV2Presenter extends BaseViewModel implements RegisterV2Pres
registerViewLiveData = new RegisterViewLiveData();
registerValidator = new RegisterValidator();
remitAuthManager = RemitAuthManager.getGmeAuthManager((AppCompatActivity) view.getContext());
this.selectedRefId=referenceId;
this.selectedMobileNo=mobileNo;
}
@ -90,7 +94,8 @@ public class RegisterV2Presenter extends BaseViewModel implements RegisterV2Pres
appRelatedMetaData.getPhoneBrand(),
appRelatedMetaData.getOsName(),
appRelatedMetaData.getDeviceId(),
appRelatedMetaData.getOsVersion())
appRelatedMetaData.getOsVersion(),
this.selectedRefId)
.doOnSubscribe(d -> view.showProgressBar(true, getStringfromStringId(R.string.processing_request_text)))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
@ -101,6 +106,7 @@ public class RegisterV2Presenter extends BaseViewModel implements RegisterV2Pres
@Override
public RegisterViewLiveData getRegisterRelatedViewEvents(RegisterViewLiveData.RegisterViewBinding viewBindings) {
bindView(viewBindings);
registerViewLiveData.setPhoneNumberInputLiveData(new FormInputStateDTO<>(true,null,selectedMobileNo));
return registerViewLiveData;
}
@ -206,21 +212,6 @@ public class RegisterV2Presenter extends BaseViewModel implements RegisterV2Pres
}
}
// private void persistUserCredentialForFingerprintAuth(String userId, String pwd, LoginModelV2 loginModelV2) {
// SecurityUtils.generateKey()
// .doOnSubscribe(subs -> view.showProgressBar(true, getStringfromStringId(R.string.processing_request_text)))
// .flatMap(key -> Observable.zip(Observable.just(userId),
// SecurityUtils.encryptUsingAES(pwd, key).subscribeOn(Schedulers.io()),
// encryptByKeyStore(key).subscribeOn(Schedulers.io()),
// FingerprintEncResult::new)
// ).observeOn(AndroidSchedulers.mainThread())
// .doFinally(() -> view.showProgressBar(false, ""))
// .subscribe(new FingerprintEncResultObserver(loginModelV2));
// }
// private Observable<String> encryptByKeyStore(String data) {
// return SecurityUtils.encryptUsingKeyStore(view.getContext(), data).flatMap(encKey -> Observable.just(encKey.getEncrypted()));
// }
class RegisterValidator {

14
app/src/main/java/com/swifttech/remit/android/features/register/view/RegisterV2Activity.java

@ -41,6 +41,8 @@ import static com.swifttech.remit.android.features.kyc.view.KYCV3Activity.KYC_FO
public class RegisterV2Activity extends BaseActivity implements RegisterV2PresenterInterface.RegisterV2ContractInterface {
private static final String REFERENCE_ID = "Ref_Id_Bundle_Key";
private static final String MOBILE_NO = "Mobile_No_Bundle_Key";
@BindView(R.id.usernameId_edTxt)
TextInputEditText usernameId;
@ -84,6 +86,16 @@ public class RegisterV2Activity extends BaseActivity implements RegisterV2Presen
private RegisterViewLiveData registerRelatedViewEvents;
private List<NativeCountry> nativeCountryList;
public static void showRegisterActivity(Context context, String referenceId,String mobileNumber)
{
Intent intent=new Intent(context,RegisterV2Activity.class);
intent.putExtra(REFERENCE_ID,referenceId);
intent.putExtra(MOBILE_NO,mobileNumber);
context.startActivity(intent);
}
@Override
protected void onCreate(Bundle savedInstanceState) {
@ -99,7 +111,7 @@ public class RegisterV2Activity extends BaseActivity implements RegisterV2Presen
private void initialize() {
selectedNativeCountrySubject = PublishSubject.create();
this.presenter = new ViewModelProvider(this, new RegisterViewModelFactory(this)).get(RegisterV2Presenter.class);
this.presenter = new ViewModelProvider(this, new RegisterViewModelFactory(this,getIntent().getStringExtra(REFERENCE_ID),getIntent().getStringExtra(MOBILE_NO))).get(RegisterV2Presenter.class);
registerRelatedViewEvents = this.presenter.getRegisterRelatedViewEvents(new RegisterViewLiveData.RegisterViewBinding(
RxTextView.textChanges(usernameId).skipInitialValue(),

3
app/src/main/java/com/swifttech/remit/android/features/splashscreen/view/SplashScreen.java

@ -50,6 +50,7 @@ import com.swifttech.remit.android.features.exrate.presenter.ExchangeRatePresent
import com.swifttech.remit.android.features.exrate.view.SelectedRedBorderDecoration;
import com.swifttech.remit.android.features.home.view.HomeActivityV2;
import com.swifttech.remit.android.features.login.view.LoginV2Activity;
import com.swifttech.remit.android.features.otpverification.view.OTPVerificationActivity;
import com.swifttech.remit.android.features.register.view.RegisterV2Activity;
import com.swifttech.remit.android.features.settings.gateway.LanguageSelectionGateway;
import com.swifttech.remit.android.features.splashscreen.adapter.LanguageSelectionRVAdapter;
@ -215,7 +216,7 @@ public class SplashScreen extends BaseActivity implements View.OnClickListener,
showCountryListinDialog();
break;
case R.id.btn_rgstr:
startActivity(new Intent(this, RegisterV2Activity.class));
startActivity(new Intent(this, OTPVerificationActivity.class));
break;
case R.id.btn_lgn:
startActivity(new Intent(this, LoginV2Activity.class));

28
app/src/main/java/com/swifttech/remit/android/features/withdraw/WithdrawViewModelFactory.java

@ -0,0 +1,28 @@
package com.swifttech.remit.android.features.withdraw;
import androidx.annotation.NonNull;
import androidx.lifecycle.ViewModel;
import androidx.lifecycle.ViewModelProvider;
import com.swifttech.remit.android.features.cashpickuptowallet.gateway.CashPickupToWalletGateway;
import com.swifttech.remit.android.features.cashpickuptowallet.presenter.CashPickupToWalletPresenter;
import com.swifttech.remit.android.features.cashpickuptowallet.presenter.CashPickupToWalletPresenterInterface;
import com.swifttech.remit.android.features.withdraw.gateway.WithdrawGateway;
import com.swifttech.remit.android.features.withdraw.presenter.WithdrawPresenter;
import com.swifttech.remit.android.features.withdraw.presenter.WithdrawPresenterInterface;
public class WithdrawViewModelFactory implements ViewModelProvider.Factory {
private final WithdrawPresenterInterface.WithdrawContract view;
public WithdrawViewModelFactory(WithdrawPresenterInterface.WithdrawContract view) {
this.view=view;
}
@SuppressWarnings("unchecked")
@NonNull
@Override
public <T extends ViewModel> T create(@NonNull Class<T> modelClass) {
return (T) new WithdrawPresenter(view,new WithdrawGateway());
}
}

8
app/src/main/java/com/swifttech/remit/android/features/withdraw/gateway/WithdrawGateway.java

@ -0,0 +1,8 @@
package com.swifttech.remit.android.features.withdraw.gateway;
import com.swifttech.remit.android.base.PrivilegedGateway;
import com.swifttech.remit.android.features.cashpickuptowallet.presenter.CashPickupToWalletGatewayInterface;
import com.swifttech.remit.android.features.withdraw.presenter.WithdrawGatewayInterface;
public class WithdrawGateway extends PrivilegedGateway implements WithdrawGatewayInterface {
}

4
app/src/main/java/com/swifttech/remit/android/features/withdraw/presenter/WithdrawGatewayInterface.java

@ -0,0 +1,4 @@
package com.swifttech.remit.android.features.withdraw.presenter;
public interface WithdrawGatewayInterface {
}

24
app/src/main/java/com/swifttech/remit/android/features/withdraw/presenter/WithdrawPresenter.java

@ -0,0 +1,24 @@
package com.swifttech.remit.android.features.withdraw.presenter;
import com.swifttech.remit.android.base.BaseViewModel;
public class WithdrawPresenter extends BaseViewModel {
private final WithdrawPresenterInterface.WithdrawContract view;
private final WithdrawGatewayInterface gateway;
public WithdrawPresenter(WithdrawPresenterInterface.WithdrawContract view, WithdrawGatewayInterface withdrawGateway) {
this.view=view;
this.gateway=withdrawGateway;
}
@Override
public void onViewReady() {
}
@Override
public void onViewNotReady() {
}
}

9
app/src/main/java/com/swifttech/remit/android/features/withdraw/presenter/WithdrawPresenterInterface.java

@ -0,0 +1,9 @@
package com.swifttech.remit.android.features.withdraw.presenter;
public interface WithdrawPresenterInterface {
interface WithdrawContract
{
}
}

44
app/src/main/java/com/swifttech/remit/android/features/withdraw/view/WithdrawActivity.java

@ -0,0 +1,44 @@
package com.swifttech.remit.android.features.withdraw.view;
import androidx.appcompat.app.AppCompatActivity;
import androidx.lifecycle.ViewModelProvider;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import com.swifttech.remit.android.R;
import com.swifttech.remit.android.features.cashpickuptowallet.CashPickupViewModelFactory;
import com.swifttech.remit.android.features.cashpickuptowallet.presenter.CashPickupToWalletPresenter;
import com.swifttech.remit.android.features.withdraw.WithdrawViewModelFactory;
import com.swifttech.remit.android.features.withdraw.presenter.WithdrawPresenter;
import com.swifttech.remit.android.features.withdraw.presenter.WithdrawPresenterInterface;
import butterknife.BindView;
import butterknife.ButterKnife;
public class WithdrawActivity extends AppCompatActivity implements WithdrawPresenterInterface.WithdrawContract {
@BindView(R.id.iv_back)
View iv_back;
@BindView(R.id.toolbar_title)
TextView toolbarTitle;
private WithdrawPresenter viewModel;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_withdraw);
ButterKnife.bind(this);
init();
}
private void init() {
toolbarTitle.setText("Withdraw");
viewModel = new ViewModelProvider(this, new WithdrawViewModelFactory(this)).get(WithdrawPresenter.class);
}
}

2
app/src/main/java/com/swifttech/remit/android/utils/https/API_URL.java

@ -92,5 +92,7 @@ public class API_URL {
public static final String PROFILE_OTP_VERIFY =BuildConfig.API_VERSION +"/mobile/ValidationOTP";
public static final String PROFILE_PERSONAL_INFO =BuildConfig.API_VERSION +"/mobile/ProfilepersonalInformation";
public static final String UPDATE_PROFILE =BuildConfig.API_VERSION +"/mobile/ChangeInformation";
public static final String REGISTER_OTP_REQUEST = BuildConfig.API_VERSION + "/mobile/requestOTP ";
public static final String REGISTER_OTP_SUBMIT = BuildConfig.API_VERSION + "/mobile/submitOTP ";
}

8
app/src/main/java/com/swifttech/remit/android/utils/https/ApiEndpoints.java

@ -228,9 +228,13 @@ public interface ApiEndpoints {
Observable<Response<ResponseBody>> downloadFile(@Url String fileUrl);
@POST(API_URL.PROFILE_OTP_RESEND)
@POST(API_URL.REGISTER_OTP_REQUEST)
@Headers("Content-Type: application/json")
Observable<ResponseBody> profileOTPResend(@Header("Authorization") String token, @Body()JsonObject requestBody);
Observable<ResponseBody> requestRegistrationOTP(@Header("Authorization") String token, @Body()JsonObject requestBody);
@POST(API_URL.REGISTER_OTP_SUBMIT)
@Headers("Content-Type: application/json")
Observable<ResponseBody> submitRegistrationOTP(@Header("Authorization") String token, @Body()JsonObject requestBody);

9
app/src/main/res/layout/activity_cash_pickup_to_wallet.xml

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".features.cashpickuptowallet.view.CashPickupToWalletActivity">
</androidx.constraintlayout.widget.ConstraintLayout>

27
app/src/main/res/layout/activity_otpverification.xml

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/background_gray"
android:orientation="vertical"
android:fitsSystemWindows="true">
<include layout="@layout/layout_sendmoney_toolbar" />
<com.swifttech.remit.android.common.customwidgets.SwipeDisabledViewPager
android:id="@+id/otpVerificationViewPager"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"/>
</LinearLayout>

3
app/src/main/res/layout/activity_register_v2.xml

@ -79,7 +79,7 @@
android:id="@+id/mobile_TxtInputLayout"
app:errorEnabled="true"
style="@style/MTextInputLayoutForm"
app:endIconMode="clear_text"
app:endIconMode="none"
android:hint="@string/mobile_number_text"
app:startIconDrawable="@drawable/vd_phone"
>
@ -89,6 +89,7 @@
style="@style/MTextInputEditText"
android:inputType="phone"
android:imeOptions="actionDone"
android:enabled="false"
/>

9
app/src/main/res/layout/activity_withdraw.xml

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".features.withdraw.view.WithdrawActivity">
</androidx.constraintlayout.widget.ConstraintLayout>

453
app/src/main/res/layout/fragment_cash_pickup_txn_detail.xml

@ -0,0 +1,453 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/background_gray"
android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/relativeLayout4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/_8sdp"
android:background="@drawable/ic_recharge_share_background">
<ImageView
android:id="@+id/senderFlagImageview"
android:layout_width="@dimen/_30sdp"
android:layout_height="@dimen/_30sdp"
android:src="@drawable/flag_default"
app:layout_constraintEnd_toStartOf="@+id/view12"
app:layout_constraintStart_toEndOf="@+id/guideline5"
app:layout_constraintTop_toTopOf="@+id/gmeIconImageview" />
<com.swifttech.remit.android.features.inboundreceipt.view.ProgressPathView
android:id="@+id/view12"
android:layout_width="0dp"
android:layout_height="@dimen/_1sdp"
android:layout_marginStart="@dimen/_2sdp"
android:layout_marginEnd="@dimen/_2sdp"
app:layout_constraintBottom_toBottomOf="@+id/gmeIconImageview"
app:layout_constraintEnd_toStartOf="@+id/gmeIconImageview"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/senderFlagImageview"
app:layout_constraintTop_toTopOf="@+id/gmeIconImageview" />
<ImageView
android:id="@+id/gmeIconImageview"
android:layout_width="@dimen/_30sdp"
android:layout_height="@dimen/_30sdp"
android:src="@drawable/ic_gme_logo_white"
android:layout_marginTop="@dimen/_20sdp"
android:layout_marginBottom="@dimen/_20sdp"
app:layout_constraintEnd_toStartOf="@+id/view13"
app:layout_constraintStart_toEndOf="@+id/view12"
app:layout_constraintTop_toBottomOf="@+id/transfer_label"
app:layout_constraintBottom_toBottomOf="parent"/>
<com.swifttech.remit.android.features.inboundreceipt.view.ProgressPathView
android:id="@+id/view13"
android:layout_width="0dp"
android:layout_height="@dimen/_1sdp"
android:layout_marginStart="@dimen/_2sdp"
android:layout_marginEnd="@dimen/_2sdp"
app:layout_constraintBottom_toBottomOf="@+id/receiverFlagImageview"
app:layout_constraintEnd_toStartOf="@+id/receiverFlagImageview"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/gmeIconImageview"
app:layout_constraintTop_toTopOf="@+id/receiverFlagImageview" />
<ImageView
android:id="@+id/receiverFlagImageview"
android:layout_width="@dimen/_30sdp"
android:layout_height="@dimen/_30sdp"
android:src="@drawable/flag_south_korea"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintEnd_toStartOf="@+id/guideline4"
app:layout_constraintTop_toTopOf="@+id/gmeIconImageview" />
<com.swifttech.remit.android.common.customwidgets.GmeTextView
android:id="@+id/transfer_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/_6sdp"
android:layout_marginEnd="@dimen/_6sdp"
android:layout_marginTop="@dimen/_6sdp"
android:padding="@dimen/_4sdp"
tools:text="@string/transfer_success_text"
android:textColor="@color/white"
android:textSize="@dimen/_14ssp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:txtfontName="@string/semibold" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.9" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.1" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/_8sdp"
android:background="@drawable/ic_rectangle_white_extra_corners">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.swifttech.remit.android.common.customwidgets.GmeTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="@dimen/_8sdp"
android:text="@string/transaction_date_text"
android:textColor="@color/darkgray"
android:textSize="@dimen/_11ssp" />
<com.swifttech.remit.android.common.customwidgets.GmeTextView
android:id="@+id/transaction_date"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_weight="1"
android:gravity="end"
android:padding="@dimen/_8sdp"
android:textColor="@color/darkgray"
android:textSize="@dimen/_11ssp"
app:txtfontName="@string/semibold" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/_8sdp"
android:background="@drawable/ic_rectangle_white_extra_corners"
android:orientation="vertical">
<LinearLayout
android:id="@+id/nameContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="1">
<com.swifttech.remit.android.common.customwidgets.GmeTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="@dimen/_8sdp"
android:text="@string/receiver_text"
android:textColor="@color/darkgray"
android:textSize="@dimen/_11ssp" />
<com.swifttech.remit.android.common.customwidgets.GmeTextView
android:id="@+id/tv_receiver"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:padding="@dimen/_8sdp"
android:textColor="@color/darkgray"
android:textSize="@dimen/_11ssp"
app:txtfontName="@string/semibold" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/gray" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.swifttech.remit.android.common.customwidgets.GmeTextView
android:id="@+id/receiver_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="@dimen/_8sdp"
android:text="@string/address_text"
android:textColor="@color/darkgray"
android:textSize="@dimen/_11ssp" />
<com.swifttech.remit.android.common.customwidgets.GmeTextView
android:id="@+id/tv_address"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:padding="@dimen/_8sdp"
android:singleLine="true"
android:textColor="@color/darkgray"
android:textSize="@dimen/_11ssp"
app:txtfontName="@string/semibold" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="@id/receiver_label"
android:background="@color/gray" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.swifttech.remit.android.common.customwidgets.GmeTextView
android:id="@+id/mobile_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/receiver_label"
android:padding="@dimen/_8sdp"
android:text="@string/mobile_text"
android:textColor="@color/darkgray"
android:textSize="@dimen/_11ssp" />
<com.swifttech.remit.android.common.customwidgets.GmeTextView
android:id="@+id/tv_mobile_no"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:padding="@dimen/_8sdp"
android:textColor="@color/darkgray"
android:textSize="@dimen/_11ssp"
app:txtfontName="@string/semibold" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_below="@id/mobile_label"
android:background="@color/gray" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.swifttech.remit.android.common.customwidgets.GmeTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left"
android:padding="@dimen/_8sdp"
android:text="@string/payout_agent_text"
android:textColor="@color/darkgray"
android:textSize="@dimen/_11ssp" />
<com.swifttech.remit.android.common.customwidgets.GmeTextView
android:id="@+id/tv_agent_bank"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ellipsize="end"
android:gravity="end"
android:padding="@dimen/_8sdp"
android:singleLine="false"
android:text=""
android:textColor="@color/darkgray"
android:textSize="@dimen/_11ssp"
app:txtfontName="@string/semibold" />
</LinearLayout>
<View
android:id="@+id/account_no_container_divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/gray"
android:visibility="gone" />
<LinearLayout
android:id="@+id/account_no_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone">
<com.swifttech.remit.android.common.customwidgets.GmeTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left"
android:padding="@dimen/_8sdp"
android:text="@string/account_number_text"
android:textColor="@color/darkgray"
android:textSize="@dimen/_11ssp" />
<com.swifttech.remit.android.common.customwidgets.GmeTextView
android:id="@+id/tv_acc_no"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:maxLines="2"
android:padding="@dimen/_8sdp"
android:singleLine="false"
android:text=""
android:textColor="@color/darkgray"
android:textSize="@dimen/_11ssp"
app:txtfontName="@string/semibold" />
</LinearLayout>
<View
android:id="@+id/total_sent_amount_divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/gray" />
<LinearLayout
android:id="@+id/total_sent_amount_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.swifttech.remit.android.common.customwidgets.GmeTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="@dimen/_8sdp"
android:text="@string/total_sent_amount_text"
android:textColor="@color/darkgray"
android:textSize="@dimen/_11ssp" />
<com.swifttech.remit.android.common.customwidgets.GmeTextView
android:id="@+id/tv_total_sent_amount"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:padding="@dimen/_8sdp"
android:text=""
android:textColor="@color/darkgray"
android:textSize="@dimen/_11ssp"
app:txtfontName="@string/semibold" />
</LinearLayout>
<!---->
<View
android:id="@+id/service_fee_divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/gray" />
<LinearLayout
android:id="@+id/service_fee_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.swifttech.remit.android.common.customwidgets.GmeTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="@dimen/_8sdp"
android:text="@string/service_fee_text"
android:textColor="@color/darkgray"
android:textSize="@dimen/_11ssp" />
<com.swifttech.remit.android.common.customwidgets.GmeTextView
android:id="@+id/tv_service_fee"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:padding="@dimen/_8sdp"
android:textColor="@color/darkgray"
android:textSize="@dimen/_11ssp"
app:txtfontName="@string/semibold" />
</LinearLayout>
<!---->
<View
android:id="@+id/coupon_fee_divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/gray" />
<!---->
<View
android:id="@+id/exrate_divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/gray" />
<LinearLayout
android:id="@+id/exrate_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.swifttech.remit.android.common.customwidgets.GmeTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="@dimen/_8sdp"
android:text="@string/ex_rate_text"
android:textColor="@color/darkgray"
android:textSize="@dimen/_11ssp" />
<com.swifttech.remit.android.common.customwidgets.GmeTextView
android:id="@+id/exrate_fee"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="end"
android:padding="@dimen/_8sdp"
android:textColor="@color/darkgray"
android:textSize="@dimen/_11ssp"
app:txtfontName="@string/semibold" />
</LinearLayout>
<View
android:id="@+id/total_amount_divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/gray" />
</LinearLayout>
<com.swifttech.remit.android.common.customwidgets.GmeButton
style="@style/MButton"
android:visibility="visible"
android:id="@+id/btn_submit"
android:layout_gravity="center"
android:layout_marginBottom="30dp"
android:layout_marginTop="20dp"
android:background="@drawable/ic_rounded_background_red_coloured"
android:text="@string/redeem_text"
android:textAllCaps="false"
android:textColor="@color/white"
android:enabled="true"
android:textSize="16sp" />
</LinearLayout>
</ScrollView>

57
app/src/main/res/layout/fragment_otp_request.xml

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
style="@style/MFormBound"
android:orientation="vertical"
>
<com.swifttech.remit.android.common.customwidgets.GmeTextView
style="@style/MFormTitleTextView"
android:text="Verify Your Mobile Number"
/>
<com.swifttech.remit.android.common.customwidgets.GmeTextView
android:layout_marginTop="@dimen/_5sdp"
android:layout_marginBottom="@dimen/_10sdp"
style="@style/MFormTitleDescriptionTextView"
android:text="Please provide us your mobile number to verify and proceed for registration"
/>
<com.swifttech.remit.android.common.view.MTextInputLayout
android:id="@+id/mobile_TxtInputLayout"
app:errorEnabled="true"
style="@style/MTextInputLayoutForm"
app:endIconMode="clear_text"
android:hint="@string/mobile_number_text"
app:startIconDrawable="@drawable/vd_phone"
>
<com.swifttech.remit.android.common.view.MTextInputEditText
android:id="@+id/mobile_edTxt"
style="@style/MTextInputEditText"
android:inputType="phone"
android:imeOptions="actionDone"
/>
</com.swifttech.remit.android.common.view.MTextInputLayout>
<com.swifttech.remit.android.common.customwidgets.GmeButton
android:id="@+id/btn_submit"
style="@style/MButton"
android:layout_gravity="center"
android:layout_marginBottom="4dp"
android:layout_marginTop="30dp"
android:text="@string/proceed_text"
/>
</LinearLayout>
</LinearLayout>

52
app/src/main/res/layout/fragment_otp_verify.xml

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
style="@style/MFormBound"
android:orientation="vertical"
>
<com.swifttech.remit.android.common.customwidgets.GmeTextView
style="@style/MFormTitleTextView"
android:text="Complete your mobile verification"
/>
<com.swifttech.remit.android.common.customwidgets.GmeTextView
android:layout_marginTop="@dimen/_5sdp"
android:layout_marginBottom="@dimen/_10sdp"
style="@style/MFormTitleDescriptionTextView"
android:text="Please enter the 6-digit OTP code send to your mobile number"
/>
<com.mukesh.OtpView
style="@style/OtpWidget.OtpView"
android:layout_marginTop="@dimen/_10sdp"
android:layout_gravity="center"
android:id="@+id/otp_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="number"
android:textColor="@color/darkgray"
app:itemCount="5"
app:lineColor="@color/colorPrimary"
app:viewType="line"
/>
<com.swifttech.remit.android.common.customwidgets.GmeButton
android:id="@+id/btn_submit"
style="@style/MButton"
android:layout_gravity="center"
android:layout_marginBottom="4dp"
android:layout_marginTop="30dp"
android:text="@string/confirm_text"
/>
</LinearLayout>
</LinearLayout>

55
app/src/main/res/layout/fragment_search_cash_pickup_txn.xml

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/nestedScrollView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/background_gray"
android:clickable="true"
android:scrollbars="none">
<LinearLayout
android:id="@+id/rootView"
style="@style/MFormBoundWithCornerRadius"
android:orientation="vertical"
>
<com.swifttech.remit.android.common.customwidgets.GmeTextView
android:layout_marginTop="@dimen/_5sdp"
android:layout_marginBottom="@dimen/_10sdp"
style="@style/MFormTitleDescriptionTextView"
android:text="Please enter the Control No that you received inorder to redeem the amount into your wallet"
/>
<com.swifttech.remit.android.common.view.MTextInputLayout
android:id="@+id/controlNo_TxtInputLayout"
app:errorEnabled="true"
style="@style/MTextInputLayoutForm"
app:endIconMode="clear_text"
android:hint="@string/control_no_text"
>
<com.swifttech.remit.android.common.view.MTextInputEditText
android:id="@+id/controlNo_edTxt"
style="@style/MTextInputEditText"
android:inputType="phone"
android:imeOptions="actionDone"
/>
</com.swifttech.remit.android.common.view.MTextInputLayout>
<com.swifttech.remit.android.common.customwidgets.GmeButton
android:id="@+id/search_btn"
style="@style/MButton"
android:layout_gravity="center"
android:layout_marginTop="20dp"
android:layout_marginBottom="20dp"
android:text="@string/search_text"
/>
</LinearLayout>
</androidx.core.widget.NestedScrollView>

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

@ -193,7 +193,7 @@
<string name="paying_amount_text">Paying Amount</string>
<string name="exchange_rate_text">Exchange Rate</string>
<string name="service_charge_text">Service Charge</string>
<string name="payout_agent_text">Payout Agent/Bank</string>
<string name="payout_agent_text">Payout Agent</string>
<string name="i_have_read_to_text">I have read and agreed to</string>
<string name="gme_user_aggreement_text">1. Fast Remit Remittance User Agreement</string>
<string name="agree_and_send_text">Agree and Send</string>

Loading…
Cancel
Save