Package io.rong.push.notification
Class RongNotificationInterface
-
- All Implemented Interfaces:
public class RongNotificationInterface
FCM Push Passthrough Pop-up Notification Bar
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enum
RongNotificationInterface.SoundType
-
Constructor Summary
Constructors Constructor Description RongNotificationInterface()
-
Method Summary
Modifier and Type Method Description static void
sendNotification(Context context, PushNotificationMessage message)
Sends a notification. static void
sendNotification(Context context, PushNotificationMessage message, PushType pushType, int left)
Sends a notification. static void
removeNotification(Context context, int notificationId)
static Notification
createNotification(Context context, String title, PendingIntent pendingIntent, String content, RongNotificationInterface.SoundType soundType, String channelId)
static void
removeAllNotification(Context context)
Clears all push notifications for the application. static void
removeAllPushNotification(Context context)
Clears all offline push notifications. static void
removeAllPushServiceNotification(Context context)
Clears all push notifications from the background push service. static Notification
createNotification(Context context, String title, PendingIntent pendingIntent, String content, RongNotificationInterface.SoundType soundType, boolean isShowDetail)
static void
setNotificationSound(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)
-
-
-
-