Search code examples
androiddeep-linkingemail-verification

how to notify android app that email verification link clicked?


I have a difficult situation in mobile i need help with. I am working on a android app that allows the user to change their email address after they have successfully logged in. This is part of the account settings menu.

Let's go through the flow so i can show you the issue:

  1. user logs in successfully as [email protected]

  2. user goes to account settings area and changes their email to [email protected].

  3. The android app notifies the user that a verification email has been sent to their new email [email protected]

  4. User leaves the app and goes to their email app like gmail app and finds the verification email and clicks the link inside to verify the account.

  5. Behind the scenes transparent to user, clicking the verification link updates the back end server to update the database with new email address.

  6. User returns to the android app but is still logged in as [email protected]

How can i notify the application that the user verified the email ? I was thinking one approach could be that after user clicks on the verification link and back end DB is updated, that i could redirect them with a deep link into the app and update the new email that way but need advice as user could open the verification link from their pc or anywhere else.


Solution

  • Deep linking is better idea also you need to receive notification in application that email is verified and that notification you would fire or make it background by setting notification type you can do that one, so all device will receive that notification which you logged with same user.

    Thanks, i hope this will work.