0

how would I pull the directories from a web service rather than local assets?I need to write a DocumentsProvider that shares documents located on a server. I am at a total loss at how to do this. The server has an API that allows me to retrieve information about the documents and the libraries they are contained in.

For example - I can retrieve a JSON array from http://myserver/api/getlibraries which contains objects holding information about the document libraries available, like CreatedBy, Name and how many documents are in that library. I can also download the file from http://myserver/api/getdocument?docID=<documentID>

How would I pull the directories from a web service rather than local assets?

I can't give much more details as I don't know what details to give, but feel free to ask and I'll do my best to provide.

Thanks for any help

Xevvii
  • 101
  • 1
  • http://developer.android.com/guide/topics/providers/document-provider.html#custom – CommonsWare Feb 26 '16 at 12:19
  • @CommonsWare I've read through that and am still at a loss. – Xevvii Feb 26 '16 at 13:54
  • It would help if you would explain **specifically** what you do not understand. FWIW, [here is a sample project](https://github.com/commonsguy/cw-omnibus/tree/master/Documents/Provider) that implements a `DocumentProvider`, albeit one that pulls from assets rather than a Web service. – CommonsWare Feb 26 '16 at 13:57
  • @CommonsWare that's what I'm struggling with, pulling from a web service. – Xevvii Feb 26 '16 at 14:02
  • @CommonsWare how would I pull the directories from a web service rather than local assets? – Xevvii Mar 01 '16 at 15:49
  • Talk to whoever wrote your Web service and ask them. – CommonsWare Mar 01 '16 at 15:57

0 Answers0