1

I have to upload audio files and I am using volley for now.

And I am happy with volley and download manager for downloading from server.

Upload also I am using volley is it fine. Or should I change it to Services or Is there any Upload Manager which can do my work.

user1871847
  • 44
  • 1
  • 5

2 Answers2

1

Yes, you can use volley for uploading. Volley is just a library based around services as it is, so no need to build your own service code. You could use FTP uploading as an alternative if it suits your context, but using HTTP based services is a good bet.

Take a look at Async Http or Android FTP Library in case those are easier to use or more suitable for your situation.

There is no need to run the volley code in its own service unless you are doing long running operations that needs to run independently of the activity. A service doesn't imply that it uses threads, so if volley is making use of threads your fine.

Shane
  • 150
  • 6
  • I went through the volley code its based on thread not Services. So should a create service and inside I should put volley post/put for uploading the file – user1871847 May 13 '14 at 08:36
  • 1
    Sorry, when I said 'services' I meant HTTP services, not that it ran inside of an android service. If its running using threads then that is fine. No need to create a service unless you're doing long running operations that need to work outside of a single activity – Shane May 13 '14 at 08:47
-2

Uploading file should be done in the background . Uploading via service is a good option .

Check this library https://github.com/gotev/android-upload-service

Rahul Bagal
  • 220
  • 3
  • 7