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

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

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

origin: matrix-org/matrix-android-sdk

  @Override
  public void onSuccess(Void info) {
    Log.d(LOG_TAG, "## deactivateAccount() : succeed -> clearing the application data ");
    // Clear crypto data
    // For security and because it will be no more useful as we will get a new device id
    // on the next log in
    enableCrypto(false, null);
    clear(context, new SimpleApiCallback<Void>(callback) {
      @Override
      public void onSuccess(Void info) {
        if (null != callback) {
          callback.onSuccess(null);
        }
      }
    });
  }
});
origin: matrix-org/matrix-android-sdk

enableCrypto(false, null);
origin: matrix-org/matrix-android-sdk

@Test
public void test01_testCryptoNoDeviceId() throws Exception {
  Log.e(LOG_TAG, "test01_testCryptoNoDeviceId");
  Context context = InstrumentationRegistry.getContext();
  final Map<String, Object> results = new HashMap<>();
  MXSession bobSession = mTestHelper.createAccount(TestConstants.USER_BOB, mCryptoTestHelper.getDefaultSessionParams());
  Assert.assertNull(bobSession.getCrypto());
  bobSession.getCredentials().deviceId = null;
  CountDownLatch lock1 = new CountDownLatch(1);
  bobSession.enableCrypto(true, new TestApiCallback<Void>(lock1) {
    @Override
    public void onSuccess(Void info) {
      results.put("enableCrypto", "enableCrypto");
      super.onSuccess(info);
    }
  });
  mTestHelper.await(lock1);
  Assert.assertTrue(results.containsKey("enableCrypto"));
  Assert.assertNotNull(bobSession.getCrypto());
  Assert.assertNotNull(bobSession.getCredentials().deviceId);
  bobSession.clear(context);
}
origin: matrix-org/matrix-android-sdk

bobSession.enableCrypto(true, new TestApiCallback<Void>(lock0) {
  @Override
  public void onSuccess(Void info) {
origin: matrix-org/matrix-android-sdk

aliceSession.enableCrypto(true, new TestApiCallback<Void>(lock0) {
  @Override
  public void onSuccess(Void info) {
bobSession.enableCrypto(true, new TestApiCallback<Void>(lock2) {
  @Override
  public void onSuccess(Void info) {
origin: matrix-org/matrix-android-sdk

aliceSession.enableCrypto(true, new TestApiCallback<Void>(lock00b) {
  @Override
  public void onSuccess(Void info) {
bobSession.enableCrypto(true, new TestApiCallback<Void>(lock00b) {
  @Override
  public void onSuccess(Void info) {
origin: matrix-org/matrix-android-sdk

aliceSession.enableCrypto(true, new TestApiCallback<Void>(lock_1));
bobSession.enableCrypto(true, new TestApiCallback<Void>(lock_1));
origin: matrix-org/matrix-android-sdk

bobSession.enableCrypto(true, new TestApiCallback<Void>(lock0) {
  @Override
  public void onSuccess(Void info) {
origin: matrix-org/matrix-android-sdk

aliceSession.enableCrypto(true, new TestApiCallback<Void>(lock0) {
  @Override
  public void onSuccess(Void info) {
CountDownLatch lock2 = new CountDownLatch(1);
bobSession.getCredentials().deviceId = "BobDevice";
bobSession.enableCrypto(true, new TestApiCallback<Void>(lock2) {
  @Override
  public void onSuccess(Void info) {
org.matrix.androidsdkMXSessionenableCrypto

Javadoc

Enable / disable the crypto.

Popular methods of MXSession

  • getDataHandler
    Get the data handler.
  • getMyUserId
    Get the session's current userid.
  • startEventStream
    Start the event stream (events thread that listens for events) with an event listener.
  • <init>
  • clear
    Clear the session data. if the callback is null, the clear is synchronous.
  • createRoom
    Create a new room with given properties.
  • 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

  • Finding current android device location
  • compareTo (BigDecimal)
  • getSharedPreferences (Context)
  • getSupportFragmentManager (FragmentActivity)
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Socket (java.net)
    Provides a client-side TCP socket.
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • JList (javax.swing)
  • 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