So, I am trying to make an android app which has both Login and Register Activities, I have configured the RegisterActivity to store the data into the firebase realtime database in the following way :
and I am using Firebase PhoneAuth to register the user. The problem comes when I am designing the LoginActivity, in which after the user enters the mobile number, I somehow have to check whether if he/she is already registered or not, if registered log him/her in IF not then I forward him/her to the RegisterActivity. I was unable to find a way to do it.
Is there any way I can detect whether a phone number is already registered or not?