Reputation: 164
I am developing an android app, in which i require user to verify himself for the first time using sms based verification. In this user gives me his mobile number and i send him an OTP, which he can enter and verifies himself.
As soon as user enters the mobile, i read his SMS and on getting the desired SMS i extract OTP and automatically verify him. Now in order to do in newer android permissions model, i have to ask to user to give me SMS permissions. So i have following two part questing.
1) When should i ask for those permissions. For ex: if i ask him after he enters his mobile number, then let's say user accepts the permissions after the sms came, then it is of no use. If i ask him upfront when he comes to my app he might not understand the context why i need that permission.
2) Should i really auto verify the user or the better UX is to stay away from asking SMS permissions and let the user enter his OTP manually ?
Upvotes: 1
Views: 858
Reputation: 704
When user enter mobile number and tap on submit button then ask him for permission and after user selection, request server for OTP (inside onRequestPermissionResult).
Upvotes: 0
Reputation:
You can ask for permission when User reaches SMS screen and then:
Hope it helps!
Upvotes: 2