smstuebe / xamarin-fingerprint

Xamarin and MvvMCross plugin for authenticate a user via fingerprint sensor
Microsoft Public License
490 stars 115 forks source link

[Android] DialogFragment class is now obsolete #144

Closed tranb3r closed 4 years ago

tranb3r commented 4 years ago

Steps to reproduce

  1. Update sample app to build with Android 10
  2. Build sample app for Android

Expected behavior

Should build without warnings

Actual behavior

Android's DialogFragment class (from which Plugin.Fingerprint.Dialog.FingerprintDialogFragment inherits) is now obsolete. From Android documentation: This class was deprecated in API level P. Use the Support Library DialogFragment...

Here are some warnings I get when building my own app: warning CS0672: Member 'CustomFingerprintDialogFragment.OnCreateView(LayoutInflater, ViewGroup, Bundle)' overrides obsolete member 'Fragment.OnCreateView(LayoutInflater, ViewGroup, Bundle)'. Add the Obsolete attribute to 'CustomFingerprintDialogFragment.OnCreateView(LayoutInflater, ViewGroup, Bundle)'. warning CS0618: 'DialogFragment.Dialog' is obsolete: 'deprecated' warning CS0618: 'Fragment.OnCreateView(LayoutInflater, ViewGroup, Bundle)' is obsolete: 'deprecated'

Configuration

Version of the Plugin: 1.4.9

Platform: Android 10

Device: Not relevant (build issue)

smsissuechecker commented 4 years ago

Hi @tranb3r,

I'm the friendly issue checker. Thanks for using the issue template :star2: I appreciate it very much. I'm sure, the maintainers of this repository will answer, soon.

WilkoSki commented 4 years ago

Same issue, should you not be using Android.Support.V4.App.Fragment ?

smstuebe commented 4 years ago

No, we should completely move away from a custom dialog to the official BiometricPrompt. This would solve sooo many issues. Unfortuantly Xamarin is not that quick with the AndroidX support. I have a custom binding running on my local machine. I have to test alot and will release a alpha version.

WilkoSki commented 4 years ago

Does that limit you to only supporting Android P and above?

smstuebe commented 4 years ago

No. AndroidX is the new kind of support libraries. https://developer.android.com/jetpack/androidx

tranb3r commented 4 years ago

@smstuebe What do you need from xamarin ? Is there a ticket we can vote for ?

smstuebe commented 4 years ago

@WilkoSki disucssion goes on here: https://github.com/smstuebe/xamarin-fingerprint/issues/151