Browse Source

configure trusdock

new_design
Mukesh Dhungana 2 years ago
parent
commit
2dc85fdb98
  1. 2
      .idea/compiler.xml
  2. 48
      app/build.gradle
  3. 33
      app/src/main/AndroidManifest.xml
  4. 2
      app/src/main/java/com/remit/jmecustomer/features/home/HomeParentViewContractV2.java
  5. 12
      app/src/main/java/com/remit/jmecustomer/features/home/view/HomeActivityV2.java
  6. 5
      app/src/main/java/com/remit/jmecustomer/features/home/view/HomeFragmentV2.java
  7. 12
      app/src/main/java/com/remit/jmecustomer/features/sendmoney/model/RewardsPointDTO.java
  8. 2
      app/src/main/java/com/remit/jmecustomer/features/sendmoney/view/amountdetail/AmountDetailSendMoneyFragment.java
  9. 177
      app/src/main/java/com/remit/jmecustomer/features/trustdock/view/TrustDockActivity.java
  10. 2
      app/src/main/java/com/remit/jmecustomer/utils/https/HttpClientV2.java
  11. 6
      app/src/main/res/drawable/circular_blue_border.xml
  12. 6
      app/src/main/res/drawable/circular_red_border.xml
  13. 9
      app/src/main/res/layout/activity_home_v2.xml
  14. 107
      app/src/main/res/layout/activity_trustdock.xml
  15. 1
      app/src/main/res/values/colors.xml
  16. 2
      build.gradle

2
.idea/compiler.xml

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="CompilerConfiguration"> <component name="CompilerConfiguration">
<bytecodeTargetLevel target="1.8" />
<bytecodeTargetLevel target="11" />
</component> </component>
</project> </project>

48
app/build.gradle

