using System.Net; using System.Net.Sockets; using Android.Content; using Android.Hardware.Biometrics; using Android.OS; using Java.Lang; namespace DemoAndroid; class BiometricCallback : BiometricPrompt.AuthenticationCallback, IDialogInterfaceOnClickListener { private Context _context; public BiometricCallback(Context context) { _context = context; } public override void OnAuthenticationError(BiometricErrorCode errorCode, ICharSequence? errString) { Toast.MakeText(_context, $"Authentication error: {errorCode}, {errString?.ToString()}", ToastLength.Long).Show(); } public override void OnAuthenticationSucceeded(BiometricPrompt.AuthenticationResult? result) { Toast.MakeText(_context, "Authentication succeeded!", ToastLength.Long).Show(); } public override void OnAuthenticationFailed() { Toast.MakeText(_context, "Authentication failed!", ToastLength.Long).Show(); } public void OnClick(IDialogInterface? dialog, int which) { Toast.MakeText(_context, "Cancel clicked!", ToastLength.Long).Show(); } } [Activity(Label = "WakeOnLanActivity")] public class WakeOnLanActivity : Activity { private const int BiometricStrong = 0x0000000f; private const int BiometricWeak = 0x000000ff; private const int DeviceCredential = 0x00008000; private bool _authenticated = false; protected override void OnCreate(Bundle? savedInstanceState) { base.OnCreate(savedInstanceState); // Create your application here SetContentView(Resource.Layout.activity_wakeonlan); var button = FindViewById