public class

MapstedInAppNotificationsApi

extends Object
implements InAppNotificationsApi
java.lang.Object
   ↳ com.mapsted.inapp_notification.MapstedInAppNotificationsApi

Class Overview

Use MapstedInAppNotificationsApi to show in app notification widget. The widget will be show in the fragmentContainerView that you will provide in the constructor. The widget is InAppNotificationsFragment fragment.

Summary

Public Constructors
MapstedInAppNotificationsApi(FragmentManager supportFragmentManager, FragmentContainerView fragmentContainerView)
Public Methods
boolean addViewAndClickListener(InAppNotificationsApi.Listener listener)
Register a callback whenever an item is viewed or clicked from in-app notification bar
FragmentManager getFragmentManager()
Retrieve the fragment manager
void removeFromInAppNotificationBar(String id)
Remove an item from the widget
boolean removeViewAndClickListener(InAppNotificationsApi.Listener listener)
Unregister a callback whenever an item is viewed or clicked from in-app notification bar
void showInInAppNotificationBar(InAppNotification inAppNotification, boolean showInFront)
show provided item in the widget
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.mapsted.inapp_notification.InAppNotificationsApi

Public Constructors

public MapstedInAppNotificationsApi (FragmentManager supportFragmentManager, FragmentContainerView fragmentContainerView)

Parameters
supportFragmentManager fragmentManager
fragmentContainerView the widget will be shown in this view.

Example:

Public Methods

public boolean addViewAndClickListener (InAppNotificationsApi.Listener listener)

Register a callback whenever an item is viewed or clicked from in-app notification bar

Parameters
listener the listener
Returns
  • whether or not added correctly

public FragmentManager getFragmentManager ()

Retrieve the fragment manager

public void removeFromInAppNotificationBar (String id)

Remove an item from the widget

Parameters
id id of the inapp notification. getId()

public boolean removeViewAndClickListener (InAppNotificationsApi.Listener listener)

Unregister a callback whenever an item is viewed or clicked from in-app notification bar

Parameters
listener the listener
Returns
  • whether or not removed correctly

public void showInInAppNotificationBar (InAppNotification inAppNotification, boolean showInFront)

show provided item in the widget

Parameters
inAppNotification item to show
showInFront by default, item are placed in the end. set this to true if you want the item to be shown in the front.