public class

SCNotifier

extends Object
implements INotifier
java.lang.Object
   ↳ com.c2call.sdk.pub.notifictaions.SCNotifier

Summary

Public Constructors
SCNotifier()
Public Methods
synchronized void blockNotications(Object key, EnumSet<NotificationType> types)
Block specific notifications, i.e.
boolean cancelNotification(Context context, String notificationIdKey)
void clearNotifications(Context context)
String getMessageNotificationId(SCMessageNotification notification)
String getMessageSender(Context context, SCMessageNotification n)
String getMessageText(Context context, String sender, SCMessageNotification n)
String getMessageTicker(Context context, String sender, SCMessageNotification n)
int getNotifcationIcon(NotificationType type)
INotificationFactory getNotificationFactory()
int getNotificationId(String c2callId)
Get or create the notification id for a given key.
String getTitle(Context context, SCBaseNotification n)
Create title for notification
synchronized boolean isBlocked(NotificationType type)
Check if specific notification type is blocked (i.e.
PendingIntent onCreateMessageIntent(Context context, SCMessageNotification n)
Create an intent for given notification
PendingIntent onCreateMissedCallIntent(Context context, SCMissedCallNotification n)
Create an intent for given notification
void onMessageNotification(Context context, SCMessageNotification n)
Will be called if a new message notification should be shown
void onMissedCallNotification(Context context, SCMissedCallNotification n)
Will be called if a new missed call notification should be shown
synchronized void unblockNotifications(Object key)
Unblocks all notifications that were previously blockey by blockNotications(Object, EnumSet) for given key
Protected Methods
Notification onCreateMessageNotification(Context context, SCMessageNotification n)
void submitNotification(Context context, int notificationId, Notification notification)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.c2call.sdk.pub.notifictaions.INotifier

Public Constructors

public SCNotifier ()

Public Methods

public synchronized 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 boolean cancelNotification (Context context, String notificationIdKey)

public void clearNotifications (Context context)

public String getMessageNotificationId (SCMessageNotification notification)

public String getMessageSender (Context context, SCMessageNotification n)

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

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

public int getNotifcationIcon (NotificationType type)

public INotificationFactory getNotificationFactory ()

public 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 String getTitle (Context context, SCBaseNotification n)

Create title for notification

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

public synchronized 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 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 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 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 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 synchronized void unblockNotifications (Object key)

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

Protected Methods

protected Notification onCreateMessageNotification (Context context, SCMessageNotification n)

protected void submitNotification (Context context, int notificationId, Notification notification)