Tabnine Logo
MXSession.startEventStream
Code IndexAdd Tabnine to your IDE (free)

How to use
startEventStream
method
in
org.matrix.androidsdk.MXSession

Best Java code snippets using org.matrix.androidsdk.MXSession.startEventStream (Showing top 11 results out of 315)

origin: matrix-org/matrix-android-sdk

/**
 * Shorthand for {@link #startEventStream(EventsThreadListener, NetworkConnectivityReceiver, String)} with no eventListener
 * using a DataHandler and no specific failure callback.
 *
 * @param initialToken the initial sync token (null to sync from scratch).
 */
public void startEventStream(String initialToken) {
  checkIfAlive();
  startEventStream(null, mNetworkConnectivityReceiver, initialToken);
}
origin: tijder/SmsMatrix

@Override
public void onStoreReady(String s) {
  session.getDataHandler().checkPermanentStorageData();
  session.startEventStream(store.getEventStreamToken());
  session.getDataHandler().addListener(evLis);
}
origin: matrix-org/matrix-android-sdk

/**
 * This methods init the event stream and check for initial sync
 *
 * @param session    the session to sync
 * @param withCrypto true if crypto is enabled and should be checked
 */
public void syncSession(@Nonnull final MXSession session, final boolean withCrypto) throws InterruptedException {
  final Map<String, Boolean> params = new HashMap<>();
  final int sizeOfLock = withCrypto ? 2 : 1;
  final CountDownLatch lock2 = new CountDownLatch(sizeOfLock);
  session.getDataHandler().addListener(new MXEventListener() {
    @Override
    public void onInitialSyncComplete(String toToken) {
      params.put("isInit", true);
      lock2.countDown();
    }
    @Override
    public void onCryptoSyncComplete() {
      params.put("onCryptoSyncComplete", true);
      lock2.countDown();
    }
  });
  session.getDataHandler().getStore().open();
  session.startEventStream(null);
  await(lock2);
  Assert.assertTrue(params.containsKey("isInit"));
  if (withCrypto) {
    Assert.assertTrue(params.containsKey("onCryptoSyncComplete"));
  }
}
origin: tijder/SmsMatrix

  session.startEventStream(store.getEventStreamToken());
  session.getDataHandler().addListener(evLis);
} else {
origin: matrix-org/matrix-android-sdk

bobSession2.startEventStream(null);
origin: matrix-org/matrix-android-sdk

bobSession2.startEventStream(null);
origin: matrix-org/matrix-android-sdk

bobSession2.startEventStream(null);
mTestHelper.await(lock2);
Assert.assertTrue(results.containsKey("onInitialSyncComplete"));
origin: matrix-org/matrix-android-sdk

aliceSession2.startEventStream(null);
mTestHelper.await(lock1b);
Assert.assertTrue(results.containsKey("onInitialSyncComplete"));
origin: matrix-org/matrix-android-sdk

bobSession2.startEventStream(null);
mTestHelper.await(lock4b);
Assert.assertTrue(results.containsKey("onInitialSyncComplete"));
origin: matrix-org/matrix-android-sdk

aliceSession2.startEventStream(null);
origin: matrix-org/matrix-android-sdk

aliceSession2.startEventStream(null);
org.matrix.androidsdkMXSessionstartEventStream

Javadoc

Shorthand for #startEventStream(EventsThreadListener,NetworkConnectivityReceiver,String) with no eventListener using a DataHandler and no specific failure callback.

Popular methods of MXSession

  • getDataHandler
    Get the data handler.
  • getMyUserId
    Get the session's current userid.
  • <init>
  • clear
    Clear the session data. if the callback is null, the clear is synchronous.
  • createRoom
    Create a new room with given properties.
  • enableCrypto
    Enable / disable the crypto.
  • getCredentials
    Get the user credentials.
  • getCrypto
  • getCryptoRestClient
  • getRoomsApiClient
    Get the API client for requests to the rooms API.
  • isCryptoEnabled
  • stopEventStream
    Gracefully stop the event stream.
  • isCryptoEnabled,
  • stopEventStream,
  • addDirectChatRoomToAccountData,
  • checkCrypto,
  • checkIfAlive,
  • clearApplicationCaches,
  • convertFilterToFilterId,
  • createDirectMessageRoom,
  • createRoomDirectMessage

Popular in Java

  • Updating database using SQL prepared statement
  • findViewById (Activity)
  • getResourceAsStream (ClassLoader)
  • getSupportFragmentManager (FragmentActivity)
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • JFrame (javax.swing)
  • JTextField (javax.swing)
  • Option (scala)
  • Top plugins for Android Studio
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