Face verification
This commit is contained in:
parent
383e448898
commit
45a0b864f3
@ -5,6 +5,7 @@ import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
import android.os.Bundle;
|
||||
|
||||
import android.os.Handler;
|
||||
import android.os.Vibrator;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
@ -115,7 +116,7 @@ public class AuthenticationActivity extends ToolbarActivity implements PinFragme
|
||||
|
||||
// to make the Navigation drawer icon always appear on the action bar
|
||||
|
||||
getActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
// getActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
login = getIntent().getStringExtra(USER_NAME);
|
||||
face = findViewById(R.id.face);
|
||||
@ -123,7 +124,11 @@ public class AuthenticationActivity extends ToolbarActivity implements PinFragme
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
System.out.println("Clicked face");
|
||||
setSelectedTab(v);
|
||||
showFaceAuth();
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
/*if (TextUtils.isEmpty(login)) {
|
||||
finish();
|
||||
@ -223,7 +228,7 @@ public class AuthenticationActivity extends ToolbarActivity implements PinFragme
|
||||
|
||||
private void unselectTabs() {
|
||||
face.setActivated(false);
|
||||
finger.setActivated(false);
|
||||
// finger.setActivated(false);
|
||||
}
|
||||
|
||||
private void setSelectedTab(View view) {
|
||||
@ -231,22 +236,25 @@ public class AuthenticationActivity extends ToolbarActivity implements PinFragme
|
||||
view.setActivated(true);
|
||||
}
|
||||
|
||||
/*@OnClick({R.id.face})
|
||||
@OnClick({R.id.face})
|
||||
public void onFaceClick(View view) {
|
||||
System.out.println("Clicked face");
|
||||
System.out.println("Clicked face1");
|
||||
setSelectedTab(view);
|
||||
showFaceAuth();
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void showFaceAuth() {
|
||||
System.out.println("Inside showFaceAuth");
|
||||
preferences.setNeedPortrait(false);
|
||||
if (photoFragment == null) {
|
||||
photoFragment = PhotoFragment.newInstance();
|
||||
photoFragment.setListener(this);
|
||||
photoFragment.setPhotoProcessor(photoProcessor);
|
||||
photoFragment.enableLivenessCheck(preferences.getLivenessAuth());
|
||||
photoFragment.enableLivenessCheck(false);
|
||||
}
|
||||
preferences.setStartTime(String.valueOf(System.currentTimeMillis()));
|
||||
preferences.setNeedPortrait(true);
|
||||
showFragment(photoFragment);
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,7 @@ import ru.visionlab.femdemo.CheckInActivity;
|
||||
import ru.visionlab.femdemo.R;
|
||||
import ru.visionlab.femdemo.api.CallApiService;
|
||||
import ru.visionlab.femdemo.api.JsonPlaceHolderApi;
|
||||
import ru.visionlab.femdemo.authentication.AuthenticationActivity;
|
||||
import ru.visionlab.femdemo.models.RegistrationNew;
|
||||
import ru.visionlab.femdemo.models.Users;
|
||||
import ru.visionlab.femdemo.register.RegisterActivityNew;
|
||||
@ -67,9 +68,9 @@ public class LoginActivityNew extends AppCompatActivity {
|
||||
|
||||
isAllFieldsChecked = CheckAllFields();
|
||||
if(isAllFieldsChecked) {
|
||||
login();
|
||||
/*Intent intent = new Intent(LoginActivityNew.this, CheckInActivity.class);
|
||||
startActivity(intent);*/
|
||||
// login();
|
||||
Intent intent = new Intent(LoginActivityNew.this, AuthenticationActivity.class);
|
||||
startActivity(intent);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -6,10 +6,13 @@ public class RegistrationNew {
|
||||
private String employeeId;
|
||||
private String otp;
|
||||
|
||||
|
||||
|
||||
public RegistrationNew(String companyId, String employeeId, String otp) {
|
||||
this.companyId = companyId;
|
||||
this.employeeId = employeeId;
|
||||
this.otp = otp;
|
||||
|
||||
}
|
||||
|
||||
public String getCompanyId() {
|
||||
@ -35,4 +38,6 @@ public class RegistrationNew {
|
||||
public void setOtp(String otp) {
|
||||
this.otp = otp;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -28,7 +28,7 @@
|
||||
style="@style/TabStyle"
|
||||
android:id="@+id/face"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:enabled="false"
|
||||
android:enabled="true"
|
||||
android:text="@string/auth_face_tab_title"
|
||||
/>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user