@ -8,12 +8,12 @@ apply plugin: 'com.google.firebase.crashlytics'
android { android {
compileSdkVersion 30
compileSdkVersion 31
defaultConfig { defaultConfig {
applicationId "com.remit.jmecustomer" applicationId "com.remit.jmecustomer"
minSdkVersion 19
targetSdkVersion 30
versionCode 9
minSdkVersion 24
targetSdkVersion 31
versionCode 10
versionName "0.8" versionName "0.8"
multiDexEnabled true multiDexEnabled true
vectorDrawables.useSupportLibrary = true vectorDrawables.useSupportLibrary = true
@ -25,6 +25,24 @@ android {
} }
packagingOptions { packagingOptions {
exclude 'META-INF/rxjava.properties' exclude 'META-INF/rxjava.properties'
exclude 'lib/x86_64/libopencv_java4.so'
exclude 'lib/x86_64/libtess.so'
exclude 'lib/x86_64/libc++_shared.so'
exclude 'lib/x86_64/libface_detector_v2_jni.so'
exclude 'lib/x86/libopencv_java4.so'
exclude 'lib/x86/libface_detector_v2_jni.so'
exclude 'lib/x86/libtess.so'
exclude 'lib/x86/libc++_shared.so'
exclude 'lib/arm64-v8a/libopencv_java4.so'
exclude 'lib/arm64-v8a/libface_detector_v2_jni.so'
exclude 'lib/arm64-v8a/libtess.so'
exclude 'lib/arm64-v8a/libc++_shared.so'
exclude 'lib/armeabi-v7a/libopencv_java4.so'
exclude 'lib/armeabi-v7a/libface_detector_v2_jni.so'
exclude 'lib/armeabi-v7a/libtess.so'
exclude 'lib/armeabi-v7a/libc++_shared.so'
// exclude 'assets/models/fssd_100_8bit_gray_v1.tflite'
// exclude 'assets/models/fssd_100_8bit_v1.tflite'
} }
buildFeatures { buildFeatures {
@ -57,7 +75,7 @@ android {
debuggable false debuggable false
minifyEnabled true minifyEnabled true
shrinkResources true shrinkResources true
useProguard true // obfuscate
// obfuscate
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
//proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' //proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release signingConfig signingConfigs.release
@ -110,6 +128,7 @@ android {
debuggable true debuggable true
minifyEnabled false minifyEnabled false
shrinkResources false shrinkResources false
//proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.txt'
} }
} }
compileOptions { compileOptions {
@ -125,6 +144,9 @@ android {
enableSplit = false enableSplit = false
} }
} }
dataBinding {
enabled = true
}
} }
@ -146,6 +168,7 @@ dependencies {
implementation 'com.github.bumptech.glide:glide:4.9.0' implementation 'com.github.bumptech.glide:glide:4.9.0'
implementation 'de.hdodenhof:circleimageview:2.2.0' implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.jakewharton:butterknife:10.2.3' implementation 'com.jakewharton:butterknife:10.2.3'
implementation 'com.android.volley:volley:1.2.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.3' annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.3'
implementation 'id.zelory:compressor:2.1.0' implementation 'id.zelory:compressor:2.1.0'
@ -194,6 +217,8 @@ dependencies {
implementation 'androidx.biometric:biometric:1.1.0' implementation 'androidx.biometric:biometric:1.1.0'
implementation 'io.trustdock.sdk:verification-sandbox:2.6.7'
@ -202,3 +227,16 @@ dependencies {
debugImplementation 'com.ashokvarma.android:gander-imdb:3.1.0' debugImplementation 'com.ashokvarma.android:gander-imdb:3.1.0'
releaseImplementation 'com.ashokvarma.android:gander-no-op:3.1.0' releaseImplementation 'com.ashokvarma.android:gander-no-op:3.1.0'
} }
allprojects {
repositories {
maven {
url "https://native-app-sdk-repository.test.trustdock.io/android/release/content/repositories"
credentials {
username = "japanremit-1039"
password = "sHRf5Sf7S3r5Q4Hz"
}
}
maven { url 'https://raw.githubusercontent.com/iProov/android/master/maven/' }
}
}

33
app/src/main/AndroidManifest.xml

@ -13,6 +13,7 @@
<uses-permission android:name="android.permission.VIBRATE" /> <uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.USE_BIOMETRIC" /> <uses-permission android:name="android.permission.USE_BIOMETRIC" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<application <application
@ -28,7 +29,8 @@
android:theme="@style/AppTheme" android:theme="@style/AppTheme"
android:usesCleartextTraffic="true" android:usesCleartextTraffic="true"
tools:ignore="GoogleAppIndexingWarning,HardcodedDebugMode" tools:ignore="GoogleAppIndexingWarning,HardcodedDebugMode"
tools:replace="android:allowBackup,android:supportsRtl">
tools:replace="android:allowBackup,android:supportsRtl"
>
<meta-data <meta-data
@ -42,7 +44,8 @@
android:name="com.remit.jmecustomer.features.renewId.view.RenewIdActivity" android:name="com.remit.jmecustomer.features.renewId.view.RenewIdActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar" android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden">
android:windowSoftInputMode="stateAlwaysHidden"
android:exported="false">
<intent-filter> <intent-filter>
<action android:name="OPEN_ACTIVITY_RENEW_ID" /> <action android:name="OPEN_ACTIVITY_RENEW_ID" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
@ -73,11 +76,17 @@
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar" android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" /> android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="com.remit.jmecustomer.features.trustdock.view.TrustDockActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity <activity
android:name="com.remit.jmecustomer.features.notice.view.NoticeActivity" android:name="com.remit.jmecustomer.features.notice.view.NoticeActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar" android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden">
android:windowSoftInputMode="stateAlwaysHidden"
android:exported="false">
<intent-filter> <intent-filter>
<action android:name="OPEN_ACTIVITY_NOTICE" /> <action android:name="OPEN_ACTIVITY_NOTICE" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
@ -179,7 +188,8 @@
android:name="com.remit.jmecustomer.features.splashscreen.view.SplashScreen" android:name="com.remit.jmecustomer.features.splashscreen.view.SplashScreen"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/AppTheme.Launcher" android:theme="@style/AppTheme.Launcher"
android:windowSoftInputMode="adjustResize|stateAlwaysHidden">
android:windowSoftInputMode="adjustResize|stateAlwaysHidden"
android:exported="true">
<intent-filter> <intent-filter>
@ -216,7 +226,8 @@
android:name="com.remit.jmecustomer.features.sendmoney.view.SendMoneyV2Activity" android:name="com.remit.jmecustomer.features.sendmoney.view.SendMoneyV2Activity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar" android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden">
android:windowSoftInputMode="stateAlwaysHidden"
android:exported="false">
<intent-filter> <intent-filter>
<action android:name="OPEN_ACTIVITY_SENDMONEY" /> <action android:name="OPEN_ACTIVITY_SENDMONEY" />
@ -255,7 +266,8 @@
android:name="com.remit.jmecustomer.features.home.view.HomeActivityV2" android:name="com.remit.jmecustomer.features.home.view.HomeActivityV2"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar" android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden">
android:windowSoftInputMode="stateAlwaysHidden"
android:exported="false">
<intent-filter> <intent-filter>
<action android:name="OPEN_ACTIVITY_DASHBOARD" /> <action android:name="OPEN_ACTIVITY_DASHBOARD" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
@ -298,7 +310,8 @@
android:name="com.remit.jmecustomer.features.registerv2.newcustomer.view.NewRegisterV2Activity" android:name="com.remit.jmecustomer.features.registerv2.newcustomer.view.NewRegisterV2Activity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar" android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden">
android:windowSoftInputMode="stateAlwaysHidden"
android:exported="true">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW" />
@ -325,7 +338,8 @@
android:name="com.remit.jmecustomer.features.depositinfo.view.DepositInfo" android:name="com.remit.jmecustomer.features.depositinfo.view.DepositInfo"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar" android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden">
android:windowSoftInputMode="stateAlwaysHidden"
android:exported="false">
<intent-filter> <intent-filter>
<action android:name="OPEN_ACTIVITY_HOW_TO_DEPOSIT" /> <action android:name="OPEN_ACTIVITY_HOW_TO_DEPOSIT" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
@ -335,7 +349,8 @@
android:name="com.remit.jmecustomer.features.mynotifications.view.MyNotificationActivity" android:name="com.remit.jmecustomer.features.mynotifications.view.MyNotificationActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar" android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden">
android:windowSoftInputMode="stateAlwaysHidden"
android:exported="false">
<intent-filter> <intent-filter>
<action android:name="OPEN_ACTIVITY_NOTIFICATION" /> <action android:name="OPEN_ACTIVITY_NOTIFICATION" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />

2
app/src/main/java/com/remit/jmecustomer/features/home/HomeParentViewContractV2.java

@ -38,4 +38,6 @@ public interface HomeParentViewContractV2 {
void showBankDeposit(); void showBankDeposit();
void showCashPickupRedeem(); void showCashPickupRedeem();
void showTrustDock();
} }

