Indicate if paired function didn't succeed

HI,
I am using the bluetooth extension by @Taifun .
I saw that there is event that trigger when device is finished to paired.

image

But what if it didn't succeed to pair? how can I know it?

check the ErrorOccurred event
errorOccurred

Taifun

HI, not working. Do you have idea what can I do? @Taifun fun

What happens, if you try the example project?
Taifun


just keep showing this message: "trying to pair..." @Taifun

Usually during the pairing process you get a dialog window on both devices to confirm a pairing code. You have to confirm both before the pairing process can succeed

Taifun

If I did scan and it found my device and than I turn off the device. the app dont know the device turned off. than I try to pair the device and than it cant tell me an error that it couldn't paired the device and stuck on keeping try to pair the device. I want it to show me an error that it couldn't paired the device. @Taifun

Your test does not make sense
First do a scan, then pair the device
If you turn off the other device in between then obviously pairing will not work anymore

Taifun

yes I know, but how can the app know the pairing didn't work? i am using a progress dialog when the app try to do the pairing but if the pairing didn't succeed how can the app know to stop the progress dialog? @Taifun

Just add some logic yourself
Use a clock component and after a given time (probably 1 minute) check, if the pairing succeeded. If not, display an error message.
You can use the AfterPairing event to store the successful pairing in a global variable.

Taifun

Ok, thanks
this is what I thought to do, but I thought that there is maby more efficient way.
thank you for all

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.