tencent cloud

Feedback

Last updated: 2024-10-23 11:51:35

    Large numbers of vendor conflicts occur after the integration with both IM and TPNS. What should I do?

    Currently, IM uses the vendor JAR package provided by TPNS. You can solve this problem by referring to the IM Offline Push (Android) documentation and replacing relevant dependency packages.

    What if a message fails to be received or is lost?

    One-to-one chat message
    Check that the message was sent successfully.
    Check that the recipient has logged in successfully.
    Check that the specified conversation that sent the message is consistent with the recipient’s conversation.
    Group message
    Check that the message was sent successfully.
    Check that the recipient has logged in successfully.
    Check that the recipient is a group member.
    Whether it’s a C2C message or a group message, if the problem cannot be resolved through the above steps, you need to continue to check the following:
    1. Check that a message listener has been registered.
    2. Check that the sender added elem to the message when sending the message (check the return value of addElement when sending a message).
    3. For Android users, check that multiple message listeners have been registered and that true was returned in the message listeners.

    What should I do if offline push messages fail to be received?

    APNs Refer to Offline Push (iOS) to check the following:
    Check that the correct certificate has been uploaded to the Tencent Cloud console.
    Check that the token was successfully uploaded to Tencent Cloud after successful login.
    Check that the correct certificate ID was reported when you reported the token.
    Check that foreground/background switch events have been reported correctly.
    Check if the message contains only TIMCustomElem, with the desc attribute being left empty.
    Check if the deduplication identifiers such as MsgRandom were set to the same value, resulting in push failures due to deduplication.
    For a group message, check that no alert has been enabled.
    Android Refer to Offline Push Configuration to check the following:
    Check that the correct push certificate has been uploaded.
    Check that the token has been reported successfully.
    When not using third-party offline push (Huawei, Xiaomi, or Meizu), check that the QALService process is active. If the process is not active, offline push messages will fail to be received. In that case, the auto-start permissions of the system need to be relied on.
    In the case of multiple processes, check that IM SDK initialization was performed only in the main process. If not, you need to modify the configuration to ensure that IM SDK initialization is performed only in the main process.
    When using third-party offline push (such as Xiaomi, Huawei, and Meizu), you can first use the corresponding third-party console to directly push a message and check whether the mobile phone can receive the message. If the mobile phone fails to receive the message, there are two possible reasons:
    1.1.1 The user failed to correctly integrate third-party offline push. Please refer to the relevant documentation.
    1.1.2 The mobile phone is not compatible with the offline push. For example, some Huawei mobile phones cannot receive Huawei offline push.
    When using OPPO offline push, check the MasterSecret, instead of AppSecret, was entered in the Android push certificate on the IM console.
    When using either APNs push or Android offline push, if the problem cannot be located through the above steps, you need to continue to check the following issues:
    1. Check that the recipient ID is consistent with the target user ID of the push message.
    2. Check that you have enabled the offline push listener (Android).
    3. Check that notifications are enabled. For iOS, see Offline Push (iOS); for Android, see Offline Push Configuration.
    4. Check that the message is an online message sent through the sendOnlineMessage API or that MsgLifeTime was set to 0 during push through a RESTful API.
    5. Check that the offline notification is enabled for the message. For iOS, see Configuring Custom Push Notification Sounds; for Android, see Offline Push Configuration.
    6. If you still cannot identify the problem, you can provide the relevant information to tech support personnel for troubleshooting.

    What’s the storage period of an IM message?

    Historical message storage is available for one-to-one chat messages and non-audio-video group messages. You can log in to the IM console to modify the relevant configuration. The default configuration for different packages is as follows:
    Developer edition: 7 days, with no extension supported.
    Standard edition: 7 days, with extension supported.
    Premium edition: 30 days, with extension supported.
    The extension of the historical message storage period is a value added service. For more information, see Value-added Service Pricing.

    Why does it show that messages are sent successfully even though the senders are blocklisted?

    When you enable Show "Sent successfully" After Sending Messages in the Blocklist Check section in the IM console, blocklisted users will be prompted that the messages are sent successfully when they send messages, but the recipients will not receive the messages. When you disable this feature, blocklisted users will be prompted that message sending fails when they send messages and the SDK will receive error code 20007. For more information, see the Blocklist check section in Feature Configuration.

    How to convert an image address into the downloadable domain name format by using COS?

    You need to upload the image yourself. If the image uses COS private read, you need to get a signed URL to obtain the download permission (Download via Pre-Signed URL).

    What are the rules for unique identification of IM messages?

    IM uses sg_id, msgID, and msgKey as the unique identifiers of one-to-one and group chat messages.
    Different types of IM messages and SDKs use different unique identifiers:
    For client SDKs, one-to-one and group chat messages are identified by msg_id in the following format: tinyid-clientTime-random.
    For web SDKs of v2.17.0 or earlier, one-to-one and group chat messages are identified by msgID in the following format: Conversation ID-msgSeq-random-1 (messages sent by me) / 0 (messages sent by others).
    For web SDKs of v2.18.0 or later, one-to-one and group chat messages are identified by msgID in the following format: tinyid-clientTime-random.
    For server SDKs, one-to-one messages are identified by msgKey in the following format: clientSeq_random_serverTime.
    For server SDKs, group chat messages are identified by "Group ID + msgSeq".

    Do audio-video groups and community groups support @ messages?

    Audio-video groups do not support sending @ messages. Community groups support @ a single user but do not support @ all users.

    What is the difference between Message modification, Message extension, and Message reaction?

    Message function
    Whether Ultimate edition is required
    Storage method
    Pull method
    Will concurrency settings conflict?
    Message modification
    Not required
    Modify information is stored directly in the message body, sharing message storage, with a maximum of 12K per message
    Modify information is returned directly through the message body, no need for separate pull
    There will be conflicts
    Message extension
    Required
    Extension information is stored independently, with a maximum of 300 extensions per message, and a maximum of 1K per extension
    Extension information needs to be pull separately, only supports single message pull
    The same extension settings will conflict, different extension settings will not conflict
    Message reaction
    Required
    Reaction information is stored independently, with a maximum of 10 reactions per message, and a maximum of 100 users per reaction
    Reaction information needs to be pull separately, supports batch pull of multiple messages
    No conflicts

    Message modification:

    You can call the modifyMessage(Android / iOS & Mac / Windows) interface to modify the original Message content.
    Advantage: Simple and easy to use.
    Disadvantage:
    If multiple users modify a message at the same time, it may cause modify conflicts.
    If the modified message content is too large, it may cause the message size to exceed the limit (maximum 12K per message).
    Summary: Message modification is suitable for single-user operations and small storage requirements, such as order message scenarios, where the order status can be stored and modified through the cloudCustomData field of the modified message.

    Message extension:

    You can call the setMessageExtensions (Android / iOS & Mac / Windows) interface to add extension information to a message.
    Advantage:
    Multiple extensions can be set for a single message, and different extensions can be set simultaneously without conflict.
    Extension information is stored independently and does not occupy the message body size, with a maximum of 300 extensions per message and a maximum of 1K per extension.
    Disadvantage:
    There will be conflicts when setting the same extension simultaneously.
    Extension information needs to be pulled separately using the getMessageExtensions (Android / iOS & Mac / Windows) interface.
    Extension information does not support batch pull of multiple messages.
    Summary: Message extension is suitable for multi-user operations and large storage scenarios, such as Questionnaire survey scenarios, where each extension information is a collection of {userID: Questionnaire survey content}, and different users filling out the questionnaire survey will not conflict.

    Message reaction:

    You can call the addMessageReaction (Android / iOS & Mac / Windows) interface to add reaction information to a message.
    Advantage:
    Multiple reactions can be added to a single message, and reactions can be added without conflict.
    Reaction information is stored independently and does not occupy the message body size, with a maximum of 10 reactions per message and a maximum of 100 users per reaction.
    Reaction information supports batch pull of multiple messages.
    Supports separate pull of user list using the same reaction.
    Disadvantage:
    Reaction information needs to be pulled separately using the getMessageReactions (Android / iOS & Mac/ Windows) interface.
    Reaction information only supports setting Reaction ID, other information is not supported, and the SDK will automatically count the use of the same reaction.
    Summary: Message reaction is suitable for scenarios that require counting user lists, such as emoji reaction scenarios. Users only need to pass in the Emoji ID when adding an emoji reaction, and the SDK will automatically count the user list using the same Emoji ID.
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support