12
app/src/main/java/com/remit/jmecustomer/features/home/view/HomeActivityV2.java

@ -55,6 +55,7 @@ import com.remit.jmecustomer.features.sendmoney.view.verification.TermsAndCondit
import com.remit.jmecustomer.features.settings.view.FingerprintEnablePromptActivity; import com.remit.jmecustomer.features.settings.view.FingerprintEnablePromptActivity;
import com.remit.jmecustomer.features.settings.view.SettingsView; import com.remit.jmecustomer.features.settings.view.SettingsView;
import com.remit.jmecustomer.features.transactionhistory.view.RemitTransactionHistoryActivity; import com.remit.jmecustomer.features.transactionhistory.view.RemitTransactionHistoryActivity;
import com.remit.jmecustomer.features.trustdock.view.TrustDockActivity;
import com.remit.jmecustomer.features.userprofile.view.ProfileActivity; import com.remit.jmecustomer.features.userprofile.view.ProfileActivity;
import com.remit.jmecustomer.features.walletstatement.view.WalletStatementV2Activity; import com.remit.jmecustomer.features.walletstatement.view.WalletStatementV2Activity;
import com.remit.jmecustomer.features.webbrowser.WebBrowserV2Activity; import com.remit.jmecustomer.features.webbrowser.WebBrowserV2Activity;
@ -467,6 +468,17 @@ public class HomeActivityV2 extends BaseActivity implements HomeParentViewContra
showPopUpMessage(unverifiedMessage, CustomAlertDialog.AlertType.ALERT, null); showPopUpMessage(unverifiedMessage, CustomAlertDialog.AlertType.ALERT, null);
} }
@Override
public void showTrustDock() {
if (isNotificaitonViewActive())
return;
String unverifiedMessage = viewModel.checkIfUserVerified();
if (unverifiedMessage == null)
startActivity(new Intent(getApplicationContext(), TrustDockActivity.class));
else
showPopUpMessage(unverifiedMessage, CustomAlertDialog.AlertType.ALERT, null);
}
@Override @Override
public void showAutoDebitListingView() { public void showAutoDebitListingView() {
} }

