jaumard / sms_autofill

Flutter plugin to provide SMS code autofill support
MIT License
289 stars 184 forks source link

No SIM #85

Open dekadevelop opened 3 years ago

dekadevelop commented 3 years ago

How can we handle the case when there is no SIM, like for tablets? At the moment it shows the popUp for 1sec and then it hides it. Would it be possibile to avoid this? thank you :)

grahamsmith commented 3 years ago

Seems like an interesting bug! @dekadevelop not sure which pop up but my PR is for the Phone number hint - does this happen anywhere else?

jaumard commented 3 years ago

@dekadevelop you can try the master branch and let us know if it's fixed now thanks to @grahamsmith :)

marcodecarolisidt commented 3 years ago

I tried it works, but I found it a little different compared to the previous version. When I tap the textField and I fire the phone hint, the pop-up comes out after I started typing the first digit, which can be confusing. I guess there is more delay to check for the sim card? Maybe I'm wrong but I haven't noticed this delay before.

If you notice the same, it could be fixed having a separate method to check for SIM card, that we can run onInit() in the background. So when the user taps we already know if ask for the hint or not :)

grahamsmith commented 3 years ago

Thanks for testing it.

I just want to make sure I 100% understand your test results.

The original issue is gone and autofills reliably.

New issue is there is a delay when tapping the field resulting in different behaviour.

I added the SIM check after another issue. It could cause a delay. If I spin up a branch with performance logs would you be willing to post some results?

Thinking we could init sooner for that check but let's see if that's the issue first.