0

We have a mobile workforce using Android Galaxy tabs and use the MobiControl MDM product to sync detailed briefing files to and from the devices on a constant basis. Rather than having the user search through a sea of irrelevant briefs in order to find the one they want, and to provide a nicer more activity specific UI, I would like to create an app which allows a user to tap a client from a list and then show links to the relevant files plus custom content such as recent news and summaries of activity. I started to create locally stored HTML files (saved on the internal sdcard) with the idea of creating an app to access them using webviewer but have ran into a few problems... 1) What is the best way to access files that are stored on the sdcard using webviewer? loadData? string? 2) Although the files will be stored in client specific folders, the file names will change on a ongoing basis and these ever changing file names should be the titles of the links to allow the user to identify what they need. Still very much at the preliminary stages of thinking and r&d so suggestions on the best route to take to achieve my goal is very much appreciated. Ad

1 Answers1

0

1) What is the best way to access files that are stored on the sdcard using webviewer? loadData? string?

loadUrl() should work.

BTW, your item "2)" is not a question.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • Great thanks, I didn't say no 2 was a question, I said it was a problem I ran into. The question would be 'how do I create links to ever changing local file names and yet still list the name of the file as the text for the link?' – user1927350 Dec 24 '12 at 22:56
  • @user1927350: 'how do I create links to ever changing local file names and yet still list the name of the file as the text for the link?' -- you need metadata (e.g., a database that has display names of files plus the path on the device to the file) to drive your display. – CommonsWare Dec 24 '12 at 23:00
  • Thanks very much for your speedy replies Commons and for pointing me in the right direction. Don't suppose I can be extra cheeky (it's Christmas eve after all right!?) and ask for a couple of helpful links on your suggestions? ;) – user1927350 Dec 24 '12 at 23:24
  • @user1927350: Um, well... Here is a project that demonstrates using `loadUrl()`: https://github.com/commonsguy/cw-omnibus/tree/master/WebKit/Browser1 However, it uses an HTTP URL. You'd use a `file://` URL pointing to your file on external storage (`Uri.fromFile(fileYouWantToView).toString()` might be an easy way to build the URL). A database of metadata for files is rather specific, and so I don't exactly have a book sample for it -- sorry! – CommonsWare Dec 24 '12 at 23:42