This is the sending side.
private void onInviteClicked() {
Map<String, String> referralParams = new HashMap<String, String>();
referralParams.put("Name", "Devesh Agrawal");
referralParams.put("id", "1000");
Intent intent = new AppInviteInvitation.IntentBuilder(getString(R.string.invitation_title))
.setMessage(getString(R.string.invitation_message))
.setDeepLink(Uri.parse(getString(R.string.invitation_deep_link)))
.setCustomImage(Uri.parse(getString(R.string.invitation_custom_image)))
.setCallToActionText(getString(R.string.invitation_cta))
.setAdditionalReferralParameters(referralParams)
.build();
startActivityForResult(intent, REQUEST_INVITE);
}
This is the end of the reception:
private void processReferralIntent(Intent intent) {
String invitationId = AppInviteReferral.getInvitationId(intent);
String deepLink = AppInviteReferral.getDeepLink(intent);
Log.d(TAG, "Found Referral: " + invitationId + ":" + deepLink);
((TextView) findViewById(R.id.deep_link_text))
.setText(getString(R.string.deep_link_fmt, deepLink));
((TextView) findViewById(R.id.invitation_id_text))
.setText(getString(R.string.invitation_id_fmt, invitationId));
}
I have the following queries:
- What is the use of an invitation to end an appointment? can it be used for any purpose?
- I am sending a map for additionalReferralParameters, how to access these values at the end of the reception?
Please help me with this.
source
share