Package io.rong.push.notification
Class RongNotificationInterface
-
- All Implemented Interfaces:
public class RongNotificationInterfaceFCM Push Passthrough Pop-up Notification Bar
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumRongNotificationInterface.SoundType
-
Constructor Summary
Constructors Constructor Description RongNotificationInterface()
-
Method Summary
Modifier and Type Method Description static voidsendNotification(Context context, PushNotificationMessage message)Sends a notification. static voidsendNotification(Context context, PushNotificationMessage message, PushType pushType, int left)Sends a notification. static voidremoveNotification(Context context, int notificationId)static NotificationcreateNotification(Context context, String title, PendingIntent pendingIntent, String content, RongNotificationInterface.SoundType soundType, String channelId)static voidremoveAllNotification(Context context)Clears all push notifications for the application. static voidremoveAllPushNotification(Context context)Clears all offline push notifications. static voidremoveAllPushServiceNotification(Context context)Clears all push notifications from the background push service. static NotificationcreateNotification(Context context, String title, PendingIntent pendingIntent, String content, RongNotificationInterface.SoundType soundType, boolean isShowDetail)static voidsetNotificationSound(Uri uri)-
-
Method Detail
-
sendNotification
@Deprecated() static void sendNotification(Context context, PushNotificationMessage message)
Sends a notification. Both push notifications and background notifications are ultimately sent through this method.
- Parameters:
context- The contextmessage- The notification message
-
sendNotification
static void sendNotification(Context context, PushNotificationMessage message, PushType pushType, int left)
Sends a notification. Both push notifications and background notifications are ultimately sent through this method.
- Parameters:
context- The contextmessage- The notification messagepushType- The push notification type
-
removeNotification
static void removeNotification(Context context, int notificationId)
-
createNotification
static Notification createNotification(Context context, String title, PendingIntent pendingIntent, String content, RongNotificationInterface.SoundType soundType, String channelId)
-
removeAllNotification
static void removeAllNotification(Context context)
Clears all push notifications for the application.
- Parameters:
context- The context.
-
removeAllPushNotification
static void removeAllPushNotification(Context context)
Clears all offline push notifications. However, notifications sent from the developer backend will remain intact and will not be cleared.
- Parameters:
context- The context.
-
removeAllPushServiceNotification
static void removeAllPushServiceNotification(Context context)
Clears all push notifications from the background push service. The background push service refers to the broadcast push service in the developer's backend.
- Parameters:
context- The context.
-
createNotification
static Notification createNotification(Context context, String title, PendingIntent pendingIntent, String content, RongNotificationInterface.SoundType soundType, boolean isShowDetail)
-
setNotificationSound
static void setNotificationSound(Uri uri)
-
-
-
-