Error when publishing messages / Android

Hello …
when I publish message to a channel I’m getting error , the error code is 15000 , and the message is 'Custom business logic the execution has been terminated because it didn’t complete in permitted time - 20 seconds "
And after I’m publishing the message I’m saving it to data table (because the message will be deleted from the channel after few seconds for that I’m saving it to data table )

And thanks :slight_smile:

Hello!
This exception is thrown if it takes too long to execute your custom code. Do you have such problems with other event handlers, or only with this one? Try re-checking your code for this event.
Best regards, Alex

I don’t have any custom code !!

and thanks for reply

Ok, then can you please provide here a piece of code where you publish and save the message? Also verify in console BL tab that you don’t have any handlers for messaging or data service either in debug or production mode.

OK wait please I will post the code here

Backendless.Messaging.publish(getResources().getString(R.string.channelname), message, options,
        new AsyncCallback<MessageStatus>() {
            @Override
            public void handleResponse(MessageStatus messageStatus) {
                Toast.makeText(getActivity(), "sent ",Toast.LENGTH_LONG).show();
                Backendless.Persistence.of(Messages.class).save(message, new AsyncCallback<Messages>() {
                    @Override
                    public void handleResponse(Messages messages) {
                        Toast.makeText(getActivity(), "sent 2",Toast.LENGTH_LONG).show();


                    }
                    @Override
                    public void handleFault(BackendlessFault backendlessFault) {
                            Toast.makeText(getActivity(),backendlessFault.toString() + "    first",Toast.LENGTH_LONG).show();      
                    }
                });
            }
            @Override
            public void handleFault(BackendlessFault backendlessFault) {
                for (int i = 0; i < 7; i++) {
                    Toast.makeText(getActivity(), backendlessFault.toString() + "     second", Toast.LENGTH_LONG).show();
                }
            }
        });

there is custom code n the production section !! I’ve deleted it and I will try now to run the app

it’s working now thank you

Please I want to ask question : if I save object is string and it contains emoji then in the table the emojis are shown like question mark how I can display the emojis ?

Can you please show your “Messages” class and provide an example of string you have problems with?

here is a photo of my "Messages " class and as you can see in the message column there is question marks … and those are the emoji

Ok, thank you. We shall investigate this problem.

ok thanks

Hello!

We have investigated this issue. Our database charset is utf8_general_ci and emojis cannot be properly saved for this encoding.
For your case, at the time of saving message you can substitute emoji with custom valid char sequence. When message is going to be displayed you can look for char sequence and conversely substitude with emoji.

Regards, Denys

ok thank you