1

We're developing the app for Android, but we expect it to work in ChromeOS too. And it does work, except one of our latest features brings false negatives.

All KeyguardManager methods return false. For example https://developer.android.com/reference/android/app/KeyguardManager#isDeviceSecure()or https://developer.android.com/reference/android/app/KeyguardManager#isKeyguardSecure() despite that fact, that Chromebook has password

Or BiometricManager returns https://developer.android.com/reference/android/hardware/biometrics/BiometricManager#BIOMETRIC_ERROR_NO_HARDWARE for https://developer.android.com/reference/android/hardware/biometrics/BiometricManager#canAuthenticate(int) even with the laptop having fingerprint sensor

I'm trying to find a solution to this, any help is appreciated

I have same question in google groups, but no luck (https://groups.google.com/a/chromium.org/g/chromium-os-dev/c/5fjBragbAIM)

Anton Shkurenko
  • 4,301
  • 5
  • 29
  • 64

1 Answers1

1

There is a lack of documentation about Android apps - ChromeOS interoperability.

Chrome OS is a Linux-based OS with a Chrome-based UI. The Android apps are not natively compatible with Linux and used ARC to run APKs in a special crafter VM. A similar solution you can find in Sailfish OS (AlienDalvik/TurboDalvik VM) or Windows (Windows Subsystem for Androidâ„¢).

The general problem with a such solution - the VM does not provide proper compatibility with the host OS (technical limitations or not implemented yet), so some of the functions are is just "stubs".

I faced a similar problem when tried to implement biometric authentification on Acer Aspire 7 with fingerprint scanner & Windows 11 - all biometric-related classes (FingerprintManager or BiometricPrompt/BiometricManager) - just stubs. At the same time, Windows Hello (host OS feature) works properly.

This is the same as on your Chromebook - there is a PIN code/password, and there is a fingerprint scanner, but your application does not work, as was expected, because many stubs are present in the APIs.

Thus, there is no way at this moment to solve the problem programmatically, except to wait for future updates to the virtual machine on Chrome OS/Windows/etc.