chat-sdk / chat-sdk-android

Chat SDK Android - Open Source Mobile Messenger

Home Page:https://chatsdk.co

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sending audio message issue

basims opened this issue · comments

  1. Is the bug present in the demo Chat SDK project? Didn't check

  2. What modifications have you made to the Chat SDK? No changes made

  3. Android Version: 10.0

  4. Steps taken to reproduce the problem: Sending an audio message

  5. Expected result: Should be able to send an audio message

  6. Actual result: Getting exception - java.lang.NullPointerException: Attempt to invoke interface method 'io.reactivex.Completable sdk.chat.core.handlers.AudioMessageHandler.sendMessage(android.content.Context, java.io.File, java.lang.String, long, sdk.chat.core.dao.Thread)' on a null object reference

  7. Comments:

@basims It helps me to know if this issue is present in the core library. Can you please check? Can you also post your Chat SDK initialization code and check to see if there are any stack traces logged in the console.

@bensmiley Thank you for this wonderful library and for your reply. I am able to fix the issue by adding a line .addModule(AudioMessageModule.shared()) in configuration. One more doubt, can I use AudioMessageModule without purchasing a license, if I am implementing the audio message feature on my own? I just want to use the method ChatSDK.audioMessage().sendMessage. recording the audio, showing it in chat and playback are handled by me. I am not using any ChatSDK UI modules.

Hi @basims you would need to have a license if you were to include the AudioMessageModule class OR :chat-sdk-pro-message-audio Gradle dependency in your project. If you use any of the code from the audio message module then you need a license or to support the project through Github Sponsors or Patreon using at least the coffee tier.

If you don't use the module and re-implement all the functionality independently using your own unique approach and code, then you would not need a license.