Skip to content

Testing and working examples

Alex Gotev edited this page Feb 25, 2017 · 15 revisions

To test Android Upload Service, you have the following choices:

  • Use your own server (which handles one or more of the supported upload types)
  • Use one of the server implementations provided in the examples (read below)
  • Use the excellent http://www.posttestserver.com/ (bear in mind that the data you post there is public!) for HTTP Multipart requests

In the examples folder you will find:

  • A simple Android application that uses this library. Download the latest debug APK from here. It's a proof of concept. You can do much more with the library to best suit your specific scenario. Check JavaDocs to discover all the features.

  • Demo servers which handle uploads:

    • node.js (HTTP Multipart and Binary). This is the server implementation used in development, as it's the most easy to get up and running in a matter of minutes, it's flexible and it's possible to make rapid changes when needed. You need to have node.js and npm installed. Refer to this guide. To run the server, open a terminal, check out the project sources, navigate to examples/server-nodejs folder and launch the server:

      git clone https://github.com/gotev/android-upload-service.git
      cd android-upload-service/examples/server-nodejs/
      npm install
      npm start
      

      Follow the instructions and the output that you will get in the console. Next times you need to start the demo server, just navigate to its folder from the terminal and execute: npm start

    • PHP (HTTP Multipart only). You need a running web server (e.g. Apache + PHP) in which to put the script. To get up and running in minutes you can use a solution like XAMPP (supports Windows, OS X and Linux).