mirror of
https://github.com/owncloud/android-library.git
synced 2026-08-11 08:22:56 +00:00
make propfind operation run without errors
This commit is contained in:
@@ -24,8 +24,8 @@
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<string name="server_base_url"></string>
|
||||
<string name="username"></string>
|
||||
<string name="password"></string>
|
||||
<string name="server_base_url">http://docker.oc.solidgear.es:11917/</string>
|
||||
<string name="username">admin</string>
|
||||
<string name="password">Password</string>
|
||||
<string name ="user_agent">Mozilla/5.0 (Android) ownCloud sample </string>
|
||||
</resources>
|
||||
|
||||
@@ -84,21 +84,14 @@ public class MainActivity extends Activity implements OnRemoteOperationListener,
|
||||
|
||||
mHandler = new Handler();
|
||||
|
||||
Uri serverUri = Uri.parse(getString(R.string.server_base_url));
|
||||
final Uri serverUri = Uri.parse(getString(R.string.server_base_url));
|
||||
mClient = OwnCloudClientFactory.createOwnCloudClient(serverUri, this, true);
|
||||
// mClient.setCredentials(
|
||||
// OwnCloudCredentialsFactory.newBasicCredentials(
|
||||
// getString(R.string.username),
|
||||
// getString(R.string.password)
|
||||
// )
|
||||
// );
|
||||
|
||||
|
||||
OCAccount ocAccount = new OCAccount(serverUri,
|
||||
OwnCloudCredentialsFactory.newBasicCredentials(
|
||||
getString(R.string.username),
|
||||
getString(R.string.password)
|
||||
)
|
||||
);
|
||||
getString(R.string.password)));
|
||||
|
||||
mOCContext = new OCContext(ocAccount);
|
||||
|
||||
@@ -164,9 +157,9 @@ public class MainActivity extends Activity implements OnRemoteOperationListener,
|
||||
|
||||
private void startRefresh() {
|
||||
|
||||
PropfindOperation propfindOperation = new PropfindOperation(mOCContext, FileUtils.PATH_SEPARATOR);
|
||||
final PropfindOperation propfindOperation = new PropfindOperation(mOCContext, FileUtils.PATH_SEPARATOR);
|
||||
|
||||
propfindOperation.exec();
|
||||
Thread tread = new Thread(() -> propfindOperation.exec());
|
||||
// ReadRemoteFolderOperation refreshOperation = new ReadRemoteFolderOperation(FileUtils.PATH_SEPARATOR);
|
||||
// refreshOperation.execute(mClient, this, mHandler);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user