Giter VIP home page Giter VIP logo

Comments (13)

simonsmiley64 avatar simonsmiley64 commented on August 20, 2024

Hi @SimplisticApps,

The audio messages shouldn't make the app go more slowly as it is just an image message with addition information available. The message is sent as normal and when the user clicks play the audio URL is downloaded and played.

The cells also shouldn't be loaded if they are not on screen meaning that, at any one time, only 3-6 messages should be being loaded.

It would be good to understand how your app is fitting together. Is your app based around sending large amounts of audio messages or do users send them as they would with a normal chat app.

Simon

from chat-sdk-android.

RyanElliott94 avatar RyanElliott94 commented on August 20, 2024

The app is simply a normal messaging app but instead of just text messages with an attachment, the user can only send audio messages or audio with text attached, which means the whole conversation list will consist of audio messages with or without text but because of that, the whole list is really slow after sending about 5 audio messages

from chat-sdk-android.

RyanElliott94 avatar RyanElliott94 commented on August 20, 2024

Okay so i have had an extra look and it looks like the audio file gets uploaded to the server and the cache directory and when you play the message, it will read from the cache rather than server but because every audio message is uploaded to cache and read from cache it makes the entire message list extremely slow which is a massive problem as my app is all about sending audio messages! I tried also enabling SaveAudioToDir to see if that helped but it doesn't so what i need to know is how to ONLY upload and read the url of the sent audio file to the server or at the very least to temporally upload the message to cache then delete it afterwards so it can read from the server!

Seems confusing so hope you understand what i mean!

Thanks

from chat-sdk-android.

kykrueger avatar kykrueger commented on August 20, 2024

Hey!
I have a bit of time right now, and the problem seems clear. I'll see if I can find a quick modification to dump the old audio messages from the cache.

Is this issue only found in the Android SDK?

-- Kyle

from chat-sdk-android.

RyanElliott94 avatar RyanElliott94 commented on August 20, 2024

Other than features, there isn't any other issues but the same does go with sending images and videos but again that is only an issue when loads are sent in one conversation

from chat-sdk-android.

RyanElliott94 avatar RyanElliott94 commented on August 20, 2024

@kykrueger Had any luck yet?

from chat-sdk-android.

kykrueger avatar kykrueger commented on August 20, 2024

Unfortunately not, I am having some trouble with my emulator at the moment. Might need to take a better look this weekend. However, if the performance issue is across both SDKs, im just going to tag @bensmiley and @simonsmiley64 to see if I could get their opinions if we could make this change on both SDKs.

from chat-sdk-android.

RyanElliott94 avatar RyanElliott94 commented on August 20, 2024

Okay, fair enough! I'll keep looking myself to see if i come up with anything.

Hopefully a solution will be found and as always thanks for the help

from chat-sdk-android.

RyanElliott94 avatar RyanElliott94 commented on August 20, 2024

Right i don't know if this will of any use but i looked at the logcat while i was running my app through my phone and i had a lot of this: I/Choreographer: Skipped 86 frames! The application may be doing too much work on its main thread. coming up, it's not always 86 frames but i do think it could be partly why the app runs so slowly! I've only noticed it come up on the conversation activity

from chat-sdk-android.

RyanElliott94 avatar RyanElliott94 commented on August 20, 2024

Right I'm confident that i have successfully fixed the issue. It looks like MediaPlayer was slowing it right down! So instead of playing the audio internally, it now opens a default player and the list is not only smoother but the messages send in under a second whereas before, it would take nearly a minute to send.

The reason why i think it was all to do with the MediaPlayer is because when you watch the LogCat when running the app, it is doing way to much and takes up a lot of resources!

from chat-sdk-android.

bensmiley avatar bensmiley commented on August 20, 2024

Would it be possible for you to send me code changes you made? [email protected] Then we could improve the main codebase. If you do, we can give you a gift voucher to set against further add-ons.

from chat-sdk-android.

RyanElliott94 avatar RyanElliott94 commented on August 20, 2024

Done, it's been sent with the subject "ChatBubbleAudioView.java changes"

from chat-sdk-android.

bensmiley avatar bensmiley commented on August 20, 2024

Fixes on #46

from chat-sdk-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.