whorlwind
whorlwind copied to clipboard
Adding Fingerprint after call to .read() gives READY state
In SampleActivity
, there's a "How How did you do that!?" toast. Here's how:
- Launch the Whorlwind sample app
- Click "READ" on a row
- Navigate to Android's fingerprint settings
- Add a new fingerprint
- Navigate back to Whorlwind sample app
- Tap READ again
- Toast appears
I haven't had a chance to debug any further but will update here if I find any more.
This is probably a bug in the sample app. It should probably cancel the fingerprint authentication when the activity is paused.
I think it does - I have to click the "READ" button again for it to start listening to the sensor again anyhow.
I'm getting a crash when I try step 6 as seen on #50
So I looked things up:
First, every time one subscribes to whorldwind#read()
, the each time newly created FingerprintAuthOnSubscribe
, prepare the whorldwind.keystore which actually clears the storage if necessary.
Actually adding fingerprints to the device invalidates the key we have. This means that every time the keystore is prepared, it will clear the storage.
Second, although we're gonna clear the storage, the adapter isn't updated on resume. Because when the activity paused, and started again, the sample apps subscribes only when a tap event has been emitted by the adapter (not on resume); which means the storage gets cleared every time the user tap an item for the first time, not on loading.
On creation, this isn't a problem because when we seed the storage, the keystore is prepared by the write happening via the seeding.
- Not sure how to fix the adapter.
- Not sure if we should also change the API of wholdwind to let the user proactively be sure the keys are still valid.