5
app/src/main/java/com/remit/jmecustomer/features/home/view/HomeFragmentV2.java

@ -173,6 +173,7 @@ public class HomeFragmentV2 extends BaseFragment implements
menuList.add(new MenuItem(getString(R.string.notice_text), R.drawable.icv_notice, 7)); menuList.add(new MenuItem(getString(R.string.notice_text), R.drawable.icv_notice, 7));
// menuList.add(new MenuItem(getString(R.string.recipient_text), R.drawable.icv_receipient, 8)); // menuList.add(new MenuItem(getString(R.string.recipient_text), R.drawable.icv_receipient, 8));
menuList.add(new MenuItem(getString(R.string.renewId_text), R.drawable.icv_renew_id, 9)); menuList.add(new MenuItem(getString(R.string.renewId_text), R.drawable.icv_renew_id, 9));
menuList.add(new MenuItem("TrustDock", R.drawable.icv_renew_id, 10));
return menuList; return menuList;
} }
@ -221,6 +222,10 @@ public class HomeFragmentV2 extends BaseFragment implements
parentViewContractV2.showRenewIdScreen(); parentViewContractV2.showRenewIdScreen();
break; break;
case 10:
parentViewContractV2.showTrustDock();
break;
} }
} }

12
app/src/main/java/com/remit/jmecustomer/features/sendmoney/model/RewardsPointDTO.java

@ -12,6 +12,10 @@ public class RewardsPointDTO {
@Expose @Expose
private String Point; private String Point;
@SerializedName("RewardMessage")
@Expose
private String RewardMessage;
public String getShowRewardPoint() { public String getShowRewardPoint() {
return ShowRewardPoint; return ShowRewardPoint;
} }
@ -27,4 +31,12 @@ public class RewardsPointDTO {
public void setPoint(String point) { public void setPoint(String point) {
this.Point = point; this.Point = point;
} }
public String getRewardMessage() {
return RewardMessage;
}
public void setRewardMessage(String rewardMessage) {
this.RewardMessage = rewardMessage;
}
} }

2
app/src/main/java/com/remit/jmecustomer/features/sendmoney/view/amountdetail/AmountDetailSendMoneyFragment.java

@ -590,7 +590,7 @@ public class AmountDetailSendMoneyFragment extends BaseFragment implements View.
if (rewardsPointDTO.getShowRewardPoint().equalsIgnoreCase("y")) { if (rewardsPointDTO.getShowRewardPoint().equalsIgnoreCase("y")) {
rewardsPointsContainer.setVisibility(View.VISIBLE); rewardsPointsContainer.setVisibility(View.VISIBLE);
//pointsAvailableText.setText("You have " + rewardsPointDTO.getPoint() + " reward points available"); //pointsAvailableText.setText("You have " + rewardsPointDTO.getPoint() + " reward points available");
pointsAvailableText.setText(rewardsPointDTO.getPoint());
pointsAvailableText.setText(rewardsPointDTO.getRewardMessage());
this.rewardPoint = rewardsPointDTO.getPoint(); this.rewardPoint = rewardsPointDTO.getPoint();
} }
} }

