Closed tonyignat closed 7 years ago
You have to install the package to your PCL and your App projects XYZ.Android, XYZ.iOS, etc. Right Click Solution -> Manage NuGet Packages for Solution -> Select FP plugin -> Check all neccessary Projects -> install
@smstuebe - We have installed FP plugin from nuget in to our PCL and also in our Android & iOS project. But still we could not solve this issue.
Considering Android, We are targetting API 23 with Marshmallow 6.0. When we set this configuration, by default our MainActivity.cs implements FormsAppCompatActivity.
public class MainActivity : FormsAppCompatActivity
When we navigate to same file in your sample, we could see as below which implements FormsApplicationActivity but not FormsAppCompatActivity
public class MainActivity : FormsApplicationActivity
Which is not allowing us to initialize your plugin, Even if we do so by replacing the implementation, it throws false everytime. Can you please help us ?
Have you called CrossFingerprint.SetCurrentActivityResolver
as described in the setup docs? https://github.com/smstuebe/xamarin-fingerprint#android
We tried using your plugin, now with out any errors am able to debug using Android Virtual Devices (Nexus 5).
Followed your steps in setting up FingerPrint using Android Virtual Device - Extended Controls and it shows to me that "You have added 2 Fingerprints to the device".
Now when i debug, its always returning result.Authenticated = false.
We even tried to setup finger touch 1 as explained, but in Telnet after keying in emulator ID, it's not allowing us to enter commands other than avd, auth, help and exit/quit.
Due to which i had setup the finger1 and finger2 using AVD - Extended controls.
Also, DialogControl is creating problems, means in Portable library it says "DialogConfiguration" could not be found. (We have added Plugin.Fingerprint from Nuget, but still this error is coming up)
Mostly, issue of returning false is highlighted. It would be good, if we get help on this :+1:
Thanks in Advance :)
Hmm I can't really help you any further with your simulator setup. Have you tested it with a real device? Which version have you installed? Stable or beta?
No, we haven't got chance to test this yet in real device, we might be doing that tomorrow. :( I have installed stable version 1.2.0 using Nuget.
Ok. Setting up the simulators is always a bit tricky. Which emulator are you using? The new Android simulator doesn't require the telnet action and provides a UI for it.
I am using Android Virtual Device (AVD) i.e., Android SDK Emulator with Visual Studio. I have configured Nexus 5 API 23 (but not Nexus 5X).
Also, added fingerprint as shown in the picture, but still when i click on Authenticate, it gives me false.
Am getting Not Available status on my Page.
The only reason I could imagine is that the OS is returning false for IsHardwareDetected
, because the Nexus 5 doesn't have a FP Sensor. Could you try it with a 5X?
Nevertheless: This shows me, that I should make the plugin more chatty using some log output.
@sairamb87 The "Touch Sensor" UI function has never worked for me. I've been using the telnet commands with no problem.
@ronpf - Can you please help us with step by step of using telnet commands, we tried telnet before trying it in UI, but hard luck. Both the cases, it didn't work.
Thanks in advance.
Have you tried it with a Nexus 5X image?
@sairamb87
Once you have that info open an Tools | SDK Command Prompt from via xamarin studio. a) Enter command: telnet 127.0.0.1 5554 (or your correct host / port. use command 'adb devices' to find connect sims or devices) b) Enter command: auth [your auth token] . c) If everything is good you will see 'OK' d) open your app and it's fingerprint dialog e) enter command: finger touch 1 This should trigger a successful result.
Here's output from my SDK Command prompt:
HPSJ-iMac:android-sdk-mac_x86 rfreschi$ telnet 127.0.0.1 5554
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Android Console: Authentication required
Android Console: type 'auth
Recently we were trying to implement app level fingerprint authentication through PCL. We used Plugin.Fingerprint nuget package and referenced it. The sample which was downloaded from the Git works but once we implement it with our PCL it just returns 'false' where it detects the fingerprint sensor when its available and works with sample application.
While comparing the two projects we found that there is one change in the Android Project’s MainActivity Our Project: public class MainActivity : FormsAppCompatActivity {
Working Sample App: xamarin-fingerprint-master
public class MainActivity : FormsApplicationActivity {
When I do this code change in my application code, the 'object reference not found error' is displayed during load application operation. What is the difference between these code and how should we handle it to make fingerprint sensor work through our mobile app. Is this the problem or whether there is something else we are missing here ?
It will be a great help is you could help us on this. If you have a different sample using another plugin, it would also help us greatly. All we need is to implement this mostly through PCL.