Currently I'm working on user registration form which uses email confirmation.
I've managed to start my app using link in the email, but I have no clue on getting the link which user clicked to start my app.
The link is somewhat like this :
www.lalala.com/CfmEmail?Token=12345&code=ASDfghJKLzxc&Email=kevin#gmail.com
I want to break it down to get its individual value like
Token = 12345, Email = kevin#gmail.com and Code = ASDfghJKLzxc
Please do notify me for any further essential information..
It's known as deep linking. For implementation check developer.android.com
Related
I am using Firebase in my app and one of the things that I added recently was the option to send a reset password link.
When the user receives the email it looks as follows:
Is there any option to read certain data from my Firebase firestore and display it in the email?
For example, when user1 registered to the app he needed to set an email and a username (say: user1_cool). Now, when user1 sent himself a reset link I had like it to show:
Hello user1_cool,
...
From this link, it seems impossible but still was wondering if someone found a way.
Right now my email is as follows:
<p>Hello %DISPLAY_NAME%,</p>
<p>Follow this link to reset your password for your %EMAIL% account.</p>
<p><a href='%LINK%'>%LINK%</a></p>
<p>If you didn’t ask to reset your password, you can ignore this email.</p>
<p>Thanks,</p>
<p>NeighborBook team</p>
Thank you
Well, as far as I know,
Is there any option to read certain data from my Firebase firestore
and display it in the email?
No, Currently there is no possibility of that in firebase ...
But since you mentioned about user setting a user name I am writing an alternative for this
If you want to show user name in %DISPLAY_NAME% you can modify user display name like this if you want
UserProfileChangeRequest profileUpdates = new UserProfileChangeRequest.Builder()
.setDisplayName("Custom User Name Goes Here")
.build();
This will modify user display name and when you use the same template for the email the username set by the user will be sent instead of usual display name
Note: This is recommended and should be only used in this
specific case
For more info visit : UserProfileChangeRequest.Builder
You can only change a few things about the emails that Firebase sends, as otherwise this functionality could be abused to deliver irrelevant content.
If you want full control over the emails that are sent, you'll need to implement your own email delivery. You can still use Firebase Authentication's handler for the links in that email, but following the documentation on customizing the email handler.
I want to create user at Mesibo but i am facing some issues :
Sorry, we can't find that page It seems the page you’re looking for doesn’t exist. Maybe you’re on the wrong track, maybe you found a broken link. Who knows?
Please anyone here to help related to these issues and also help to complete my this task and I am using following URL for creating a user at "Mesibo".
"https://mesibo.com/api/api.php?token=cn9cvk6gnm15e7lrjb2k7ggggax5h90n5x7dp4sam6kwitl2hmg4cmwabet4zgdw&op=useradd&appid=com.mesibo.demoapp&addr=18005550001"
token = Application Token
appid = Android or iOS app id (for example, com.mesibo.xxx). In case of web, just pass, ‘web’ as appid. Note that, for security reasons, the token generated for a particular appid will only be usable on app matching that appid.
addr = end point address, for example, a user phone number.
Thanks
Instead of "https://mesibo.com/api/api.php?..." use "https://api.mesibo.com/api.php?token=..."
I have to implement Invite and Earn functionality in my Android application.
What I have to do is : User can share the link to anyone on social media,
On receiving the link, another user can click the link to get the application installed using that link.
After the user installs the app using that link, the sender or the invitee can be rewarded. How this can be possible ?
So far, I go through the Firebase's Dynamic Link concepts and found some demo. But, still confused in it.
Can you please guide me what another stuffs I have to gone through to achieve such thing ?
Is it possible in react-native. If not then How can I achieve that in Android ?
Thanks
You can Integrate Refer & earn in your react native application using react-native-branch
Just following the documentation of integrating branch.io in your react-native application and you will be good to go.
Documentation for react-native-branch
Here is also a github example for your reference Example
Since you have already gone through firebase, therefore it would be easy for you to use the procedure based on the same.
Here's the roadmap for getting started
Set Up
Follow the Initial Setup Guide to configure adding the project to Firebase
Configure the android/app/build.gradle and MainApplication.java to add the firebase dynamic links
Configure the Firebase invites package
If you haven't configured deep link , take a look at this tutorial
Usage
SendInvitation Component
import firebase from 'react-native-firebase';
const title = 'Demo Firebase Invites'
const message = 'You have been invite to join the xxxxx app'
const invitation = new firebase.invites.Invitation(title, message);
invitation.setDeepLink(// Your App's Configured deep link)
invitation.setCustomImage(// Image Uri)
invitation.setCallToActionText(// Set the text on the invitation button on the email)
// ... On some button click
sendInvitation = async () => {
const invitationIds = await firebase.invites().sendInvitation(invitation)
// Invitation Id's can be used to track additional analytics as you see fit.
}
Handle Receive Invitation
Either use getInitialInvitation method or listen for invitations using the onInvitation listener.
At the root of your app you can add
import firebase from 'react-native-firebase';
firebase.invites()
.getInitialInvitation()
.then((invitation) => {
if (invitation) {
// app opened from an Invitation
// Set the rewards points here and update data in your firebase
} else {
// app NOT opened from an invitation
// No rewards for this user
}
});
The invitation contains the following objects which will help you with the queries on updating the sender reward points.
deepLink: string
invitationId: string
You can route to specific page using the deep link, and also get custom data passed from the invitee such as a random userId to create the user on the firebase.
Use invitationId to query other stuff.
For implementing this feature developers need to learn App links. And For implementing this you can use react-native-deep-linking.
I am giving you a little overview, You need to add some XML in the manifest file for android according to your needs and you will handle it using linking.
I have searched SO and the web for a similar issue, and while others appear to have encountered this problem, their solutions are not working for me.
DFL parameter in Firebase Dynamic Links Builder
Starting with Android, I'm attempting to implement the Dynamic Links for my app. The app requires additional parameters on the dynamic link, so I'm manually constructing the link based on the information here: https://firebase.google.com/docs/dynamic-links/create-manually.
I have created my link in the following manner (code abbreviated for purposes of this post)
Uri.Builder builder = new Uri.Builder()
.scheme("https")
.authority(AppPrivate.Invitation.APP_CODE + ".app.goo.gl")
.path("/")
.appendQueryParameter("link", link)
.appendQueryParameter("apn", AppPrivate.PACKAGE)
.appendQueryParameter("dfl", desktopLink);
For my use case the link and desktopLink parameters are the same - they are actual working URLs on my website. Regardless of what device the user hits with the dynamic link, it should perform the desired action. Again, for purposes of simply getting this working, I've linked to our primary website (https://www.mytravelerapp.com).
When I send the invitation from my Android device, I generate an intent based on the code sample here: https://github.com/firebase/quickstart-android/blob/master/invites/app/src/main/java/com/google/firebase/quickstart/invites/MainActivity.java
return new AppInviteInvitation.IntentBuilder(context.getString(R.string.content_trip_invitation_title))
.setMessage(message)
.setDeepLink(uri)
.setCustomImage(Uri.parse(AppPrivate.Invitation.TRIP_INVITE_DEEP_LINK_IMAGE))
.setCallToActionText(context.getString(R.string.content_trip_invitation_cta))
.build();
However, when I receive the invitation via email on my desktop, it always goes to the Play Store listing, no matter what I've added to the initial deep link (DFL, AFL). Here's a sample of the link from the "call to action" button from the email:
https://a3d4u.app.goo.gl/i/225742434763-3bd2c2fa-45f0-4ed8-aca3-37760d27d971
I've not yet implemented the receivers in the android app to listen for incoming links, so I cannot confirm whether or not the deep link behaves appropriately on that platform.
Any recommendations or suggestions on what I'm missing with the desktop link are greatly appreciated.
Thanks!
You're actually wrapping a dynamic link in another dynamic link. Invites itself generates a dynamic link, which doesn't have your DFL parameter, so it is redirecting to the store.
You could try shortening the dynamic link you generate, and sharing via the regular share dialog rather than using Invites.
I want to make an app which will pay users money on downloading another apps from within my app, so how can i track that user had downloaded that app or not, and i want to make sure that after user registered in the downloaded app then only he/she is going to get money, so how can i do this.
Some examples of these types of apps are : Ladooo app, TaskBucks App, Pokkt App,
I found following links which helped me somehow but it is not clear :
http://android-developers.blogspot.in/2010/12/analytics-for-android-apps.html
https://developers.google.com/analytics/devguides/collection/android/v4/
you can retrieve the list of installed applications in the following manner
// retrieve the list of installed applications
List<ApplicationInfo> apps = mPm.getInstalledApplications(0);
can get the package name of the app through
String pkg = apps.get(i).packageName;
I know this is not the full answer but i hope this helps
Not Sure About your requirement or not have idea about playstore api but can give simple logic for this, hope it will help.
When any user share or refer the application for download to other user, create one unique id from the serverside(combination with user who refer) in simple word redirect url to playstore with uniqueid and share that link with intent.
When user register you can check or if redirect url for playstore is via your server than you can send money or points when redirect link callback on server.
check this
or you can refer some codes on github:
here or here