In-App Notification Module

Enabling The Module

You can enable it as described here.

In-App Messages

In order to show your user an in-app message, you need to create a targeting action on RMC panel and fill the related fields first. Then, you can trigger the targeting action you created as show below and show it to the user via your mobile application.

Kotlin

val parameters = HashMap<String, String>() RelatedDigital.customEvent( context = context, pageName = "In-App Message", properties = parameters, parent = activity )

Java

HashMap<String, String> parameters = new HashMap<String, String>(); RelatedDigital.customEvent( context, "In-App Message", parameters, activity );

The parameter parent above cannot be null. If you do not enter an Activity value for paremeter parent, the message is not going to be shown.

If you use a rule in your targeting action on RMC, you should enter it via properties map. Example,

parameters["OM.inapptype"] = "full_screen_image"

parameters.put("OM.inapptype", "full_screen_image");

Click Action Callback

When the user clicks on the item that includes a link to navigate to another page, you can define what is going to happen by setting a callback method. You should set this callback via RelatedDigital.setInAppButtonInterface() method.

Kotlin

val buttonCallback: InAppButtonInterface = object : InAppButtonInterface { override fun onPress(link: String?) { //Write the code that is going to be executed after the click } } RelatedDigital.setInAppButtonInterface(buttonCallback) val parameters = HashMap<String, String>() RelatedDigital.customEvent( context = context, pageName = "In-App Message", properties = parameters, parent = activity )

Java

After each click, the SDK calls the callback method that was entered and then removes it. Thus, you should set the callback via setInAppButtonInterface for each targeting action that you want to use a callback for click action. Then, you can call customEvent() method.

Custom Font Usage

  1. First of all, you need to create a font folder (unless you have one) under res folder in your project.

     

  2. You can add your font files into the folder (font) you created.

     

  3. Lastly, you should enter the name of the font file without extension in the user interface.


In-App Message Templates

Pop-up - Image, Title, Text & Button

Mini - Icon & Text

Full Screen Image

Pop-up - Image, Title, Text & Button

Mini - Icon & Text

Full Screen Image

 

 

Full Screen Image & Button

Pop-up - Image, Title, Text and Button

Pop-up Survey

 

 

 

Pop-up - Text and Button NPS

Native Alert & Action Sheet

1-10 Point NPS

 

 

Survey with Star & Second pop-up

Half Screen Image

Carousel

 

 

 

 

Favori Attributes Action

You can use the favorite attributes that you define on RMC->targeting actions in your application as shown below.

Kotlin

Java

Story Manager

First of all, you should put StoryRecyclerView into wherever you want in your layout.

Theni you should define a StoryItemClickListener object and determine what action is going to be taken after a story is clicked.

Then, you should call setStoryAction() or setStoryActionId() methods with StoryItemClickListener object you defined.

Kotlin

Java

with ID

Kotlin

Java

You can use setStoryActionWithRequestCallback() or setStoryActionIdWithRequestCallback() methods instead if you want to enter a StoryRequestListener object. This parameter is for you to take a precaution in case of something goes wrong and the request fails. In this case, you should make the visibility of StoryRecyclerView View.GONE so that there will not be an empty area in your layout.

Kotlin

Java

with ID

Kotlin

Java

App Banner

You should put BannerRecyclerView into a layout file that you prefer in your project. An example usage:

After putting BannerRecyclerView, you should access the object in the related program code (Java or Kotlin) and you should call the method requestBannerCarouselAction() on this object. This method takes 1 mandatory (context: Context) and 3 optional parameters (properties: HashMap<String, String>?, bannerRequestListener: BannerRequestListener?, bannerItemClickListener: BannerItemClickListener?).

properties is for adding extra query parameters you want, to the request.

bannerRequestListener is for making the visibility of BannerRecyclerView object View.GONE or View.VISIBLE if something goes wrong in the process so that the related area on the screen won’t be empty.

bannerItemClickListener is for getting the control when the user clicks on a banner. If you don’t want the SDK to direct the user to the link automatically, you can use this interface.

You can find an example usage that includes all parameters, below:

Kotlin

Java

Recommendations Action

You can trigger recommendations action in your application as shown below:

Kotlin

Java

Also, you can input some filters and extra parameters to getRecommendations() method.

Kotlin

Java

In order the clicks of the recommendations to be reflected on the panel, you should send the “qs” value of the recommendation that is clicked by the user to the server via trackRecommendationClick() method.

Kotlin

Java

Mail Subscription Form

You can trigger the mail subscription form that you defined on RMC panel as shown below:

Kotlin

Java

SpinToWin

You can trigger the spin-to-win action that you defined on RMC panel as shown below:

Kotlin

Java

Çarkıfelek Yarım Görünüm

Çarkıfelek Tam Görünüm

Çarkıfelek Yarım Görünüm

Çarkıfelek Tam Görünüm

 

 

ScratchToWin

You can trigger the scratch-to-win action that you defined on RMC panel as shown below:

Kotlin

Java

Product Stat Notifier

You can trigger the product stat notifier action that you defined on RMC panel as shown below:

Kotlin

Java

Drawer

You can trigger the drawer action that you defined on RMC panel as shown below:

Kotlin

Java

 

 

Example Application

RelatedDigital Example Application

Copyright 2020 Related Digital