How to set up webdav on Android Studio?

Mohitosh Mondal

I am trying to start developing some advanced android applications for learning purposes. I wanted to implement WebDAV to be able to push files from my device to an FTP server. I have the FTP set up and I went through the documentation of Sardine-Android. But not able to understand how to import any of the various versions available. If anyone can point out what needs to be done for that, it would be helpful. Just for testing I did create a Sardine-Android project and imported https://github.com/yeonsh/Sardine-Android but that on building the project in Android Studio it cannot find "org.simpleframework.xml.Element" I am totally new to this so it might be something trivial that I am asking but any kind of help would be appreciated. Thanks

Mohitosh Mondal

After research, I was able to do it via following steps:

Get the package de.aflx.sardine from the git repository Sardine-Android mentioned above. Place it in your project's java folder.

Get the following libraries and import it as module to your project: simple-xml-2.7.1, stax-1.2.0, stax-api-1.0.1, xpp3-1.1.3.3

Add simple-xml-2.7.1 as module "implementation" (new Gradle change from "dependencies")

Sardine Implementation:

Then using Sardine class create an object and initialize it with SardineFactory, e.g. Sardine sardine = SardineFactory.begin(username, password);

Then send data to server using sardine.put() e.g. sardine.put(url_to_server+filename,data_to_send);

Thought this would help others trying to do similar thing.

This is how Gradle Build will look like:

dependencies {
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation 'com.android.support:design:25.4.0'
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:25.3.1'
    implementation 'commons-net:commons-net:3.6'
    implementation project(':simple-xml-2.7.1')
}

This is how the project structure will look like

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to set up external documentation in Android Studio?

From Dev

how to set up the AVD for android studio

From Dev

Is there a tested walkthrough on how to set up android studio and Android SDK?

From Dev

android studio set up is not working

From Dev

How to set up JNI sub directories in Android Studio

From Java

How do I set up Android Studio to work completely offline?

From Java

How to set up gradle and android studio to do release build?

From Dev

How to set up compile library in android studio. LOMBOK

From Dev

How to properly set up Lombok in Android Studio 3.0

From Dev

How do I set up an Android Studio project for a jar library?

From Dev

How to set up Google Maps Utility Api in Android Studio?

From Dev

Where to find/set up for 'Artifact' in Android Studio?

From Dev

Set up testing in Android Studio with Scala plugin

From Dev

How to set up folder structure in Visual Studio

From Dev

How to set up visual studio 2013 for Java

From Dev

How to set up a git repo that works on Windows and Linux in Android Studio (and using gradle)

From Dev

How to set up Android Studio project from scratch that allows me to use groovy

From Dev

Android Studio androidx.coordinatorlayout error and how to set up 3Dot Menu?

From Dev

How to set up a git repo that works on Windows and Linux in Android Studio (and using gradle)

From Dev

How to set the JDK for Android Studio?

From Dev

How to set the JDK for Android Studio?

From Dev

How to speed up work on Android Studio 2.0?

From Dev

How to speed up Android Studio compilation process

From Dev

How to make back up of Android Studio?

From Dev

How to fasten up gradle in Android Studio?

From Dev

How to set up Google Drive API on android?

From Dev

How to set up a looping background in android

From Dev

How to set up a timer for an android game ?

From Dev

how to set up an animated toggle button in android

Related Related

  1. 1

    How to set up external documentation in Android Studio?

  2. 2

    how to set up the AVD for android studio

  3. 3

    Is there a tested walkthrough on how to set up android studio and Android SDK?

  4. 4

    android studio set up is not working

  5. 5

    How to set up JNI sub directories in Android Studio

  6. 6

    How do I set up Android Studio to work completely offline?

  7. 7

    How to set up gradle and android studio to do release build?

  8. 8

    How to set up compile library in android studio. LOMBOK

  9. 9

    How to properly set up Lombok in Android Studio 3.0

  10. 10

    How do I set up an Android Studio project for a jar library?

  11. 11

    How to set up Google Maps Utility Api in Android Studio?

  12. 12

    Where to find/set up for 'Artifact' in Android Studio?

  13. 13

    Set up testing in Android Studio with Scala plugin

  14. 14

    How to set up folder structure in Visual Studio

  15. 15

    How to set up visual studio 2013 for Java

  16. 16

    How to set up a git repo that works on Windows and Linux in Android Studio (and using gradle)

  17. 17

    How to set up Android Studio project from scratch that allows me to use groovy

  18. 18

    Android Studio androidx.coordinatorlayout error and how to set up 3Dot Menu?

  19. 19

    How to set up a git repo that works on Windows and Linux in Android Studio (and using gradle)

  20. 20

    How to set the JDK for Android Studio?

  21. 21

    How to set the JDK for Android Studio?

  22. 22

    How to speed up work on Android Studio 2.0?

  23. 23

    How to speed up Android Studio compilation process

  24. 24

    How to make back up of Android Studio?

  25. 25

    How to fasten up gradle in Android Studio?

  26. 26

    How to set up Google Drive API on android?

  27. 27

    How to set up a looping background in android

  28. 28

    How to set up a timer for an android game ?

  29. 29

    how to set up an animated toggle button in android

HotTag

Archive