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

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

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

origin: chat-sdk/chat-sdk-android

public static Message newMessage (MessageType type, Thread thread) {
  return newMessage(type.ordinal(), thread);
}
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());
}
origin: chat-sdk/chat-sdk-android

return Observable.create((ObservableOnSubscribe<MessageSendProgress>) e -> {
  final Message message = AbstractThreadHandler.newMessage(MessageType.Image, thread);
origin: chat-sdk/chat-sdk-android

public Observable<MessageSendProgress> sendMessageWithLocation(final String filePath, final LatLng location, final Thread thread) {
  return Observable.create((ObservableOnSubscribe<MessageSendProgress>) e -> {
    final Message message = AbstractThreadHandler.newMessage(MessageType.Location, thread);
co.chatsdk.core.baseAbstractThreadHandlernewMessage

Popular methods of AbstractThreadHandler

  • addUsersToThread
  • createThread
  • getThreads
  • implSendMessage
    /* Convenience method to save the message to the database then pass it to the token network adapter
  • loadMoreMessagesForThread
  • removeUsersFromThread
  • sendMessage

Popular in Java

  • Reactive rest calls using spring rest template
  • notifyDataSetChanged (ArrayAdapter)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • requestLocationUpdates (LocationManager)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Join (org.hibernate.mapping)
  • From CI to AI: The AI layer in your organization
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