I am developing a Hybrid application for which once the user enters the username and password initially after successful login the user is prompted with a dialog box asking whether to enable FaceID unlocking or not. If the User presses Yes next time the user will directly will be asked to scan the face instead of username and password. In iOS i am successful in doing this.
But how to implement the same in the Android using Cordova. Is there any specific plugin to enable it. If it is there please help me with the plugin or If not please specify the reason.
It is not possible to achieve the same capabilities of the Face Id to unlock an app on Android, so it wouldn't be possible even using Android native app.
Android uses the keymanager to achieve unlocking capabilities on apps, using primitive authentication methods. That allows you to use pin code or fingerprint authentication. At this time, face recognition is not available yet.
Apple and Face ID can allow this because Face ID is a primitive security method for the iPhone X, as the data used to unlock the device is kept in the Secure Enclave, in the same way that Touch ID data is.
My guess is that Android will follow Apple's steps and implement a solution like Face ID for authentication in one of Android's next versions (not on Android P), but until then, if you really must have face recognition to unlock your app, you can try using 3rd-party libraries, but none will fully achieve the Face Id native capabilitues
Sources:
Related stackoverflow article
Android Keyguard docs
Third party image recognition cordova plugin
Face ID on Android adoption
I am using the plugin called cordova-plugin-keychain-touch-id and it works both for face and touch.
Be aware that some Android phone both have face and touch, and if both are enabled, it returns OKin stead of touch or face.
Also with Android's OREO OS made it possible for older Android phone to login with face biometrics using something called "Trusted Face".
I am still having some issues with face login activation on the phones where both are enabled and with the trusted face, but maybe you (or someone else) have a solution for this :)
Good luck!
Related
I want to enable fingerprint and face unlock for my application. I have fingerprint unlock code and it is working fine if the user is already registered his fingerprint.
I want to enable the same feature for face unlock as well. If the user has already enrolled his face id, then he should be able to authenticate the app with face unlock. I don't want to create any library here, I just want to invoke the device face unlock app and authenticate.
Starting with Android P, you can use the BiometricPrompt API - it will automatically support whichever biometric authentication mechanism is physically present on the user's phone.
See this blog post for a brief overview of the feature, and the docs for how to implement this. This blog post contains a walk-through of all the steps to implement this.
I am using confirm credentials api in my app to authenticate user, using createConfirmDeviceCredentialIntent api.
The api is working fine when I have set up my device lock as pin/pattern/password or fingerprint. But, it's not working in the case of face unlock. I've set face unlock in my device and it's working fine when opening the device. But when I launch the intent using the above mentioned api, it's not recognizing face unlock but all the other things.
Is this a limitation of this api? or I've to do something extra to achieve this?
Can't find this anywhere so posting here.
Unfortunately, this isn't possible because unlocking using your face is part of the Smart Lock set of unlock tools.
Other methods of unlocking that fall under the Smart Lock category include:
On-body detection
Trusted places
Trusted devices
Trusted face (the method in question)
Trusted voice
Because none of these are primitive security methods in Android, it does not make sense to allow these to be accessed using APIs.
If Smart Lock could be used with Keyguard, on-body detection would be in theory be able to grant access to an app, being in a trusted place (but not in the hands of a trusted person) and even trusted voice could be used.
Apple and Face ID can allow this because Face ID is a primitive security method for the iPhone X, as the data used to unlock the device is kept in the Secure Enclave, in the same way that Touch ID data is.
I hope this gives you enough reason as to why this isn't possible, and why it makes sense that this isn't possible.
Sources:
Keyguard (stating unlock methods allowed to be used), Smart Lock, Face ID
BiometricPrompt is introduced in API 28. It will support fingerprint, Iris and face authentication.
Here's an example of how a developer might use it in their app
java.lang.Object
↳ android.hardware.biometrics.BiometricPrompt
Using the BiometricPrompt builder we can:
setTitle() — Set the title to display (Required)
setSubtitle() — Set the subtitle to display (Optional)
setDescription() — Set the description to display(Optional)
setNegativeButton() — Set the text for the negative button(Required).
You must also provide an Executor instance and a click listener for the negative button.
Note: You can’t customise the icon or error message that are used within the dialog.
implementation 'androidx.biometric:biometric:1.0.0-beta01'
Latest Release
GitHub source code available here NativeBiometricScanner developed in Kotlin
We've been working on a few applications in the past few months that are going to be used at work, (small company, apps are not going to be published to the app store). Our employees receive a phone that should only be used in a working environment, and we would like to prevent the user from taking pictures with the device and apps like facebook. This can be done by the Android's Device Admin API, so we will create an additional application to enforce the rule to block the camera from being used. But one of our applications has a feature to take a picture (from documents) and upload them to a server. And with the camera being disabled it's a problem.
My Question: Is it possible to allow certain applications to bypass the camera block? I've done some research but can not seem to find a callback for this feature.
My idea was the following: create a Device Admin application which contains the application id's from our applications (since we made them we know them) So if the Device Admin app receives a broadcast that app XX wants to access the camera and app XX is inside an array of allowed app id's, the device admin app returns a true state (allowing the app to access the camera) and apps that are not in the array will be blocked.
Is this possible and has someone done this before ? It would be nice if someone pointed us in the right direction :). Also i'm sure we are not the only one looking for an answer to this question. So we hope that this post will help people in the future struggling with this problem.
I am a newbie in Android, currently developing an app with some others. Right now the app is quite unstable and I want to add a bug report feature.
I have seen something in ios that a user press the screen with two fingers and it will pop up options to send bug report or UI report.
What I want to do in Android:
through a gesture to enable a user to send screentshot and log through email.
It will pop up a menu to ask the user which email app he would like to use and then direct the user to that certain app. (the email apps need to be detected and show in the menu.)
in the receipt it automatically plugged in my email, in the content it has the user's android version number, stuff like that, and a screenshot, and a log.
I dont want to spend money to any third-party libraries. I would like to use a free one or develop the feature on my own. Any advice is greatly appreciated.
Thank you so much!!!
You could make use of Instabug. It is a bug reporting SDK that you drop into your app and allows for the following:
Users can shake the phone while inside your app to report a bug.
Instabug menu will appear as the following
Interface is plain simple, suitable for non-tech users.
The bug reporting feature is free and unlimited. It is Incredibly easy to track your bugs through the product’s dashboard.
You could make use of the in-app chat feature which lets you reply back to your users within your app. (not free)
It only takes a line of code to integrate into your app.
For full disclosure, I work at Instabug. Let me know if I can help.
I would definitely use Crashlytics for that purpose, they support both Android and iOS platforms and fulfill all the needs you mentioned above. Apart from that and for the same price (it's free!), they include in the report some very valuable metadata like:
OS version
Device
Proximity sensor
Battery status
Charge in progress
Jailbreak/rooting status
Device orientation
Wi-Fi network
Running processes
etc
No need to do extra implementations, all is done!
I need to create an application that scans fingerprints and authenticates them. I can't find anything about fingerprint permissions on the Android website.
Is it possible to use a phone's fingerprint scanner for a regular application? If so, what is the limit on the number of fingerprints it can store (I'd prefer to store them on the phone itself)
Thanks
Fingerprint scanner is not a feature in Android (Now available on Android M).
So each company as Samsung, Motorola, HTC create is own API and SDK to access to fingerprint sensor.
For instance Samsung provide a SDK http://developer.samsung.com/galaxy#pass
Pass SDK allows you to use fingerprint recognition features in your
application. With Pass SDK, you can provide reinforced security, since
you can identify whether the current user actually is the authentic
owner of the device.
If you want to enroll multiple users and check users in your app, it's not possible with Samsung device. You could only check owner of device.
I don't know SDK of other companies.
UPDATE
Android M have new FingerPrint API:
https://developer.android.com/about/versions/marshmallow/android-6.0.html#fingerprint-authentication
Android M preview introducing FingerPrint scanner API.
You can checkout example for this here :
https://github.com/googlesamples/android-FingerprintDialog/
I needed a similar functionality and my solution was to use an external scanner instead of use a device with integrated fingerprint scanner. There are several companies which offer integration with mobile phones through SDKs. You should research through out the next companies on google:
Nitgen: http://www.nitgen.com/eng/product/Hamster3.html#a2
Secugen: http://www.secugen.com/products/sdk_pro.htm#android
Tactivo: http://precisebiometrics.com/smart-card-reader/android/
In my case I used Secugen, but feel free to use the suitable device for your solution. Notice that this solution could make your project cheaper because you don't need to use an expensive mobile phone, the only feature that the phone needs it's having a USB OTG (On-The-Go).
I know this solution it's a bit different from what your were asking for but I believe that it could be interesting for you too.
You can opt to use an external Fingerprint Scanner and be able to Enrol Biometric Fingerprints from Persons you are Registering then proceed to save the Biometric Fingerprint Data and Person's particulars in your Android Phone. In my case I used a DigitalPersona type 4500 Fingerprint Scanner and used the Crossmatch API for Fingerprint Capture.
This is actually the easiest and feasible way for you if you want to succeed at Capturing Biometric Fingerprint Data and Save it in your Android Phone from more than one Individual. In fact what can limit you from enrolling more Biometric Data from various Enrollees will be the memory size constraints of your Android Mobile Phone / Device. This you can however easily circumvent by integrating your Android Biometric Authentication App with an external RDBMs Centralized Database of your Organisation like an MSSQL, Oracle, MySQL, PostgreSQL etc.
If it pleases you, you can choose to use the Source AFIS API to implement it with much ease. For motivation you can check out this project's web page here at [Android Biometric Authentication using External USB Fingerprint Scanner][2] that I developed [here][2].
See screenshots I have attached below for Fingerprint Authentication when the result is a MATCH FOUND and when the result is MATCH NOT FOUND. I have also included a screenshot for when FINGERPRINT ENROLLED.
I designed the User Interface ( GUI) that is reusable on Android Mobile Phone screens of various screen sizes for both Fingerprint Enrollment and Fingerprint Authentication. You can design your own interface anyway but in my case I wanted to be able to display the Person's Fingerprint during Authentication and I added an Activity for swapping Fingerprint Images on display after Finger Touch event is fired if Person places Finger on Fingerprint Scanner.
Happy coding.
[2]: https://jomutech.com/androidexternalfingerprintscanner/
Simple answer is NO.
But you can integrate it by Implementing Google's fingerprint recognition introduced in Android M which only supports 5 attempts at a time, if all the attempt fails your device finger print reader will be blocked for 30 seconds, then after that duration you can authenticate with the fingerprint again.
For example you are using an 2 app(A & B) with finger print support. Then you enter 3 incorrect fingerprints and then you close the app A, then you open the app B so there are total 5 attempts available within 30 seconds so your app can only authenticate 2 times because app A took 3 attempts hence after 2 unauthorized attempts the OS blocks the reader for all apps.
So wait for 30 seconds or ask the user to enter pin or passcode accordingly if the user doesn't wants to wait for that amount of time.
Hope this helps.