Answer the question
In order to leave comments, you need to log in
How to open a specific application activity when the user clicks on a link?
I implement the functionality "Forgot your password?" using Firebase Auth. A link is sent to the mail, when clicked, a primitive form opens with one field for entering a new password. I want to open a specific activity in the application, where the user must enter a password and then confirm it. How to implement such functionality? I read that this is implemented using dynamic links, but I did not find specific examples. Thanks in advance for your help.
Answer the question
In order to leave comments, you need to log in
I worked about half a year ago with this technology and there were some problems with it, but I think that they should have been fixed. here are articles
https://medium.com/mindorks/working-with-firebase-...
https://medium.com/@1991chester/deep-links-fc993c7242af
https://firebase.apptractor.ru/firebase-na -android...
and of course https://firebase.google.com/docs/dynamic-links/and...
you can try this project https://github.com/firebase/quickstart-android/tre...
Thanks for the help. Implemented opening an activity when a user clicks on a link. Now another problem has arisen. I need to get parameters from this link. To do this, I need to get it first. I do it like this:
FirebaseDynamicLinks.getInstance()
.getDynamicLink(getIntent())
.addOnSuccessListener(pendingDynamicLinkData -> {
if (pendingDynamicLinkData != null){
String link = pendingDynamicLinkData.getLink().getUserInfo();
Log.d("MyPlanner", link);
}
})
.addOnFailureListener(exception -> {
Log.d("MyPlanner", exception.getMessage());
});
<activity android:name=".view.activity.SaveNewPasswordActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="coditrafalsky.page.link"
android:scheme="https"
android:path="/reset"/>
</intent-filter>
</activity>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question