Tabnine Logo
AbstractThreadHandler.implSendMessage
Code IndexAdd Tabnine to your IDE (free)

How to use
implSendMessage
method
in
co.chatsdk.core.base.AbstractThreadHandler

Best Java code snippets using co.chatsdk.core.base.AbstractThreadHandler.implSendMessage (Showing top 1 results out of 315)

origin: chat-sdk/chat-sdk-android

/**
 * Preparing a text message,
 * This is only the build part of the send from here the message will passed to "sendMessage" Method.
 * From there the message will be uploaded to the server if the upload fails the message will be deleted from the local db.
 * If the upload is successful we will update the message entity so the entityId given from the server will be saved.
 * The message will be received before sending in the onMainFinished Callback with a Status that its in the sending process.
 * When the message is fully sent the status will be changed and the onItem callback will be invoked.
 * When done or when an error occurred the calling method will be notified.
 */
public Observable<MessageSendProgress> sendMessageWithText(final String text, final Thread thread) {
  return Observable.create((ObservableOnSubscribe<MessageSendProgress>) e -> {
    final Message message = newMessage(MessageType.Text, thread);
    message.setText(text);
    e.onNext(new MessageSendProgress(message));
    ObservableConnector<MessageSendProgress> connector = new ObservableConnector<>();
    connector.connect(implSendMessage(message), e);
  }).subscribeOn(Schedulers.single());
}
co.chatsdk.core.baseAbstractThreadHandlerimplSendMessage

Javadoc

/* Convenience method to save the message to the database then pass it to the token network adapter send method so it can be sent via the network

Popular methods of AbstractThreadHandler

  • addUsersToThread
  • createThread
  • getThreads
  • loadMoreMessagesForThread
  • newMessage
  • removeUsersFromThread
  • sendMessage

Popular in Java

  • Creating JSON documents from java classes using gson
  • onCreateOptionsMenu (Activity)
  • requestLocationUpdates (LocationManager)
  • addToBackStack (FragmentTransaction)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Permission (java.security)
    Legacy security code; do not use.
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • JFrame (javax.swing)
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now