-
-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use biometricpromt and more consistent callbacks #179
Use biometricpromt and more consistent callbacks #179
Conversation
Fix issue 152 (NiklasMerz#174)
…me old things - removed all res/ references
…me old things - removed all res/ references
…ent-callbacks' into 2.0.0-biometricpromt-and-consistent-callbacks
- isAvailable can actually fail
…ent-callbacks' into 2.0.0-biometricpromt-and-consistent-callbacks
… they won't show - removed onAuthenticationFail even since its better suited for use with observable not promise (can add back anytime if we feel that reported every failed attempt of a scan is needed. Most people just want success or do X when sensor is locked-out which the plugin already does) - spelling errors fixed in tests.js - wrote new test and adjusted current ones - updating js interface to accommodate all new parameters - updated readme outlining new changes in v3 - updated aar to remove unused events - updated ionic native wrapper (unpublished atm) - bumped version
Thank you very much. I love this PR, because the Android part is much more readable than before. I need to do some tests but reading the code for the first time looks good to me. Could you please resolve the conflicts as well? I don't want to break it :-)
That would be good since it is often used on iOS. I will look for an solution as well.
Is the language support for the native dialogue necessary like before? How does it work now? I don't know that much about that? What is that aar file? Where is the code for that? How is that licensed. Since you wrote the Android part from scratch I would like to change the licensing to MIT for all code. The previous version contained some Apache licensed code from the other Android plugin. |
I resolved the conflict myself to get the CI build runnin. I hope I did not mess up. What about the SDK version check from the old version? JSONObject errorResponse = new JSONObject();
if (android.os.Build.VERSION.SDK_INT < 23) {
Log.e(TAG, "minimum SDK version 23 required");
mPluginResult = new PluginResult(PluginResult.Status.ERROR);
mCallbackContext.error(errorResponse.put("message", "minimum SDK version 23 required"));
mCallbackContext.sendPluginResult(mPluginResult);
return true;
} Should we add this back? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's dicuss the oustanding questions a do some tests.
You resolved the conflicts without issue sorry I missed this ..I didn't think I had the right permissions ..first time doing the draft-pr here.
I don't think it is. In iOS for example the only things you can dynamically change in the prompt are the description[localizedReason](text that appears under the title) and the fallback button title[localizedFallbackTitle](2nd button that appears after first failed fingerprint auth). The title and everything else already would support whatever languages iOS already supports. Since the new plugin returns error codes now for every error users should be able to customize the results or error messages to their liking. In android you can set everything; title, subtitle, description ..so no I don't think its needed anymore.
The aar file is just an exported android lib I created a module from using sample code from https://github.com/anitaa1990/Biometric-Auth-Sample according to jcenter according to the libs repository jcenter this uses apache 2.0 liscene which you already have commented in Fingerprint.java file. The apache license should be fine unless there is a difference I'm not aware of. Additionally my approach here was to simply and unify things as much as I could. This plugin is great and now the shelf life has increase some. I know a lot of ionic(angular) users use this plugin as well so we'll have to update the examples codes under the How to use section. I've taken the liberty to also work on the wrapper which I've finished updating but haven't made a PR with ionic-native yet.
Please let me know if you have anymore questions. |
You created a full PR but everything is fine. I can push to it as well, so thats perfect
That's good. Adding a new file for every new language was kind of silly. I will test it.
Apache License is fine but we should a note about this library with a link to it and its license to readme. Add it to the credits at the end. So you have module project which build the aar file, correct? Should we add this code to the plugin? Or you could create a fork of the original code, add your changes and a link. We need to have this code available and properly attributed and licensed.
I love how much simpler this is than before. The key handling stuff was not great.
I agree, Updating the docs is important. The README is correct in this PR? Yes Ionic native and its docs need to be updated when this is released.
Great. Sorry I missed that.
I still don't know how much testing this needs. Is backwartscompatibilty fine? I need to set some time to check everything. Since I cannot tests everything I need some help I guess. We'll figure that out. Thanks again. I hope you are patient :-) |
Yes I plan on and following their guide for pull request as the code is already updated and complete.
In my app I haven't seen this cancel issue yet..so trying to reporduce will run the same test as you via npm and will report back. |
I'm trying to run the test but getting this as an error
probably something on my end...will test more tomrr |
@greaterking @NiklasMerz I can help with the ionic native wrapper because I am member of the ionic team, a PR is very easy to create at Ionic native |
I did a few Ionic Native PRs, too. I just want to avoid that we do duplicate work.
Am 2. Nov. 2019, 07:55, um 07:55, Paul Stelzer <[email protected]> schrieb:
…
@greaterking @NiklasMerz I can help with the ionic native wrapper
because I am member of the ionic team, a PR is very easy to create at
Ionic native
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#179 (comment)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to make this cancel button clearer
Is there a way to get the list of available biometrics systems identifications on the device? (finger and face for exemple). And specify in the show() method which system to use? isAvailable() returns only one of them right now and we want to let the user pick between the two if he has both choices available on his device. Thank you and sorry if this isn't the right place. |
@Qsaws Biometric auth works another way. User selects a kind of biometric in a device settings. It will be used to authenticate in apps. The selection of biometric is not accessible in an app itself. Application just provides an ability to use device-level selected biometric. So actually you don't need a result of isAvailable(). |
Ah i see, thanks for the explanation ;) . |
@NiklasMerz do you have an approximate release date for the new version of this plugin? |
Any objections against a new release? Version 3.0.1 may follow soon enough :-) |
I'm ready on my end to make pull request to ionic/native |
Did you already add the new parameter |
Let's go. Thank you very much everyone here for testing, development and you patience. I will do a new release now! This would not be possible without @greaterking and @exxbrain ! |
|
The release is done! Looking forward to the Ionic Native integration. Just look at the number of very old issues closed with this PR I would love to people involved here to stick around maintaining this plugin. I am open to add new maintainers to this project. Especially @greaterking and @exxbrain you know a lot more about these Android APIs than I know. Please help me out if you can :-) A lot of the work that has been around for some time is done now, but a little bit is left. I think about #176 and real AndroidX support. |
Thank you to @NiklasMerz you too sir for this great plugin! |
Just a side not: I wrote a blog post about this plugin and PR. @greaterking and @exxbrain you are the heroes of this story |
I'm honored! It was great to give back to the community. Thank you.
On Wed, Dec 4, 2019 at 12:37 PM Niklas Merz ***@***.***> wrote:
Just a side not: I wrote a blog post about this plugin and PR.
@greaterking <https://github.com/greaterking> and @exxbrain
<https://github.com/exxbrain> you are the heroes of this story
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#179?email_source=notifications&email_token=AAYXUF2UV6KTUQNFMVHOVDLQW7THPA5CNFSM4IMOCLG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEF54CLY#issuecomment-561758511>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAYXUF6SYZMSXVZYJGFVCPDQW7THPANCNFSM4IMOCLGQ>
.
--
Ralph Theart
|
Hey I just wanted to know, when we call fingerprint.show it shows Android
UI for fingerprint can the same happen for Samsung devices which have Iris
scanner. I want the Iris scanner to throw the same success and error
callbacks .
Can you please help me with this.
…On Tue, Oct 15, 2019, 12:25 PM exxbrain ***@***.***> wrote:
include the android-biometric library
@NiklasMerz <https://github.com/NiklasMerz>, it's ok if it is necessary.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#179?email_source=notifications&email_token=ANOJKJTUU4G323ZWWDEQ6JTQOVSPDA5CNFSM4IMOCLG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBHUWUQ#issuecomment-542067538>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANOJKJSHLLPK4X6LLFZPEEDQOVSPDANCNFSM4IMOCLGQ>
.
|
@Sumyth7 I do not know how Samsung devices and their Iris scanner work. Please create a separate issue and explain your problem more. Probably someone else here can say more about Samsung? |
Everything seems to be working but before moving on further wanted you to review some of the changes. Haven't had time to do much with language support as promised ..but this can be easily done the aar file is just a module export from a lib I've refactored for the purposes of this plugin. I've tested pretty extensively. Face detection even works on android.
Would be nice if...
...but these bridges can be crossed later.
Description
How did you test your changes?
ios sim, android sim, ios 7 device, android galaxy s9 device
Closes #129 #198 #158 #83 #151