[Pkg-owncloud-commits] [owncloud-doc] 69/80: Updated examples in Android library dev manual...

David Prévot taffit at moszumanska.debian.org
Fri Jul 4 02:54:54 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud-doc.

commit 9038909f43df904f2cc77282f764d77383b5545d
Author: David A. Velasco <dvelasco at owncloud.com>
Date:   Wed Jun 18 11:29:55 2014 +0200

    Updated examples in Android library dev manual...
    
    ... to match changes in OwnCloudClient instances construction and authentication.
---
 developer_manual/android_library/examples.rst | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/developer_manual/android_library/examples.rst b/developer_manual/android_library/examples.rst
index e535125..bde4be8 100644
--- a/developer_manual/android_library/examples.rst
+++ b/developer_manual/android_library/examples.rst
@@ -24,9 +24,8 @@ Code example
 
   ...
 
-  // Build full URI to WebDAV entry point
-  Uri serverUri = Uri.parse(getString(R.string.server_base_url)
-                  + AccountUtils(WEBDAV_PATH_4_0);
+  // Parse URI to the base URL of the ownCloud server
+  Uri serverUri = Uri.parse(getString(R.string.server_base_url));
 
   // Create client object to perform remote operations
   mClient = OwnCloudClientFactory.createOwnCloudClient(
@@ -55,11 +54,17 @@ Code example
   public class OwnCloudClient extends HttpClient {
     ...
     // Set basic credentials
-    client.setBasicCredentials(username, password);
+    client.setCredentials(
+        OwnCloudCredentialsFactory.newBasicCredentials(username, password)
+    );
     // Set bearer access token
-    client.setBearerCredentials(accessToken);
-    // Set session cookie
-    client.setSsoSessionCookie(cookie);
+    client.setCredentials(
+        OwnCloudCredentialsFactory.newBearerCredentials(accessToken)
+    );
+    // Set SAML2 session token
+    client.setCredentials(
+        OwnCloudCredentialsFactory.newSamlSsoCredentials(cookie)
+    );
   }
 
 Create a folder

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-doc.git



More information about the Pkg-owncloud-commits mailing list