Biometrid Android SDK
3.0.2
3.0.2
  • Introduction
  • Standard SDK
    • Initialization
    • Requirements
    • Enums
    • Installation
      • Gradle
    • Process Management
      • Create Process
      • Previous Step
      • Get Step State
    • Update Step Management
      • Update Step
    • Liveness Validation
    • Photo Capture
      • Configurations
    • Auto Capture
      • Configurations
    • NFC Passport Reader
      • Scan result
      • Configurations
    • Biometric Authentication
    • Device Location
    • Presence Detection
      • Configurations
  • Full SDK
    • Initialization
    • Requirements
    • Installation
      • Gradle
    • Start
    • Photo Capture
    • Liveness Validation
    • Callbacks
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Standard SDK

Device Location

Obtain the device location using a combination of WIFI, GPS, and cell phone towers signals.

BiometridStandard.getInstance().getLocation(processCallback);

ProcessCallback callback

The process result callback.

Implementation example

class ExampleActivity extends AppCompatActivity implements InitializationCallback {
    String TAG = getClass().getSimpleName();
    String BIOMETRID_API_SERVER_URL = "your server URL";
    String BIOMETRID_APP = "your app";
    String BIOMETRID_CREDENTIAL = "your credential";
    
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        BiometridStandard.getInstance().initialize(
                BIOMETRID_API_SERVER_URL ,
                BIOMETRID_APP,
                BIOMETRID_CREDENTIAL,
                Language.English,    
                this);
    }
    
    @Override
    public void initializationCallback(boolean status, @Nullable Errors errors) {
        if(status) getLocation();
    }

    public void getLocation() {
        BiometridStandard.getInstance().getLocation(new ProcessCallback() {
            @Override
            public void locationCallback(@Nullable LocationData location, @Nullable Errors errors) {
                if (errors != null) {
                    Log.e(TAG, "locationCallback -> error: " + errors.getMessage());
                } else {
                    Log.d(TAG, "locationCallback -> location: " + location.toString());
                }
        });
    }
}

locationCallback

Description

LocationData? location

The device location coordinates.

Errors? errors

Detected errors.


LocationData

Description

String? altitude

The altitude coordinates.

String? longitude

The longitude coordinates.

String? latitude

The latitude coordinates.

PreviousBiometric AuthenticationNextPresence Detection

Was this helpful?