Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

We are developing a web site that will all be local to an android tablet. The idea is we create the web app, copy the web app to MicroSD cards and distribute the SD cards.

Right now, when you open the file manager and browse to the location and open index.html , the file manager does a terrible job and displaying any of the HTML.

In order to view the page in a browser, you have to type: file:///Removable/MicroSD/MyApp/index.html

That isn't very intuitive. Is it possible to create a file that gets executed from the file manager that will create a bookmark and place it on the home screen that points to the location I stated above? Thanks.

share|improve this question
    
Why not a shortcut from the launcher on Android itself? That seems easier... –  t0mm13b Mar 15 '13 at 17:58
    
How do I do that? –  Ronnie Mar 15 '13 at 18:02
    
Long press on the home screen, a dialog will appear Add to home screen, there should be one called Shortcuts, then Select Shortcut, then its Bookmark...(this will be dependent on the ROM, Launcher and Android version) –  t0mm13b Mar 15 '13 at 18:05
    
Hmm, doesn't seem to be working. All I get is a wallpaper chooser –  Ronnie Mar 15 '13 at 18:19

3 Answers 3

As suggested by t0mm13b in his comment on your question, a shortcut on the desktop is the easiest way. This requires you to first open the page with your browser, and create a bookmark for it (you will see later why this step is required).

As you stated not to be able to add the shortcut in the usual way, here comes an alternative approach:

Some tablets come with a launcher that only offers wallpaper settings on long press (I have some of those as well). In this case, oben the app drawer (where you can find all your apps), and switch to the "widgets" tab (usually by swiping the page from right to left). You will see the word "Widgets" highlighted on top. Now look out for the "bookmarks" widget. You may be offered multiple of them, from "1x1" to "4x4" (the numbers here specify the size the widget will consume on your screen). You can play with them to find the one suiting you best. Long-PRess it, and the drawer behind it will "fade out" -- instead your homescreen(s) will display. Drop the widget where you want to have it.

Now it will ask you for which bookmark you want to use for the widget. Chose the bookmark you created in your browser at the beginning. Now the widget should be created on your homescreen.

share|improve this answer
    
Ok, I followed these steps and I can see the bookmark on my home screen with the correct title. When I tap it, it says App isn't installed in a Toast message (I think toast is what brings up those tiny messages) –  Ronnie Mar 15 '13 at 18:41
    
Can you try the very same with another "normal" bookmark (i.e. one with a "normal" Internet address, like e.g. http://www.google.com/) -- does this pop-up the same error? Also, what browser you are using -- and would an alternative browser be an option? One last alternative (without too much mess) would be to simply create the bookmark (as you already did), and open it from within the browser itself. You could also try to send the URL in a mail message and see if this opens the browser then. –  Izzy Mar 15 '13 at 18:50
    
Another browser I don't think would be an option. I was able to create a "normal" bookmark. When I tap it, it says complete action using Browser or chrome. –  Ronnie Mar 15 '13 at 18:51
    
OK, this means you already have two browsers installed. Strange that they are not offered on the other bookmark. Could you please verify the URL for "your" bookmark, if it really is file:///Removable/MicroSD/MyApp/index.html (including the opening file:///), and the path is correct? Can you open that bookmark from within the browser without any problems? –  Izzy Mar 15 '13 at 19:14
    
That is definitely the correct URL, even with the 3 slashes android.stackexchange.com/questions/4775/… and yes I can click the bookmark from within the browser –  Ronnie Mar 15 '13 at 19:31

Why are you choosing to distribute via an SD Card? You can use something akin to PhoneGap, and pack it into an APK. It's still static files locally, and still being run by the local WebRenderer.

This is a bit of an alternative solution + comment -.-

share|improve this answer
    
You could do it that way or copy the webapp into assets folder of the source and build... –  t0mm13b Mar 15 '13 at 18:01
    
We are doing this because the contract we have is a government contract. Lot's of restrictions. –  Ronnie Mar 15 '13 at 18:02

If you can install an app from the play store without infringing on your contract, then get Task Bomb.

  1. Launch the app and tap Tasks
  2. Tap the white plus in the top-right corner
  3. Select VIEW for Action type
  4. Tap Data, then tap your file manager in the popup
  5. Browse to the root of your site and tap the index page
  6. For Activity, select whichever app you want to use to open it

Now that you've created the task, you have to add a homescreen shortcut

  1. Go to your homescreen and drop the Quick Launch shortcut to your homescreen
  2. Select your task from the list, name it anything, and you're good to go!
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.