177
app/src/main/java/com/remit/jmecustomer/features/trustdock/view/TrustDockActivity.java

@ -0,0 +1,177 @@
package com.remit.jmecustomer.features.trustdock.view;
import android.content.Context;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import com.android.volley.AuthFailureError;
import com.android.volley.RequestQueue;
import com.android.volley.Request;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.JsonObjectRequest;
import com.android.volley.toolbox.StringRequest;
import com.android.volley.toolbox.Volley;
import com.remit.jmecustomer.R;
import com.remit.jmecustomer.base.BaseActivity;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.json.JSONArray;
import org.json.JSONObject;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import io.trustdock.sdk.TrustdockPlan;
import io.trustdock.sdk.TrustdockVerificationException;
import io.trustdock.sdk.TrustdockVerificationParams;
import io.trustdock.sdk.TrustdockVerificationSDK;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
public class TrustDockActivity extends BaseActivity {
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.setContentView(R.layout.activity_trustdock);
TrustdockVerificationSDK.Companion.init();
TrustdockVerificationSDK.Listener listener = new TrustdockVerificationSDK.Listener() {
public void onDocumentSubmitted() {
}
public void onCompleted() {
}
public void onCanceled(@NotNull TrustdockVerificationException e) {
Intrinsics.checkNotNullParameter(e, "e");
}
};
TrustdockVerificationSDK.Companion.registerListener((TrustdockVerificationSDK.Listener) listener);
String publicId = "c471d877-c4e4-4805-9332-7f6c3a1881d8";
String nativeAppSdkToken = "rbTme8F4whfAZBuSQcN5gUXr";
// List planPPA = CollectionsKt.listOf(new TrustdockPlan("5ba5a065-dac1-4509-a574-0d4deef19720", null, null));
// final TrustdockVerificationParams paramsPPA = new TrustdockVerificationParams(publicId, nativeAppSdkToken, planPPA);
//
// Button startButtonPPA = (Button) this.findViewById(R.id.startButtonPPA);
// startButtonPPA.setOnClickListener((View.OnClickListener) (new View.OnClickListener() {
// public final void onClick(View it) {
// TrustdockVerificationSDK.Companion.start((Context) getContext(), paramsPPA);
// }
// }));
// List planRC = CollectionsKt.listOf(new TrustdockPlan("b1da18ee-bean-42f0-b7f6-0d375e1f505d", (String) null, (List) null));
// final TrustdockVerificationParams paramsRC = new TrustdockVerificationParams(publicId, nativeAppSdkToken, planRC);
//
// Button startButtonRC = (Button) this.findViewById(R.id.startButtonRC);
// ;
// startButtonRC.setOnClickListener((View.OnClickListener) (new View.OnClickListener() {
// public final void onClick(View it) {
// TrustdockVerificationSDK.Companion.start((Context) getContext(), paramsRC);
// }
// }));
// List planDL = CollectionsKt.listOf(new TrustdockPlan[]{new TrustdockPlan("e103a0db-ae3c-4eda-8dcb-6fff06cdfcc9", (String) null, (List) null), new TrustdockPlan("ee46f7fd-3988-49cd-a972-1056e498302f", "e103a0db-ae3c-4eda-8dcb-6fff06cdfcc9", (List) null)});
// final TrustdockVerificationParams paramsDL = new TrustdockVerificationParams(publicId, nativeAppSdkToken, planDL);
//
// Button startButtonDL = (Button) this.findViewById(R.id.startButtonDL);
// startButtonDL.setOnClickListener((View.OnClickListener) (new View.OnClickListener() {
// public final void onClick(View it) {
// TrustdockVerificationSDK.Companion.start((Context) getContext(), paramsDL);
// }
// }));
// List planeKYC = CollectionsKt.listOf(new TrustdockPlan("ee46f7fd-3988-49cd-a972-1056e498302f", (String) null, (List) null));
// final TrustdockVerificationParams paramsKYC = new TrustdockVerificationParams(publicId, nativeAppSdkToken, planeKYC);
//
// Button startButtonEKYC = (Button) this.findViewById(R.id.startButtonEKYC);
// startButtonEKYC.setOnClickListener((View.OnClickListener) (new View.OnClickListener() {
// public final void onClick(View it) {
// TrustdockVerificationSDK.Companion.start((Context) getContext(), paramsKYC);
// }
// }));
// List planSelfie = CollectionsKt.listOf(new TrustdockPlan[]{new TrustdockPlan("e103a0db-ae3c-4eda-8dcb-6fff06cdfcc9", (String) null, (List) null), new TrustdockPlan("ee46f7fd-3988-49cd-a972-1056e498302f", "e103a0db-ae3c-4eda-8dcb-6fff06cdfcc9", (List) null)});
// final TrustdockVerificationParams paramsSelfie = new TrustdockVerificationParams(publicId, nativeAppSdkToken, planSelfie);
//
// Button startButtonSelfie = (Button) this.findViewById(R.id.startButtonSelfie);
// startButtonSelfie.setOnClickListener((View.OnClickListener) (new View.OnClickListener() {
// public final void onClick(View it) {
// TrustdockVerificationSDK.Companion.start((Context) getContext(), paramsSelfie);
// }
// }));
List planSelfie2 = CollectionsKt.listOf(new TrustdockPlan[]{new TrustdockPlan("b1da18ee-fabe-42f0-b7f6-0d375e1f505d", (String) null, (List) null), new TrustdockPlan("ee46f7fd-3988-49cd-a972-1056e498302f", "b1da18ee-fabe-42f0-b7f6-0d375e1f505d", (List) null)});
final TrustdockVerificationParams paramsSelfie2 = new TrustdockVerificationParams(publicId, nativeAppSdkToken, planSelfie2);
Button startButtonSelfie2 = (Button) this.findViewById(R.id.startButtonSelfie2);
startButtonSelfie2.setOnClickListener((View.OnClickListener) (new View.OnClickListener() {
public final void onClick(View it) {
//TrustdockVerificationSDK.Companion.start((Context) getContext(), paramsSelfie2);
requestWithSomeHttpHeaders(planSelfie2);
}
}));
List planE = CollectionsKt.listOf(new TrustdockPlan("f8d1f271-7c95-43bf-bdf8-f84ebe96671d", (String) null, (List) null));
final TrustdockVerificationParams paramsE = new TrustdockVerificationParams(publicId, nativeAppSdkToken, planE);
Button startButtonE = (Button) this.findViewById(R.id.startButtonE);
startButtonE.setOnClickListener((View.OnClickListener) (new View.OnClickListener() {
public final void onClick(View it) {
//TrustdockVerificationSDK.Companion.start((Context) getContext(), paramsE);
requestWithSomeHttpHeaders(planE);
}
}));
}
protected void onDestroy() {
TrustdockVerificationSDK.Companion.unregisterListener();
super.onDestroy();
}
public void requestWithSomeHttpHeaders(List<TrustdockPlan> plan) {
RequestQueue queue = Volley.newRequestQueue(this);
String url = "https://api.test.trustdock.io/v2/verifications?Authorization=rbTme8F4whfAZBuSQcN5gUXr";
JsonObjectRequest getRequest = new JsonObjectRequest(Request.Method.POST, url,null,
new Response.Listener<JSONObject>()
{
@Override
public void onResponse(JSONObject response) {
try {
String publicKey = response.getString("public_id");
//setupPlans()
String nativeAppSdkToken = "rbTme8F4whfAZBuSQcN5gUXr";
TrustdockVerificationParams param = new TrustdockVerificationParams(
publicKey,
nativeAppSdkToken,
plan
);
TrustdockVerificationSDK.Companion.start((Context) getContext(), param);
} catch (Exception ex) {
Log.d("ERROR","error => "+ex.toString());
}
}
},
new Response.ErrorListener()
{
@Override
public void onErrorResponse(VolleyError error) {
// TODO Auto-generated method stub
Log.d("ERROR","error => "+error.toString());
}
}
) {
@Override
public Map<String, String> getHeaders() throws AuthFailureError {
Map<String, String> params = new HashMap<String, String>();
params.put("Authorization", "Bearer SC5ra2f1GDqMaAVZX289bpuH");
return params;
}
};
queue.add(getRequest);
}
}

