public interface

INotifier

com.c2call.sdk.pub.notifictaions.INotifier
Known Indirect Subclasses

Class Overview

This interface provides methods to handle Android Notifications An implementation if this interface has to be set in the singleton of C2CallSdk

Summary

Public Methods
abstract void blockNotications(Object key, EnumSet<NotificationType> types)
Block specific notifications, i.e.
abstract boolean cancelNotification(Context context, String notificationIdKey)
abstract void clearNotifications(Context c)
abstract String getMessageNotificationId(SCMessageNotification notification)
abstract String getMessageSender(Context context, SCMessageNotification n)
abstract String getMessageText(Context context, String sender, SCMessageNotification n)
abstract String getMessageTicker(Context context, String sender, SCMessageNotification n)
abstract int getNotifcationIcon(NotificationType type)
abstract INotificationFactory getNotificationFactory()
abstract int getNotificationId(String c2callId)
Get or create the notification id for a given key.
abstract String getTitle(Context context, SCBaseNotification notification)
Create title for notification
abstract boolean isBlocked(NotificationType type)
Check if specific notification type is blocked (i.e.
abstract PendingIntent onCreateMessageIntent(Context context, SCMessageNotification n)
Create an intent for given notification
abstract PendingIntent onCreateMissedCallIntent(Context context, SCMissedCallNotification n)
Create an intent for given notification
abstract void onMessageNotification(Context context, SCMessageNotification n)
Will be called if a new message notification should be shown
abstract void onMissedCallNotification(Context context, SCMissedCallNotification n)
Will be called if a new missed call notification should be shown
abstract void unblockNotifications(Object key)
Unblocks all notifications that were previously blockey by blockNotications(Object, EnumSet) for given key

Public Methods

public abstract void blockNotications (Object key, EnumSet<NotificationType> types)

Block specific notifications, i.e. these notifications should not be shown until unblocked by unblockNotifications(Object)

Parameters
key Key to which the blocked types are associated with
types Notification types to block

public abstract boolean cancelNotification (Context context, String notificationIdKey)

public abstract void clearNotifications (Context c)

public abstract String getMessageNotificationId (SCMessageNotification notification)

public abstract String getMessageSender (Context context, SCMessageNotification n)

public abstract String getMessageText (Context context, String sender, SCMessageNotification n)

public abstract String getMessageTicker (Context context, String sender, SCMessageNotification n)

public abstract int getNotifcationIcon (NotificationType type)

public abstract INotificationFactory getNotificationFactory ()

Returns
  • The notification factory that builds notifications

public abstract int getNotificationId (String c2callId)

Get or create the notification id for a given key. If the key is already know this method should return the associated notification id, otherwise it should create a new unique id and associate it with the given key

Parameters
c2callId Id to lookup
Returns
  • The notification id

public abstract String getTitle (Context context, SCBaseNotification notification)

Create title for notification

Parameters
context Context
notification The notification to get the title for
Returns
  • Title of notification

public abstract boolean isBlocked (NotificationType type)

Check if specific notification type is blocked (i.e. should not be shown)

Parameters
type The type of notifications to check
Returns
  • Whether notification type is blocked

public abstract PendingIntent onCreateMessageIntent (Context context, SCMessageNotification n)

Create an intent for given notification

Parameters
context Context.
n The notification data that should be shown
Returns
  • Intent for notification

public abstract PendingIntent onCreateMissedCallIntent (Context context, SCMissedCallNotification n)

Create an intent for given notification

Parameters
context Context.
n The notification data that should be shown
Returns
  • Intent for notification

public abstract void onMessageNotification (Context context, SCMessageNotification n)

Will be called if a new message notification should be shown

Parameters
context Context.
n The notification data that should be shown

public abstract void onMissedCallNotification (Context context, SCMissedCallNotification n)

Will be called if a new missed call notification should be shown

Parameters
context Context.
n The notification data that should be shown

public abstract void unblockNotifications (Object key)

Unblocks all notifications that were previously blockey by blockNotications(Object, EnumSet) for given key