Landing Page Customization on Android¶
To provide more engaging experience to the invited users, you can customize the content of the landing page for each Smart Invite sent from the client side.
Configuration¶
Possible configuration options:
- Title: Title of the page.
- Description: Short description.
- Image: Landing page image. Can be an image URL or instance of
android.graphics.Bitmap
. - Video: Landing page video to be displayed instead of an image. At the moment we support only YouTube video URLs.
Example:
-
Customize content via Smart Link parameters:
```java tab=”Java”
Bitmap landingPageImage = …; // get your image hereLinkParams linkParams = new LinkParams();
linkParams.put(LinkParams.KEY_CUSTOM_TITLE, “Hey friend!”);
linkParams.put(LinkParams.KEY_CUSTOM_DESCRIPTION, “Check out this record!”);
linkParams.put(LinkParams.KEY_CUSTOM_IMAGE, landingPageImage);// Alternatively, you can add a YouTube video instead of an image:
linkParams.put(LinkParams.KEY_CUSTOM_YOUTUBE_VIDEO, “https://www.youtube.com/watch?v=dQw4w9WgXcQ”);
```kotlin tab="Kotlin" val landingPageImage: Bitmap = ... // get your image here val linkParams = LinkParams() linkParams[LinkParams.KEY_CUSTOM_TITLE] = "Hey friend!" linkParams[LinkParams.KEY_CUSTOM_DESCRIPTION] = "Check out this record!" linkParams[LinkParams.KEY_CUSTOM_IMAGE] = landingPageImage // Alternatively, you can add a YouTube video instead of an image: linkParams[LinkParams.KEY_CUSTOM_YOUTUBE_VIDEO] = "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
-
Send customized invitation via GetSocial Data API:
```java tab=”Java”
InviteCallback inviteCallback = …; // create callback
InviteContent inviteContent = …; // create invite message content
GetSocial.sendInvite(InviteChannelIds.EMAIL, inviteContent, linkParams, inviteCallback);
```kotlin tab="Kotlin" val inviteCallback : InviteCallback = ... // create callback val inviteContent : InviteContent = ... // create invite message content GetSocial.sendInvite(InviteChannelIds.EMAIL, inviteContent, linkParams, inviteCallback)
Or via GetSocial UI:
```java tab=”Java”
GetSocialUi.createInvitesView()
.setLinkParams(linkParams)
.show();
```kotlin tab="Kotlin" GetSocialUi.createInvitesView() .setLinkParams(linkParams) .show()
Next Steps¶
- Setup mobile app to receive Smart Links on Android, iOS and Unity.
- Check the Smart Links best practices.
- Customize your Smart Link Domain.