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.

On my Nexus 7 running Android 4.2.2, I can open Chrome and type file:///sdcard/whatever.html and it opens just fine.

The problem comes when I want to bookmark this file. The bookmark gets created, but after tapping it, nothing happens. (Therefore, also adding it to home screen and tapping it does not work - it says that Application is not installed.)

However, after long-pressing the bookmark and opening it in new tab, the file loads and I can view it.

Does anybody know why it behaves like this and possibly how to make local bookmarks to open directly, without the need to open them in new tab?

Thanks

share|improve this question
    
A similar issue is covered with the question Generate a browser bookmark from file manager -- which got stuck at the same point. But you might also keep an eye on that one, in case a solution appears over there. –  Izzy Mar 23 '13 at 20:06
add comment

1 Answer 1

up vote 0 down vote accepted

This was originally going to be a comment, as I'm not 100% sure of its accuracy, but here goes:

At least with the stock Gingerbread browser, every link that you click makes the browser broadcast an intent to see which apps respond saying that they can handle the link's target themselves (like when you follow a Play Store link and it asks you if you want to open it in the browser (play.google.com) or in the Play Store app). Since no apps respond the browser essentially ignores it. When you ask to open it in a new tab, the browser already knows exactly what you wantit to do with the link, so instead of querying your apps, it simply opens the link in the new tab (like opening a new tab and typing in the URL). So that's why it works when you open in a new tab, but not when you simply click the link.

As for a solution, you could try HTTP Server, AirDroid or similar apps. Once you setup the server, your target addresses should look something like http://127.0.0.1/whatever. Since this has an http:// protocol the browser recognizes this.

EDIT: To my understanding, you can also use other (potentially free) server apps, like AirDroid. When it tells you your IP address is http://xxx.xxx.xxx.xxx:abcd, you use that when you are connecting from another device, like your computer. But when you are using the same phone that you are running the server on, just go to http://127.0.0.1:abcd in your android's browser.

share|improve this answer
    
Thanks for the explanation! –  kaboom1 Mar 24 '13 at 16:47
    
@kaboom1 Glad I could help :) –  KevinOrr Mar 24 '13 at 18:35
add comment

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.