android-9.0-pie
Robolectric RuntimeEnvironment.application is deprecated, where is ApplicationProvider.getApplicationContext()?
As described in the Robolectric Migration Guide to 4.0 you have to add the androidx test core dependencies testImplementation ‘androidx.test:core:1.0.0’ to your build.gradle After this you can use the ApplicationProvider.getApplicationContext() method
what is a non-SDK interface
Quoting the documentation: Generally speaking, SDK interfaces are those ones found documented in the Android framework Package Index. Not everything in the framework appears in the documentation. Classes, methods, fields, and such marked with @hide in the source code are available at runtime but are not part of the SDK and do not appear in … Read more
Fullscreen App With DisplayCutout
Set these properties in your theme : <item name=”android:windowLayoutInDisplayCutoutMode”>shortEdges</item> <item name=”android:windowTranslucentStatus”>true</item> <item name=”android:windowTranslucentNavigation”>true</item>
USE_FINGERPRINT is deprecated in API level 28
I’ve faced the same problem, imho the short answer is to ignore the deprecation, as long as you only want to support fingerprint authentication in your app. As stated in the google dev blog, since API 28 google comes up with the new biometrics API, which simplifies the whole process of biometrics authentication. They provide … Read more
Is there an API to detect which theme the OS is using – dark or light (or other)?
Google has just published the documentation on the dark theme at the end of I/O 2019, here. In order to manage the dark theme, you must first use the latest version of the Material Components library: “com.google.android.material:material:1.1.0-alpha06”. Change the application theme according to the system theme For the application to switch to the dark theme … Read more
Determine if biometric hardware is present and the user has enrolled biometrics on Android P
Google finally solved this problem with Android Q The android.hardware.biometrics.BiometricManager#canAuthenticate() method can be used to determine if biometrics can be used. The method can be used to determine if biometric hardware is present and if the user is enrolled or not. Returns BIOMETRIC_ERROR_NONE_ENROLLED if the user does not have any enrolled, or BIOMETRIC_ERROR_HW_UNAVAILABLE if none … Read more