2
app/src/main/java/com/remit/jmecustomer/utils/https/HttpClientV2.java

@ -54,7 +54,7 @@ public class HttpClientV2 {
if (BuildConfig.DEBUG) { if (BuildConfig.DEBUG) {
HttpLoggingInterceptor.Logger fileLogger = s -> { HttpLoggingInterceptor.Logger fileLogger = s -> {
Platform.get().log(INFO, s, null);
//Platform.get().log(INFO, s, null);
}; };
HttpLoggingInterceptor logging = new HttpLoggingInterceptor(fileLogger); HttpLoggingInterceptor logging = new HttpLoggingInterceptor(fileLogger);
logging.setLevel(HttpLoggingInterceptor.Level.BODY); logging.setLevel(HttpLoggingInterceptor.Level.BODY);

6
app/src/main/res/drawable/circular_blue_border.xml

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<size android:width="40dp" android:height="40dp"/>
<stroke android:width="1dp" android:color="#0C2169" />
</shape>

6
app/src/main/res/drawable/circular_red_border.xml

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<size android:width="40dp" android:height="40dp"/>
<stroke android:width="1dp" android:color="@color/colorAccent" />
</shape>

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

@ -59,13 +59,14 @@
android:layout_width="@dimen/_15sdp" android:layout_width="@dimen/_15sdp"
android:layout_height="@dimen/_15sdp" android:layout_height="@dimen/_15sdp"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginLeft="@dimen/_15sdp"
android:layout_marginTop="3dp"
android:background="@drawable/circular_white_bg"
android:layout_marginLeft="@dimen/_13sdp"
android:layout_marginTop="4dp"
android:background="@drawable/circular_blue_border"
android:gravity="center" android:gravity="center"
android:textColor="@color/colorAccent" android:textColor="@color/colorAccent"
android:textSize="@dimen/_10ssp" android:textSize="@dimen/_10ssp"
android:visibility="visible" />
android:visibility="visible"
app:txtfontName="@string/semibold" />
</RelativeLayout> </RelativeLayout>
<ImageView <ImageView

107
app/src/main/res/layout/activity_trustdock.xml

@ -0,0 +1,107 @@
<?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">
<!-- <Button-->
<!-- android:id="@+id/startButtonPPA"-->
<!-- android:layout_width="145dp"-->
<!-- android:layout_height="50dp"-->
<!-- android:layout_marginStart="132dp"-->
<!-- android:layout_marginTop="4dp"-->
<!-- android:layout_marginEnd="8dp"-->
<!-- android:text="Start PPA"-->
<!-- app:layout_constraintStart_toStartOf="parent"-->
<!-- app:layout_constraintTop_toTopOf="parent" />-->
<!-- <Button-->
<!-- android:id="@+id/startButtonRC"-->
<!-- android:layout_width="279dp"-->
<!-- android:layout_height="59dp"-->
<!-- android:text="Start Residence Card Auth"-->
<!-- app:layout_constraintBottom_toTopOf="@+id/startButtonSelfie"-->
<!-- app:layout_constraintEnd_toEndOf="parent"-->
<!-- app:layout_constraintHorizontal_bias="0.449"-->
<!-- app:layout_constraintStart_toStartOf="parent"-->
<!-- app:layout_constraintTop_toBottomOf="@+id/startButtonDL"-->
<!-- app:layout_constraintVertical_bias="0.444" />-->
<!-- <Button-->
<!-- android:id="@+id/startButtonEKYC"-->
<!-- android:layout_width="248dp"-->
<!-- android:layout_height="56dp"-->
<!-- android:layout_marginStart="8dp"-->
<!-- android:layout_marginTop="68dp"-->
<!-- android:layout_marginEnd="8dp"-->
<!-- android:text="Start eKYC"-->
<!-- app:layout_constraintBottom_toTopOf="@+id/startButtonSelfie2"-->
<!-- app:layout_constraintEnd_toEndOf="parent"-->
<!-- app:layout_constraintHorizontal_bias="0.555"-->
<!-- app:layout_constraintStart_toStartOf="parent"-->
<!-- app:layout_constraintTop_toBottomOf="@+id/startButtonSelfie"-->
<!-- app:layout_constraintVertical_bias="0.357" />-->
<!-- <Button-->
<!-- android:id="@+id/startButtonDL"-->
<!-- android:layout_width="372dp"-->
<!-- android:layout_height="91dp"-->
<!-- android:layout_marginStart="8dp"-->
<!-- android:layout_marginTop="32dp"-->
<!-- android:layout_marginEnd="8dp"-->
<!-- android:text="Criminal Proceeds Transfer Prevention Law: To_SDK (driver's license)"-->
<!-- app:layout_constraintBottom_toTopOf="@+id/startButtonSelfie"-->
<!-- app:layout_constraintEnd_toEndOf="parent"-->
<!-- app:layout_constraintHorizontal_bias="0.482"-->
<!-- app:layout_constraintStart_toStartOf="parent"-->
<!-- app:layout_constraintTop_toTopOf="parent"-->
<!-- app:layout_constraintVertical_bias="0.261" />-->
<!-- <Button-->
<!-- android:id="@+id/startButtonSelfie"-->
<!-- android:layout_width="248dp"-->
<!-- android:layout_height="56dp"-->
<!-- android:layout_marginStart="8dp"-->
<!-- android:layout_marginEnd="8dp"-->
<!-- android:layout_marginBottom="180dp"-->
<!-- android:text="Start Selfie Auth"-->
<!-- app:layout_constraintBottom_toTopOf="@+id/startButtonSelfie2"-->
<!-- app:layout_constraintEnd_toEndOf="parent"-->
<!-- app:layout_constraintHorizontal_bias="0.496"-->
<!-- app:layout_constraintStart_toStartOf="parent"-->
<!-- app:layout_constraintTop_toBottomOf="@+id/startButtonPPA"-->
<!-- app:layout_constraintVertical_bias="1.0" />-->
<Button
android:id="@+id/startButtonSelfie2"
android:layout_width="371dp"
android:layout_height="96dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:text="Residence Card / Special Permanent Resident Certificate)"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/startButtonE"
android:layout_width="293dp"
android:layout_height="49dp"
android:layout_marginStart="8dp"
android:layout_marginTop="95dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:text="Start Criminal Law E Auth"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.401"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/startButtonSelfie2"
app:layout_constraintVertical_bias="0.132" />
</androidx.constraintlayout.widget.ConstraintLayout>

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

@ -62,4 +62,5 @@
<color name="success">#06c11f</color> <color name="success">#06c11f</color>
<color name="error">#A41313</color> <color name="error">#A41313</color>
<color name="tex_field_bg_color">#f7f8fa</color> <color name="tex_field_bg_color">#f7f8fa</color>
<color name="bell_blue">#0074cc</color>
</resources> </resources>

2
build.gradle

@ -9,7 +9,7 @@ buildscript {
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath 'com.android.tools.build:gradle:7.0.2'
classpath 'com.google.gms:google-services:4.3.10' classpath 'com.google.gms:google-services:4.3.10'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1' classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong

Loading…
Cancel
Save