Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work on PWA WEB #181

Open
rhomayouni opened this issue Apr 17, 2024 · 7 comments
Open

Doesn't work on PWA WEB #181

rhomayouni opened this issue Apr 17, 2024 · 7 comments

Comments

@rhomayouni
Copy link

rhomayouni commented Apr 17, 2024

Hello, the pinput library works on android correctly, but it doesn't work on mobile browser(it doesn't read opt from sms and fill the field), please help me.

@Tkko
Copy link
Owner

Tkko commented Apr 17, 2024

Hi, what exactly isn't working?

@rhomayouni
Copy link
Author

rhomayouni commented Apr 17, 2024

In pwa mode on the mobile phone (android) when the OTP is received by SMS, the received code is not placed in the box.

Is there a special setting needed for the browser on the mobile phone?

@Tkko
Copy link
Owner

Tkko commented Apr 17, 2024

That's an expected behavior. The SMS retriever API only works in compiled Android app.

@rhomayouni
Copy link
Author

rhomayouni commented Apr 17, 2024

i checked in 2 modes: smsUserConsentApi, smsRetrieverApi , both of them are same. in pub.dev, you told support WEB

@Tkko
Copy link
Owner

Tkko commented Apr 17, 2024

Sorry, forgot to mention, none of these APIs are working on the Web. If you send supposed SMS format the code will pop up on the keyboard.

The supported SMS formats aren't clear, but it seems to work in English most of the time.
For example:

Code 466345

@rhomayouni
Copy link
Author

rhomayouni commented Apr 17, 2024

thanks man, Even the received code is not placed at the top of the keyboard area.

@Tkko
Copy link
Owner

Tkko commented Apr 17, 2024

Hmm, Just checked and it's not working on Android Web. But it has to be working out of the box with TextField if you pass
autofillHints: [AutofillHints.oneTimeCode],

https://api.flutter.dev/flutter/material/TextField/autofillHints.html
https://api.flutter.dev/flutter/services/AutofillHints/oneTimeCode-constant.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants