A small library that allows You to easily manage fingererprint authentication inside your Activity or Fragment on devices with fingerprint scanner and Android M and higher. Min sdk 14
450
stars
70
forks
source link
(Hopefully) some improvements to Kotlin code and some general cleanup #7
I'm currently adapting Kotlin myself and in our current project we needed Fingerprint authentication, so I've stumbled upon your library and noticed some things, that weren't Kotlin enough for me. ;)
Everything is up for discussion, of course.
You should get all the information from my commit messages, but overall what I did is:
Mitigated the need for explicit init{} blocks
Removed the need for all !! operators
Removed hungarian notiation. I know where you're coming from here, and I too am using this in basically all my Android java classes, but after reading this great blog post from Jake Wharton I am in the middle of slowly reducing this. Either way, I think with Kotlin and properties, hungarian notiation should be avoided in Kotlin in General.
Moved from explicit getter/setter methods to property getters and setters. This overall just makes the library nicer to use from Kotlin. Overall everything should stay the same from a Java standpoint. I also added deprecated methods to be used from Kotlin with nice ReplaceWith parameters for easy Alt+Enter replacements.
Fixed spelling issue with FahSecureSettingsDialog.setPositive() methods, but kept setPostisive() methods around with added deprecation annotations. Same goes for FahErrorType.Auth.AUTH_TOO_MANY_TRIES.
Fixed small issue with Documentation headings.
Re-applied .gitignore file, so .idea folder is not source-controlled anymore. All of this is generated by Android Studio via build.gradle file anyway, and I tried a clean checkout and didn't have any issues.
I'm currently adapting Kotlin myself and in our current project we needed Fingerprint authentication, so I've stumbled upon your library and noticed some things, that weren't Kotlin enough for me. ;)
Everything is up for discussion, of course.
You should get all the information from my commit messages, but overall what I did is:
ReplaceWith
parameters for easy Alt+Enter replacements.FahSecureSettingsDialog.setPositive()
methods, but keptsetPostisive()
methods around with added deprecation annotations. Same goes forFahErrorType.Auth.AUTH_TOO_MANY_TRIES
.Let me know what you think!