FORUMS
Remove All Ads from XDA

[FAQ]FingerPrint Scanner SDK for Apps

758 posts
Thanks Meter: 131
 
By Mgamerz, Senior Member on 6th August 2011, 09:37 PM
Post Reply Email Thread
The Fingerprint Scanner SDK (originally posted at http://forum.xda-developers.com/show....php?t=1202577) for Android has been released by Authentec. Currently there is only one device(Motorola Atrix) with a fingerprint scanner, but if you release your application with support for the fingerprint scanner (once you get the hang of it it is really not hard to use at all) then users of phones with fingerprint scanners will most likely be happier with your application.
Google has stated that Google Wallet will use fingerprints to unlock the payment system, so clearly more capable devices are on the way (source: http://www.qrcodepress.com/google-un...wallet/853399/). Including fingerprint scanner capability in your application will also future-proof it as AuthenTec will have the same framework in place in other phones that will use their fingerprint scanner (Authentec is a leader in biometric security systems for lots of devices).

MotoDEV Article Guide:
http://developer.motorola.com/docsto...t-enabled-apps

Read and Download the (simple) SDK at their site:
http://developers.authentec.com/
Example of SDK Usage (pulled from the SDK)
At the time of this writing, it is my understanding that before you release the application you need to have them review it to meet their security specifications... They don't want you using this fingerprint scanner library and making their work look bad. It's a fair deal to me. I'm not sure if this is how they want it though - maybe that is just for Advanced SDK or maybe I'm just wrong (taken from their site) It appears right now that there is a mismatch between the developers and the makers of the authentec site... apparently there is no requirement for using the fingerprint scanner, so develop away!

I have an Atrix and the fingerprint scanner is amazing, once you use it you will never go back to patterns or pins. As such this guide was written by a user of the Atrix - future devices might not use the exact methodology but it should be nearly identical.

I have the Advanced SDK but I have not used any of the advanced functions yet. After using the code (And getting it to finally work) I have found some things that are not documented or are documented incorrectly in the SDK docs and I have come here to post items that will save you great time. If you find others I hope to hear about them so I can add it to the list - I'll even credit you (maybe with a post number so you can score some thanks points!)

The swipe fingerprint screen won't show up - but I'm getting a result (mine was always 14)
  • AM2 (Authentec fingerprint framework - there are a lot of unsubscribed terms in the documentation so just go with me here) requires Internet Permission (perhaps to verify the key for the advanced SDK, it might not be done locally - without a key advanced SDK functions will not load). If you don't, all uses of the tsm.jar will not work. Not listed at all in documentation

AM2ClientLibraryLoaded() doesn't work with the code they provide!?
  • You must Instantiate Authentec.AM2ClientLibraryLoaded() - SDK Docs shows as static but it is not used in the example program they give.

It goes into verification but does not show anything and locks up the fingerprint sensor.
  • Do not change the 'screen' in the examples of sScreen... I thought that was the title of the window that would appear, but apparently those strings are built into it... it would work better as static fields passed as integers. For values look at the next answer.

What can I use for sScreen (viaGfxScreen(string))?
  • The documentation says nothing of this but these are different types of verification screens. There is fingerprint scanning only and then there is the unlock style one where you also get the PIN. I'm guessing a modifed version of this is how the lock screen works.
    "lap-verify" is fingerprint and PIN
    "get-app-secret" is fingerprint only - hit and miss right now... will update when I get it perfected

Why does it lock up?
  • Only 1 app at a time can access the fingerprint scanner. Motoblur seems to access it occasionally and I think that's why it died on the Atrix's Froyo 1.8.3. It seems mostly fixed but as you develop you will most likely lock it up as you debug. Having a wrong sScreen variable will kill your FP scanner. If it locks in your app you will lose the ability to unlock the device with the FP scanner.
    Use DDMS to kill com.authentec.TrueSuiteMobile and the lock will work again. This might work on 1.8.3 but I'm not sure it works that way. If the application exits with the home button, it seems to also lock it up. I'm looking into a way to avoid this..

I can't register my application, it's failing with code 6 - (System Error)
  • I encountered this one myself when using my Api key for com.mgamerzproductions.gibbertalk - I changed it to com.mgamerzproductions.gibbertalk.testing and it no longer worked. They did tell me this in the email that it is only for one package - so make sure you choose wisely, or bribe the people giving out the API keys to give you another one. I wish it was more specific (API_KEY_NOT_AUTHENTIC or something)

I'm still having problems. What can I do?
  • You can use these tags for debugging in logcat:
    • AMJNI (AuthenTec Mobile - permissions - server)
    • TrueMobileSuite (some gfx log info - swipe fingerprint screen)
    • AndroidRuntime (will tell you crash related things, as debugging for errors will produce too much to read at once)

Any other things would be greatly appreciated for all of use Developers so speak up if you have something I don't have listed and I'll add it.

If you want to use the encrypted storage provided by the framework you'll need to apply for the Advanced SDK. You have to give them a description of your app, and it has to be security related (obviously that's the whole point of the fingerprint scanner and they don't want you to abuse it).

If you like the guide, and you are on MotoDev, I wouldn't mind a kudos in the contest http://community.developer.motorola....-in/td-p/17206
The Following 8 Users Say Thank You to Mgamerz For This Useful Post: [ View ] Gift Mgamerz Ad-Free
 
 
6th August 2011, 09:57 PM |#2  
Mgamerz's Avatar
OP Senior Member
Thanks Meter: 131
 
More
RESERVED
Reserved for OP at a later date

Pictures of my use right now (more later)
Attached Thumbnails
Click image for larger version

Name:	picture1.jpg
Views:	2061
Size:	32.5 KB
ID:	679839   Click image for larger version

Name:	picture2.jpg
Views:	1835
Size:	20.6 KB
ID:	679840   Click image for larger version

Name:	picture3.jpg
Views:	1611
Size:	32.6 KB
ID:	679841  
The Following User Says Thank You to Mgamerz For This Useful Post: [ View ] Gift Mgamerz Ad-Free
7th August 2011, 07:04 AM |#3  
Spoke to OP, moved to main Android development, as this would be of more interest to the development community in general, as I'm sure other phones will be using fingerprint scanning (and this sdk) in the near future.
The Following User Says Thank You to _Alex_ For This Useful Post: [ View ] Gift _Alex_ Ad-Free
8th August 2011, 06:24 PM |#4  
Mgamerz's Avatar
OP Senior Member
Thanks Meter: 131
 
More
Originally posted in the source thread:
Quote:
Originally Posted by heilpern

I tried to post in the linked thread, but as I'm a new XDA poster the system wouldn't allow me to.

The INTERNET permission is required, however there aren't any connections made off of the device. The system uses sockets internally and INET sockets are used rather than UNIX sockets.

> Why does it lock up?
> Only 1 app at a time can access the fingerprint scanner.
This should not cause the system to lock up; it should cause your app to delay briefly and either continue with your request or return to you with an error. If you can duplicate some other result reliably, please share details.

> If someone also can upload and create an eclipse project it would be must easier to import and view their source code they post. I tried but eventually gave up cause of so many problems.
The eclipse projects for these examples are very simple -- with the exception of the .project you have everything you need in the example directories. Worst case is you can create a new Android project and replace its manifest, sources and resources with those provided by the examples. Then point the build path at your tsm.jar and you'll be ready to go.

What I meant was that if an app is asking for the fingerprint reader (not the app entirely, but actively asking for the FP reader scan), and motorola does something in the background with the FP scanner (on atrix), it can lock it up. This was heavily apparent on Atrix 1.8.3 but in the new update it seems to have been mostly fixed.
Errors: If you bring up the window with anything but lap-verify or get-app-secret, the window will lock up (and i think fingerprint reader will lock up as well - if you return to the lockscreen you'll see it never finishes initializing it) I can attempt to reproduce this error but I want to finish some development I am doing now.

Quote:
Originally Posted by heilpern

com.authentec.TrueSuiteMobile drives the UI, directly or indirectly depending on exactly what's going on (indirectly in the case of the lock screen, for example). If this package is killed it will restart with the next fingerprint operation however it will disrupt any currently active verification attempt (causing the requesting app to receive an error -- probably the USER_CANCELED error).

I never really kill it except if it locks up. Haven't tested what it returns (perhaps null)

Quote:
Originally Posted by heilpern

Here's something you can do to experiment if you're using StoreCredential -- swipe one of your existing fingers (the index fingers) and you'll store data to that particular finger. Swipe a different finger (multiple times as prompted) and eventually (after three swipes if all goes well) you'll be asked which finger you just enrolled (and your credential will be stored to that finger). This new finger can be used for subsequent Store Credential requests (without the automatic training session) and to release data stored with Get Secret... but only the index fingers can be used to unlock the Atrix.

Yeah, in the original thread I had that image posted... It's in the framework but it never was used... I'm not sure if it was there for this purpose or was just cancelled at the end because it was incredibly confusing... I don't get why you would need all those credentials. It's not like your phone will get passed around that much. You swipe new fingers just like you would if you were registering a finger, then you choose the finger... but the accuracy of the 'pick a finger' one is pretty bad.
10th August 2011, 03:19 PM |#5  
Member
Thanks Meter: 2
 
More
Would love to see a test apk where we can try this out...

Nothing available right now?
10th August 2011, 05:15 PM |#6  
Mgamerz's Avatar
OP Senior Member
Thanks Meter: 131
 
More
My application works with the FP scanner... its not done yet though.
These are the included APK's that are the code samples they use:
Download tsm-apk-pack.zip from Host-A
11th August 2011, 04:32 PM |#7  
Member
London
Thanks Meter: 4
 
More
Will it support HTC Desire HD? It won't right?
11th August 2011, 10:39 PM |#8  
Mgamerz's Avatar
OP Senior Member
Thanks Meter: 131
 
More
The fingerprint scanner is a hardware device, just like a laptop fingerprint reader. Its not touchscreen, unfortunately.

Trolling from my ATRIX 4G on probably the crappiest main US carrier
12th August 2011, 07:03 PM |#9  
Junior Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by Mgamerz

I can't register my application, it's failing with code 6 - (System Error)
I encountered this one myself when using my Api key for com.mgamerzproductions.gibbertalk - I changed it to com.mgamerzproductions.gibbertalk.testing and it no longer worked. They did tell me this in the email that it is only for one package - so make sure you choose wisely, or bribe the people giving out the API keys to give you another one. I wish it was more specific (API_KEY_NOT_AUTHENTIC or something)

I agree that a more telling error code would be a better option. Error 6 is eAM_STATUS_ACCESS_ERROR but that value can be returned for other problems as well.

Note that if a generic API key is needed, TSM-0E08085A-1210171A-001A7465-632E7473 can be used if you name your package com.authentec.tsmgetsecret. You cannot post that package to the Market however if you want a means of creating a test APK with a neutral package name that package/key combination will work.
The Following User Says Thank You to heilpern For This Useful Post: [ View ] Gift heilpern Ad-Free
12th August 2011, 07:48 PM |#10  
Mgamerz's Avatar
OP Senior Member
Thanks Meter: 131
 
More
Has AuthenTec claimed that package name on the market...?
they probably should or someone might take that package...
12th August 2011, 08:34 PM |#11  
Junior Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by Mgamerz

Has AuthenTec claimed that package name on the market...?
they probably should or someone might take that package...

Yes, it's already claimed in an unpublished but uploaded entry.
Post Reply Subscribe to Thread

Tags
android, atrix, fingerprint, scanner, sdk

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes