private void login(String username, String password) { new LoginRestClient(hsConfig).loginWithUser(username, password, deviceName, new SimpleApiCallback<Credentials>() { @Override public void onSuccess(Credentials credentials) { super.onSuccess(credentials); onLogin(credentials); } @Override public void onMatrixError(MatrixError e) { Log.e(TAG, "onLogin MatrixError" + e); } @Override public void onNetworkError(Exception e) { Log.e(TAG, "onLogin Network error" + e); } @Override public void onUnexpectedError(Exception e) { Log.e(TAG, "onLogin Unexpected error" + e); } }); }
mAccountDataRestClient = new AccountDataRestClient(hsConfig); mCryptoRestClient = new CryptoRestClient(hsConfig); mLoginRestClient = new LoginRestClient(hsConfig); mGroupsRestClient = new GroupsRestClient(hsConfig); mMediaScanRestClient = new MediaScanRestClient(hsConfig);
final SessionTestParams sessionTestParams) throws InterruptedException { final HomeServerConnectionConfig hs = createHomeServerConfig(null); LoginRestClient loginRestClient = new LoginRestClient(hs); final Map<String, Object> params = new HashMap<>(); CountDownLatch lock = new CountDownLatch(1);
final HomeServerConnectionConfig hs = createHomeServerConfig(null); final LoginRestClient loginRestClient = new LoginRestClient(hs);