Browse Source

KYC photo adding done

master
preyearegmi 6 years ago
parent
commit
dfa159f904
  1. 152
      app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV2/presenter/KYCV2Presenter.java
  2. 19
      app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV2/presenter/KYCV2PresenterInterface.java
  3. 2
      app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV2/view/KYCFormV2Activity.java
  4. 323
      app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV2/view/view3/KYCView3Fragment.java

152
app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV2/presenter/KYCV2Presenter.java

@ -1,5 +1,7 @@
package com.gmeremit.online.gmeremittance_native.kycV2.presenter; package com.gmeremit.online.gmeremittance_native.kycV2.presenter;
import android.graphics.Bitmap;
import com.gmeremit.online.gmeremittance_native.base.BasePresenter; import com.gmeremit.online.gmeremittance_native.base.BasePresenter;
import com.gmeremit.online.gmeremittance_native.customwidgets.CustomAlertDialog; import com.gmeremit.online.gmeremittance_native.customwidgets.CustomAlertDialog;
import com.gmeremit.online.gmeremittance_native.kycV2.gateway.KYCV2Gateway; import com.gmeremit.online.gmeremittance_native.kycV2.gateway.KYCV2Gateway;
@ -7,9 +9,12 @@ import com.gmeremit.online.gmeremittance_native.kycV2.model.KYCRelatedDataModel;
import com.gmeremit.online.gmeremittance_native.kycV2.model.KYCRelatedDataResponse; import com.gmeremit.online.gmeremittance_native.kycV2.model.KYCRelatedDataResponse;
import com.gmeremit.online.gmeremittance_native.kycV2.view.view1.KYCView1VModel; import com.gmeremit.online.gmeremittance_native.kycV2.view.view1.KYCView1VModel;
import com.gmeremit.online.gmeremittance_native.kycV2.view.view2.KYCView2VModel; import com.gmeremit.online.gmeremittance_native.kycV2.view.view2.KYCView2VModel;
import com.gmeremit.online.gmeremittance_native.kycV2.view.view3.KYCView3Fragment;
import com.gmeremit.online.gmeremittance_native.kycV2.view.view3.KYCView3VModel; import com.gmeremit.online.gmeremittance_native.kycV2.view.view3.KYCView3VModel;
import com.gmeremit.online.gmeremittance_native.utils.Constants; import com.gmeremit.online.gmeremittance_native.utils.Constants;
import com.gmeremit.online.gmeremittance_native.utils.https.GenericApiObserverResponse; import com.gmeremit.online.gmeremittance_native.utils.https.GenericApiObserverResponse;
import com.zxy.tiny.Tiny;
import com.zxy.tiny.callback.BitmapCallback;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
@ -17,6 +22,8 @@ import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.CompositeDisposable; import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.schedulers.Schedulers; import io.reactivex.schedulers.Schedulers;
import static android.app.Activity.RESULT_OK;
public class KYCV2Presenter extends BasePresenter implements KYCV2PresenterInterface, KYCV2InteractorInterface { public class KYCV2Presenter extends BasePresenter implements KYCV2PresenterInterface, KYCV2InteractorInterface {
@ -46,6 +53,151 @@ public class KYCV2Presenter extends BasePresenter implements KYCV2PresenterInter
return true; return true;
} }
@Override
public void checkImageStatus(int requestCode, int resultCode, Bitmap data) {
if(data==null) {
view.showToastMessage("No image available");
return;
}
Tiny.BitmapCompressOptions options = new Tiny.BitmapCompressOptions();
switch (requestCode) {
case KYCView3Fragment.FRONT_REGID_CAMERA:
if (resultCode == RESULT_OK) {
Tiny.getInstance().source(data).asBitmap().withOptions(options).compress(new BitmapCallback() {
@Override
public void callback(boolean isSuccess, Bitmap bitmap, Throwable t) {
if (isSuccess){
view.getView3Contract().setFrontImage(bitmap);
}
}
});
break;
}
case KYCView3Fragment.FRONT_REGID_GALLERY:
if (resultCode == RESULT_OK) {
Tiny.getInstance().source(data).asBitmap().withOptions(options).compress(new BitmapCallback() {
@Override
public void callback(boolean isSuccess, Bitmap bitmap, Throwable t) {
if (isSuccess){
view.getView3Contract().setFrontImage(bitmap);
}
}
});
break;
}
case KYCView3Fragment.BACK_REGID_CAMERA:
if (resultCode == RESULT_OK) {
Tiny.getInstance().source(data).asBitmap().withOptions(options).compress(new BitmapCallback() {
@Override
public void callback(boolean isSuccess, Bitmap bitmap, Throwable t) {
//return the compressed bitmap object
if (isSuccess){
view.getView3Contract().setBackImage(bitmap);
}
}
});
break;
}
case KYCView3Fragment.BACK_REGID_GALLERY:
if (resultCode == RESULT_OK) {
Tiny.getInstance().source(data).asBitmap().withOptions(options).compress(new BitmapCallback() {
@Override
public void callback(boolean isSuccess, Bitmap bitmap, Throwable t) {
//return the compressed bitmap object
if (isSuccess){
view.getView3Contract().setBackImage(bitmap);
}
}
});
break;
}
case KYCView3Fragment.PASSBOOKREQ_CAMERA:
if (resultCode == RESULT_OK) {
Tiny.getInstance().source(data).asBitmap().withOptions(options).compress(new BitmapCallback() {
@Override
public void callback(boolean isSuccess, Bitmap bitmap, Throwable t) {
//return the compressed bitmap object
if (isSuccess){
view.getView3Contract().setPassbookImage(bitmap);
}
}
});
break;
}
case KYCView3Fragment.PASSBOOKREQ_GALLERY:
if (resultCode == RESULT_OK) {
Tiny.getInstance().source(data).asBitmap().withOptions(options).compress(new BitmapCallback() {
@Override
public void callback(boolean isSuccess, Bitmap bitmap, Throwable t) {
//return the compressed bitmap object
if (isSuccess){
view.getView3Contract().setPassbookImage(bitmap);
}
}
});
break;
}
case KYCView3Fragment.PASSPORTREQ_CAMERA:
if (resultCode == RESULT_OK) {
Tiny.getInstance().source(data).asBitmap().withOptions(options).compress(new BitmapCallback() {
@Override
public void callback(boolean isSuccess, Bitmap bitmap, Throwable t) {
//return the compressed bitmap object
if (isSuccess){
view.getView3Contract().setPassportImage(bitmap);
}
}
});
break;
}
case KYCView3Fragment.PASSPORTREQ_GALLERY:
if (resultCode == RESULT_OK) {
Tiny.getInstance().source(data).asBitmap().withOptions(options).compress(new BitmapCallback() {
@Override
public void callback(boolean isSuccess, Bitmap bitmap, Throwable t) {
//return the compressed bitmap object
if (isSuccess){
view.getView3Contract().setPassportImage(bitmap);
}
}
});
break;
}
case KYCView3Fragment.SELFIE_REGID_CAMERA:
if (resultCode == RESULT_OK) {
Tiny.getInstance().source(data).asBitmap().withOptions(options).compress(new BitmapCallback() {
@Override
public void callback(boolean isSuccess, Bitmap bitmap, Throwable t) {
if (isSuccess){
view.getView3Contract().setSelfieImage(bitmap);
}
}
});
break;
}
case KYCView3Fragment.SELFIE_REGID_GALLERY:
if (resultCode == RESULT_OK) {
Tiny.getInstance().source(data).asBitmap().withOptions(options).compress(new BitmapCallback() {
@Override
public void callback(boolean isSuccess, Bitmap bitmap, Throwable t) {
if (isSuccess){
view.getView3Contract().setSelfieImage(bitmap);
}
}
});
break;
}
}
}
@Override @Override
public void prepareToSendData() { public void prepareToSendData() {

19
app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV2/presenter/KYCV2PresenterInterface.java

@ -1,5 +1,8 @@
package com.gmeremit.online.gmeremittance_native.kycV2.presenter; package com.gmeremit.online.gmeremittance_native.kycV2.presenter;
import android.content.Intent;
import android.graphics.Bitmap;
import com.gmeremit.online.gmeremittance_native.base.BaseContractInterface; import com.gmeremit.online.gmeremittance_native.base.BaseContractInterface;
import com.gmeremit.online.gmeremittance_native.base.BasePresenterInterface; import com.gmeremit.online.gmeremittance_native.base.BasePresenterInterface;
import com.gmeremit.online.gmeremittance_native.kycV2.model.Bank; import com.gmeremit.online.gmeremittance_native.kycV2.model.Bank;
@ -29,6 +32,8 @@ public interface KYCV2PresenterInterface extends BasePresenterInterface {
boolean validateKYCView2(KYCView2VModel data); boolean validateKYCView2(KYCView2VModel data);
boolean validateKYCView3(KYCView3VModel data); boolean validateKYCView3(KYCView3VModel data);
void checkImageStatus(int requestCode, int resultCode, Bitmap data);
/** /**
* This method must gather data from all views, then validated and finally pushed to server * This method must gather data from all views, then validated and finally pushed to server
* So call this method from the last form and subscribe to fetch data from the corresponding form views * So call this method from the last form and subscribe to fetch data from the corresponding form views
@ -101,9 +106,10 @@ public interface KYCV2PresenterInterface extends BasePresenterInterface {
void setErrorOnSourceOfFund(String message); void setErrorOnSourceOfFund(String message);
void setKycRelatedData(List<Bank> bank, List<IdType> idType, List<SourceOfFund> sourceOfFund); void setKycRelatedData(List<Bank> bank, List<IdType> idType, List<SourceOfFund> sourceOfFund);
}
}
/** /**
* Third KYC Form Contract * Third KYC Form Contract
@ -111,6 +117,17 @@ public interface KYCV2PresenterInterface extends BasePresenterInterface {
interface KYCView3ContractInterface interface KYCView3ContractInterface
{ {
Observable<KYCView3VModel> getView3RelatedData(); Observable<KYCView3VModel> getView3RelatedData();
void setFrontImage(Bitmap bitmap);
void setBackImage(Bitmap bitmap);
void setPassbookImage(Bitmap bitmap);
void setPassportImage(Bitmap bitmap);
void setSelfieImage(Bitmap bitmap);
} }
} }

2
app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV2/view/KYCFormV2Activity.java

@ -156,7 +156,7 @@ public class KYCFormV2Activity extends BaseActivity implements KYCV2ActionListen
@Override @Override
public KYCV2PresenterInterface getPresenter() { public KYCV2PresenterInterface getPresenter() {
return null;
return this.presenter;
} }

323
app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV2/view/view3/KYCView3Fragment.java

@ -1,24 +1,81 @@
package com.gmeremit.online.gmeremittance_native.kycV2.view.view3; package com.gmeremit.online.gmeremittance_native.kycV2.view.view3;
import android.Manifest;
import android.app.AlertDialog;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.os.Environment;
import android.provider.MediaStore;
import android.provider.Settings;
import android.support.annotation.Nullable; import android.support.annotation.Nullable;
import android.support.design.widget.Snackbar;
import android.support.v4.app.ActivityCompat;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.Button; import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import com.gmeremit.online.gmeremittance_native.R; import com.gmeremit.online.gmeremittance_native.R;
import com.gmeremit.online.gmeremittance_native.base.BaseFragment; import com.gmeremit.online.gmeremittance_native.base.BaseFragment;
import com.gmeremit.online.gmeremittance_native.kycV2.KYCV2ActionListener; import com.gmeremit.online.gmeremittance_native.kycV2.KYCV2ActionListener;
import com.gmeremit.online.gmeremittance_native.kycV2.presenter.KYCV2PresenterInterface; import com.gmeremit.online.gmeremittance_native.kycV2.presenter.KYCV2PresenterInterface;
import com.gmeremit.online.gmeremittance_native.kycV2.view.view2.KYCView2VModel; import com.gmeremit.online.gmeremittance_native.kycV2.view.view2.KYCView2VModel;
import com.gmeremit.online.gmeremittance_native.kycform.view.DocumentsActivity;
import com.gmeremit.online.gmeremittance_native.utils.other.Utility;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import butterknife.BindView; import butterknife.BindView;
import butterknife.ButterKnife; import butterknife.ButterKnife;
import butterknife.OnClick;
import io.reactivex.Observable; import io.reactivex.Observable;
import io.reactivex.disposables.CompositeDisposable; import io.reactivex.disposables.CompositeDisposable;
public class KYCView3Fragment extends BaseFragment implements View.OnClickListener,KYCV2PresenterInterface.KYCV2ContractInterface.KYCView3ContractInterface {
public class KYCView3Fragment extends BaseFragment implements View.OnClickListener, KYCV2PresenterInterface.KYCV2ContractInterface.KYCView3ContractInterface {
public static final int FRONT_REGID = 1;
public static final int SELFIE_REGID_CAMERA = 10;
public static final int SELFIE_REGID_GALLERY = 110;
public static final int FRONT_REGID_CAMERA = 1;
public static final int FRONT_REGID_GALLERY = 11;
public static final int BACK_REGID_CAMERA = 2;
public static final int BACK_REGID_GALLERY = 22;
public static final int PASSBOOKREQ_CAMERA = 3;
public static final int PASSBOOKREQ_GALLERY = 33;
public static final int PASSPORTREQ_CAMERA = 4;
public static final int PASSPORTREQ_GALLERY = 44;
public static final int REQUEST_PERMISSION_SELFIE = 2000;
public static final int REQUEST_PERMISSION_FRONT = 2001;
public static final int REQUEST_PERMISSION_BACK = 2002;
public static final int REQUEST_PERMISSION_PASSBOOK = 2003;
public static final int REQUEST_PERMISSION_PASSPORT = 2004;
@BindView(R.id.iv_selfie_image)
ImageView selfieImage;
@BindView(R.id.iv_front_image)
ImageView frontRegIdImage;
@BindView(R.id.iv_back_image)
ImageView backRegIdImage;
@BindView(R.id.iv_passport_image)
ImageView passportImage;
@BindView(R.id.iv_passbook_image)
ImageView passbookImage;
Bitmap frontBitmap, backtBitmap, passbookBitmap, passportBitmap, selfieBitmap;
Uri imageUriFront;
@BindView(R.id.btn_submit) @BindView(R.id.btn_submit)
@ -72,9 +129,62 @@ public class KYCView3Fragment extends BaseFragment implements View.OnClickListe
} }
public void takeAPicture(int requestCode, int i) {
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
intent.putExtra(MediaStore.EXTRA_OUTPUT, imageUriFront);
intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1);
intent.putExtra("android.intent.extras.CAMERA_FACING", i);
startActivityForResult(intent, requestCode);
}
private void galleryIntent(int requestCode) {
Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(Intent.createChooser(intent, "Select File"), requestCode);
}
public void cameraorGalleryChooser(final int requestCodeCamera, final int requestCodeGallery) {
View view = LayoutInflater.from(getContext()).inflate(R.layout.layout_alert_camera_gallery, null);
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity(), R.style.CustomAlertDialog);
builder.setView(view);
final AlertDialog dialog = builder.create();
TextView tv_camera, tv_gallery, tv_cancel;
tv_camera = view.findViewById(R.id.tv_photo);
tv_gallery = view.findViewById(R.id.tv_gallery);
tv_cancel = view.findViewById(R.id.tv_cancel);
tv_camera.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (requestCodeCamera == 10) {
takeAPicture(requestCodeCamera, 1);
} else {
takeAPicture(requestCodeCamera, 0);
}
dialog.dismiss();
}
});
tv_gallery.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
galleryIntent(requestCodeGallery);
dialog.dismiss();
}
});
tv_cancel.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
dialog.dismiss();
}
});
dialog.show();
WindowManager.LayoutParams lp = dialog.getWindow().getAttributes();
lp.dimAmount = 0.8f;
dialog.getWindow().setAttributes(lp);
dialog.getWindow().addFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
}
@Override @Override
@ -82,13 +192,222 @@ public class KYCView3Fragment extends BaseFragment implements View.OnClickListe
switch (v.getId()) { switch (v.getId()) {
case R.id.btn_submit: case R.id.btn_submit:
if (((KYCV2ActionListener) getActivity()).getPresenter().validateKYCView3(createViewModelDataFromView())) if (((KYCV2ActionListener) getActivity()).getPresenter().validateKYCView3(createViewModelDataFromView()))
((KYCV2ActionListener)getActivity()).getPresenter().prepareToSendData();
((KYCV2ActionListener) getActivity()).getPresenter().prepareToSendData();
else else
showToastMessage("Please fill all the required."); showToastMessage("Please fill all the required.");
break; break;
} }
} }
private void askPermission(int cameraReqCode, int galleryReqCode, int permissonReqCode) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
int cameraPermission = ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.CAMERA);
if (Settings.System.canWrite(getActivity()) && cameraPermission == PackageManager.PERMISSION_GRANTED) {
cameraorGalleryChooser(cameraReqCode, galleryReqCode);
} else {
requestPermissions(new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE,
Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.CAMERA}, permissonReqCode);
}
} else {
cameraorGalleryChooser(cameraReqCode, galleryReqCode);
}
}
@Override
public void onRequestPermissionsResult(int requestCode,
String permissions[], int[] grantResults) {
switch (requestCode) {
case REQUEST_PERMISSION_FRONT: {
// If request is cancelled, the result arrays are empty.
if (grantResults.length > 0
&& grantResults[0] == PackageManager.PERMISSION_GRANTED && grantResults[2] == PackageManager.PERMISSION_GRANTED) {
cameraorGalleryChooser(FRONT_REGID_CAMERA, FRONT_REGID_GALLERY);
} else {
Snackbar.make(frontRegIdImage.getRootView(), "Permission is Disabled", Snackbar.LENGTH_LONG).show();
}
return;
}
case REQUEST_PERMISSION_BACK:
if (grantResults.length > 0
&& grantResults[0] == PackageManager.PERMISSION_GRANTED && grantResults[2] == PackageManager.PERMISSION_GRANTED) {
cameraorGalleryChooser(BACK_REGID_CAMERA, BACK_REGID_GALLERY);
} else {
Snackbar.make(frontRegIdImage.getRootView(), "Permission is Disabled", Snackbar.LENGTH_LONG).show();
}
break;
case REQUEST_PERMISSION_PASSBOOK:
if (grantResults.length > 0
&& grantResults[0] == PackageManager.PERMISSION_GRANTED && grantResults[2] == PackageManager.PERMISSION_GRANTED) {
cameraorGalleryChooser(PASSBOOKREQ_CAMERA, PASSBOOKREQ_GALLERY);
} else {
Snackbar.make(frontRegIdImage.getRootView(), "Permission is Disabled", Snackbar.LENGTH_LONG).show();
}
break;
case REQUEST_PERMISSION_PASSPORT:
if (grantResults.length > 0
&& grantResults[0] == PackageManager.PERMISSION_GRANTED && grantResults[2] == PackageManager.PERMISSION_GRANTED) {
cameraorGalleryChooser(PASSPORTREQ_CAMERA, PASSPORTREQ_GALLERY);
} else {
Snackbar.make(frontRegIdImage.getRootView(), "Permission is Disabled", Snackbar.LENGTH_LONG).show();
}
break;
case REQUEST_PERMISSION_SELFIE:
if (grantResults.length > 0
&& grantResults[0] == PackageManager.PERMISSION_GRANTED && grantResults[2] == PackageManager.PERMISSION_GRANTED) {
cameraorGalleryChooser(SELFIE_REGID_CAMERA, SELFIE_REGID_GALLERY);
} else {
Snackbar.make(frontRegIdImage.getRootView(), "Permission is Disabled", Snackbar.LENGTH_LONG).show();
}
break;
}
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
Bitmap bitmap;
try {
if (requestCode == SELFIE_REGID_CAMERA ||
requestCode == FRONT_REGID_CAMERA ||
requestCode == BACK_REGID_CAMERA ||
requestCode == PASSBOOKREQ_CAMERA ||
requestCode == PASSPORTREQ_CAMERA)
bitmap = (Bitmap) data.getExtras().get("data");
else
bitmap = createBitmapFromGallerData(data);
} catch (NullPointerException ex) {
ex.printStackTrace();
return;
}
((KYCV2ActionListener) getActivity()).getPresenter().checkImageStatus(requestCode, resultCode, bitmap);
}
private Bitmap createBitmapFromGallerData(Intent data) {
Bitmap bm = null;
if (data != null) {
try {
bm = MediaStore.Images.Media.getBitmap(getActivity().getContentResolver(), data.getData());
} catch (IOException e) {
e.printStackTrace();
}
}
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
bm.compress(Bitmap.CompressFormat.JPEG, 80, bytes);
File destination = new File(Environment.getExternalStorageDirectory(),
System.currentTimeMillis() + ".jpg");
FileOutputStream fo;
try {
destination.createNewFile();
fo = new FileOutputStream(destination);
fo.write(bytes.toByteArray());
fo.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return bm;
}
@OnClick(R.id.selfieImage_layout)
public void setSelfieImage() {
askPermission(SELFIE_REGID_CAMERA, SELFIE_REGID_GALLERY, REQUEST_PERMISSION_SELFIE);
}
@OnClick(R.id.frontImage_layout)
public void regfrontid() {
askPermission(FRONT_REGID_CAMERA, FRONT_REGID_GALLERY, REQUEST_PERMISSION_FRONT);
}
@OnClick(R.id.backImage_layout)
public void regbackid() {
askPermission(BACK_REGID_CAMERA, BACK_REGID_GALLERY, REQUEST_PERMISSION_BACK);
}
@OnClick(R.id.passbookImage_layout)
public void setPassbookreq() {
askPermission(PASSBOOKREQ_CAMERA, PASSBOOKREQ_GALLERY, REQUEST_PERMISSION_PASSBOOK);
}
@OnClick(R.id.passportImage_layout)
public void setPassportreq() {
askPermission(PASSPORTREQ_CAMERA, PASSPORTREQ_GALLERY, REQUEST_PERMISSION_PASSPORT);
}
@OnClick(R.id.front_example)
public void setFrontExample() {
Utility.showImageDialog(getActivity(), "National/Alien Reg ID Front", R.drawable.ic_example_front);
}
@OnClick(R.id.back_example)
public void setBackExample() {
Utility.showImageDialog(getActivity(), "National/Alien Reg ID Back", R.drawable.ic_back_example);
}
@OnClick(R.id.passbook_example)
public void setPassbookExample() {
Utility.showImageDialog(getActivity(), "Passbook", R.drawable.ic_passbook_example);
}
@OnClick(R.id.passport_example)
public void setPassportExample() {
Utility.showImageDialog(getActivity(), "Passport", R.drawable.ic_passport_example);
}
@OnClick(R.id.selfie_example)
public void setSelfieExample() {
Utility.showImageDialog(getActivity(), "Picture with National/Alien Reg ID Front", R.drawable.ic_selfie_example);
}
@Override
public void setFrontImage(Bitmap bitmap) {
Utility.showImageFromBitmap(getActivity(), frontRegIdImage, bitmap);
frontBitmap = bitmap;
}
@Override
public void setBackImage(Bitmap bitmap) {
Utility.showImageFromBitmap(getActivity(), backRegIdImage, bitmap);
backtBitmap = bitmap;
}
@Override
public void setPassbookImage(Bitmap bitmap) {
Utility.showImageFromBitmap(getActivity(), passbookImage, bitmap);
passbookBitmap = bitmap;
}
@Override
public void setPassportImage(Bitmap bitmap) {
Utility.showImageFromBitmap(getActivity(), passportImage, bitmap);
passportBitmap = bitmap;
}
@Override
public void setSelfieImage(Bitmap bitmap) {
Utility.showImageFromBitmap(getActivity(), selfieImage, bitmap);
selfieBitmap = bitmap;
}
@Override @Override
public Observable<KYCView3VModel> getView3RelatedData() { public Observable<KYCView3VModel> getView3RelatedData() {

Loading…
Cancel
Save