IMSDK
IM features a comprehensive suite of solutions including global access, one-to-one chat, group chat, message push, profile and relationship chain hosting, and account authentication. It also provides complete app access and backend management APIs.
V2TIMOfflinePushInfo

Public Member Functions

 V2TIMOfflinePushInfo ()
 
 V2TIMOfflinePushInfo (const V2TIMOfflinePushInfo &)
 
 ~V2TIMOfflinePushInfo ()
 

Data Fields

V2TIMString title
 
V2TIMString desc
 
V2TIMString ext
 
bool disablePush
 
V2TIMIOSOfflinePushType iOSPushType
 
bool ignoreIOSBadge
 
V2TIMString iOSSound
 
V2TIMString AndroidSound
 
V2TIMString AndroidOPPOChannelID
 
V2TIMString AndroidFCMChannelID
 
V2TIMString AndroidXiaoMiChannelID
 
int AndroidVIVOClassification
 
V2TIMString AndroidVIVOCategory
 
V2TIMString AndroidHuaWeiCategory
 
V2TIMString AndroidHuaWeiImage
 
V2TIMString AndroidHonorImage
 
V2TIMString AndroidFCMImage
 
V2TIMString iOSImage
 
V2TIMString HarmonyImage
 
V2TIMString HarmonyCategory
 
bool ignoreHarmonyBadge
 

Constructor & Destructor Documentation

◆ V2TIMOfflinePushInfo() [1/2]

◆ V2TIMOfflinePushInfo() [2/2]

◆ ~V2TIMOfflinePushInfo()

Field Documentation

◆ title

V2TIMString title

Notification title(This field must be set for custom message offline push)

◆ desc

Notification content.

◆ 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.

◆ disablePush

bool disablePush

Whether to disable push (enabled by default)

◆ iOSPushType

Set the offline push type for iOS systems Default value is V2TIM_IOS_OFFLINE_PUSH_TYPE_APNS

◆ ignoreIOSBadge

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.

◆ iOSSound

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).

◆ AndroidSound

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)

◆ AndroidOPPOChannelID

V2TIMString AndroidOPPOChannelID

Configure the channel ID for offline push on OPPO phones with Android 8.0 and later.

◆ AndroidFCMChannelID

V2TIMString AndroidFCMChannelID

Configure the channel ID for FCM offline push on phones with Android 8.0 and later.

◆ AndroidXiaoMiChannelID

V2TIMString AndroidXiaoMiChannelID

Configure the channel ID for offline push on Xiaomi phones with Android 8.0 and later.

◆ AndroidVIVOClassification

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.

◆ AndroidVIVOCategory

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.

◆ AndroidHuaWeiCategory

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.

◆ AndroidHuaWeiImage

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.

◆ AndroidHonorImage

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.

◆ AndroidFCMImage

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.

◆ iOSImage

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:

  • Image: Supports JPEG, GIF, PNG formats with a maximum size of 10 MB. Instructions for use:
  • To enable the iOS 10 Service Extension feature, you need to open the "mutable-content" property in the IM console.
  • The key value to retrieve the iOSImage resource is "image".

◆ HarmonyImage

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).

◆ HarmonyCategory

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.

◆ ignoreHarmonyBadge

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.