Update dependencies, Fix biometric auth on newer Android

This commit is contained in:
MrLetsplay 2023-11-30 20:46:10 +01:00
parent 7ded66a638
commit dac6a9163e
Signed by: mr
SSH Key Fingerprint: SHA256:92jBH80vpXyaZHjaIl47pjRq+Yt7XGTArqQg1V7hSqg
2 changed files with 10 additions and 8 deletions

View File

@ -73,8 +73,8 @@ dependencies {
implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.lifecycle:lifecycle-livedata:2.6.2' implementation 'androidx.lifecycle:lifecycle-livedata:2.6.2'
implementation 'androidx.lifecycle:lifecycle-viewmodel:2.6.2' implementation 'androidx.lifecycle:lifecycle-viewmodel:2.6.2'
implementation 'androidx.navigation:navigation-fragment:2.7.4' implementation 'androidx.navigation:navigation-fragment:2.7.5'
implementation 'androidx.navigation:navigation-ui:2.7.4' implementation 'androidx.navigation:navigation-ui:2.7.5'
testImplementation 'junit:junit:4.13.2' testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5' androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
@ -82,9 +82,9 @@ dependencies {
implementation 'com.cringe_studios:CringeAuthenticatorLibrary:1.6' implementation 'com.cringe_studios:CringeAuthenticatorLibrary:1.6'
implementation 'com.google.mlkit:barcode-scanning:17.2.0' implementation 'com.google.mlkit:barcode-scanning:17.2.0'
implementation 'com.google.code.gson:gson:2.10.1' implementation 'com.google.code.gson:gson:2.10.1'
implementation 'androidx.activity:activity:1.8.0' implementation 'androidx.activity:activity:1.8.1'
def camerax_version = "1.2.3" def camerax_version = "1.3.0"
implementation "androidx.camera:camera-core:${camerax_version}" implementation "androidx.camera:camera-core:${camerax_version}"
implementation "androidx.camera:camera-camera2:${camerax_version}" implementation "androidx.camera:camera-camera2:${camerax_version}"
implementation "androidx.camera:camera-lifecycle:${camerax_version}" implementation "androidx.camera:camera-lifecycle:${camerax_version}"

View File

@ -45,12 +45,14 @@ public class BiometricUtil {
} }
}); });
BiometricPrompt.PromptInfo info = new BiometricPrompt.PromptInfo.Builder() BiometricPrompt.PromptInfo.Builder infoBuilder = new BiometricPrompt.PromptInfo.Builder()
.setTitle(context.getString(R.string.app_name)) .setTitle(context.getString(R.string.app_name))
.setSubtitle(context.getString(R.string.biometric_lock_subtitle)) .setSubtitle(context.getString(R.string.biometric_lock_subtitle))
.setNegativeButtonText(context.getString(R.string.cancel)) .setAllowedAuthenticators(getAuthenticationMethod());
.setAllowedAuthenticators(getAuthenticationMethod())
.build(); if(Build.VERSION.SDK_INT <= Build.VERSION_CODES.P) infoBuilder.setNegativeButtonText(context.getString(R.string.cancel));
BiometricPrompt.PromptInfo info = infoBuilder.build();
prompt.authenticate(info); prompt.authenticate(info);
} }