- Home /
Read otp automatically from phone text?
I have created an app for VR. Now I am trying to read received OTP automatically. And complete authentication process. Is it possible on Unity? i got otp on my phone text.
Comment
Hi,
I believe there are no direct implementation to receive and read OTP directly. How ever for android, you can build an android plugin (extending the UnityPlayerActivity and custom manifest file) and inside the native Java code, you can implement a BroadcastReceiver to receive the OTP and pass it to unity code through. Here is the link to tutorial showing how to receive and OTP in android using java. Integrate the necessary part from this to your unity android plugin.
Hope it helps.
Your answer
![](https://koobas.hobune.stream/wayback/20220612144429im_/https://answers.unity.com/themes/thub/images/avi.jpg)