Hi,

Thanks for answering.
In the end I was able to solve by changing the code as follows:
                        if (u.seguridadBiometrica.get() && 
Fingerprint.isAvailable()) {
                            Fingerprint.addPassword(idioma.getMensaje77(), 
"TEMPUS_KEY", Long.toString(System.currentTimeMillis())).onResult((success, 
err) -> {
                                if (err != null) {
                                    
ToastBar.showErrorMessage(idioma.getMensaje78() + ": " + err.getMessage());
                                } else {
                                    inicio();
                                }
                            });
                        } else {
                            inicio();
                        }
To answer your questions:
It is for Android.
I would like to use the Dialog, but I imagine that it cannot be done since 
the call is asynchronous.
El Sunday, July 11, 2021 a la(s) 2:36:38 AM UTC-5, Shai Almog escribió:

> Hi,
> is the callback invoked at all? You can show a toast if it is. Are we 
> talking about Android here?
>
> On Saturday, July 10, 2021 at 7:43:31 PM UTC+3 [email protected] wrote:
>
>> Hi,
>>
>> I am testing with the example that is in github, I changed the add method 
>> and I cannot detect the cancellation.
>>
>> Code:
>>         addItem.addActionListener(evt -> {
>>             if (!Fingerprint.isAvailable()) {
>>                 ToastBar.showErrorMessage("Fingerprint not avaiable on 
>> this platform");
>>                 return;
>>             }
>>             AsyncResource<Boolean> r = Fingerprint.addPassword("Adding 
>> secure item to keystore", keyName.getText(), keyValue.getText());
>>             if (r.isCancelled()) {
>>                 Dialog.show("Error", "Cancelled process", "Continuar", 
>> null);
>>             }
>>         });
>>
>> Thanks
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/62d96073-7968-481a-b03f-afe870bc1018n%40googlegroups.com.

Reply via email to