Public Member Functions | |
V2TIMOfflinePushInfo () | |
V2TIMOfflinePushInfo (const V2TIMOfflinePushInfo &) | |
~V2TIMOfflinePushInfo () | |
V2TIMOfflinePushInfo | ( | const V2TIMOfflinePushInfo & | ) |
~V2TIMOfflinePushInfo | ( | ) |
V2TIMString title |
Notification title(This field must be set for custom message offline push)
V2TIMString desc |
Notification content.
V2TIMString ext |
Extended field passed through by offline push The party that receives the offline push can get this field in UIApplicationDelegate -> didReceiveRemoteNotification -> userInfo, and use this field to make UI jump logic.
bool disablePush |
Whether to disable push (enabled by default)
V2TIMIOSOfflinePushType iOSPushType |
Set the offline push type for iOS systems Default value is V2TIM_IOS_OFFLINE_PUSH_TYPE_APNS
bool ignoreIOSBadge |
Whether to exclude an offline push notification from the badge count (valid only for iOS). If the parameter is set to true, on an iOS device, the app's unread badge will not increase after the notification is sent.
V2TIMString iOSSound |
Set the sound effect for offline push (valid only for iOS). If "sound" is kIOSOfflinePushNoSound, no sound will be played when a notification is received. If "sound" is kIOSOfflinePushDefaultSound, the system notification sound will be played when a notification is received. To customize the sound, link an audio file to your Xcode project and set iOSSound to the filename (including the extension).
V2TIMString AndroidSound |
Set the sound effect for offline push (valid only for Android and supported in imsdk 6.1 and later versions).
Only Huawei and Google phones support configuring sound effects for offline push notifications. To configure offline push sound effects for Xiaomi phones, please see https://dev.mi.com/console/doc/detail?pId=1278%23_3_0. For FCM notifications on Google phones, in order for the configured sound effect to take effect, you need to call setAndroidFCMChannelID to set the channel ID first.
To customize AndroidSound: The name of the audio file in the raw directory of your Android project (leave out the extension)
V2TIMString AndroidOPPOChannelID |
Configure the channel ID for offline push on OPPO phones with Android 8.0 and later.
V2TIMString AndroidFCMChannelID |
Configure the channel ID for FCM offline push on phones with Android 8.0 and later.
V2TIMString AndroidXiaoMiChannelID |
Configure the channel ID for offline push on Xiaomi phones with Android 8.0 and later.
int AndroidVIVOClassification |
Set the notification type for offline push on vivo phones (to be deprecated). The vivo push service optimized its message classification rules on April 3, 2023. We recommend you use setAndroidVIVOCategory instead. Offline push notification type on vivo phones. 0: operation notification; 1 (default): system notification.
V2TIMString AndroidVIVOCategory |
Set the notification type for offline push on vivo phones. For details, see https://dev.vivo.com.cn/documentCenter/doc/359. The vivo push service optimized its message classification rules on April 3, 2023. We recommend you use this API now instead of setAndroidVIVOClassification.
V2TIMString AndroidHuaWeiCategory |
Set the offline push notification type for Huawei phones. For details, see https://developer.huawei.com/consumer/cn/doc/development/HMSCore-Guides/message-classification-0000001149358835.
V2TIMString AndroidOPPOCategory |
Set the offline push notification type for OPPO phones. For details, see https://open.oppomobile.com/new/developmentDoc/info?id=13189 Communication and service types include: "IM", "ACCOUNT", etc; Content and marketing types include: "NEWS", "CONTENT", etc;
int AndroidOPPONotifyLevel |
Set the message reminder level for push notification bar in OPPO phones, see details:https://open.oppomobile.com/new/developmentDoc/info?id=13189 Before it takes effect, you need to set AndroidOPPOCategory to specify the category as IM type messages. Message reminder levels: 1,Notification bar;2,Notification bar + lock screen (default);16,Notification bar + lock screen + banner + vibration + ringtone
V2TIMString AndroidHuaWeiImage |
Set the notification image for Huawei device offline push. The protocol used must be HTTPS. Here is an example of the value: https://example.com/image.png The image file should be smaller than 512KB and the recommended dimensions are 40dp x 40dp with a corner radius of 8dp. Images that exceed the recommended dimensions may be compressed or displayed incompletely. It is recommended to use the JPG/JPEG/PNG image formats.
V2TIMString AndroidHonorImage |
Set the notification image for Honor device offline push. The protocol used must be HTTPS. Here is an example of the value:https://example.com/image.png The icon file size must be smaller than 100KB. The recommended dimensions for the icon are 160px x 160px with a corner radius of 32px. Icons that exceed the recommended dimensions may be compressed or displayed incompletely.
V2TIMString AndroidFCMImage |
Set the notification image for Google FCM device offline push. Display as a large icon when the message is not expanded, and show as a large image when the message is expanded. The protocol used must be HTTPS. Here is an example of the value:https://example.com/image.png The icon file size must be smaller than 1 MB. Icons that exceed the specified size may be compressed or displayed incompletely.
V2TIMString iOSImage |
Set the notification image for APNs offline push, leveraging the iOS 10 Service Extension feature to download and display it in the popup.The protocol used must be HTTPS. Here is an example of the value:https://example.com/image.png Limitations and restrictions:
V2TIMString HarmonyImage |
Set the notification image for offline push by Harmony device. The URL must use the HTTPS protocol. Example value: https://example.com/image.png. Supported image formats include png, jpg, jpeg, heif, gif, bmp. The image dimensions should be less than 25000 pixels (length * width).
V2TIMString HarmonyCategory |
Set the offline push notification category for HarmonyOS devices. For details, see https://developer.huawei.com/consumer/cn/doc/HMSCore-Guides/message-classification-0000001149358835.
bool ignoreHarmonyBadge |
Whether to exclude an offline push notification from the badge count (valid only for Harmony). If the parameter is set to YES, on an Harmony device, the app's unread badge will not increase after the notification is sent.