-5

webpage is not available error in loading internal link of html file in android This is because of the extension given.
How to remove this extension?

Ravi
  • 34,851
  • 21
  • 122
  • 183
Shruti
  • 55
  • 7
  • somebody please help me solving this problem. my html page is displaying properly through assets folder. but when i am clicking the internal links of that html page then webpage is not available error message is showing. – Shruti Apr 25 '14 at 05:52
  • is your page is available there ? – Sree Apr 25 '14 at 05:53
  • OK update your question with what you have tried and where you are facing issue – Sree Apr 25 '14 at 05:55

1 Answers1

0
webView.loadUrl("file:///android_asset/filename.html");

This may help you...give your html filename in the place of "filename" in this url. And try serching in google when you face some problem. Simple que like this is not so appreciated here. And you will get many que like this once you search in SO. try this three links

link 1 ,link 2 , link 3

Community
  • 1
  • 1
Sreedev
  • 6,563
  • 5
  • 43
  • 66
  • i think u didnt get my question – Shruti Apr 25 '14 at 06:05
  • i have already done this. and my html page is successfully displaying but when i am trying to click on the links provided in that html page. then it is showing error, because of the file extension (file:///android_assets/) – Shruti Apr 25 '14 at 06:07
  • Try showing us wot you have tried..Are you using html and Js also for navigation?? – Sreedev Apr 25 '14 at 06:09
  • webViewAbout = (WebView) findViewById(R.id.webViewAbout ); webViewAbout.loadUrl("file:///android_asset/About.html"); I have done this. this about page is displaying properly, but it contains a link www.somelink.com , when i am clicking on it, its showing "the webpage at file:///android_assets/www.somelink.com might be temporarily down – Shruti Apr 25 '14 at 06:23
  • SO you can give a callback to activity with a js from you html page and there you can load this url www.somelink.com from activity itself.. i guess this will solve your problem... – Sreedev Apr 25 '14 at 06:26
  • I have updated my ans please check with – Sreedev Apr 25 '14 at 06:30
  • ok let me check this method – Shruti Apr 25 '14 at 06:56
  • 1
    i am answering my own question as i find out solution... the problem was with my html file... in that href="www.omelink.com" was written. i have just changed it to href= "http(this bracket is to be removed)://www.somelink.com" and now its done. – Shruti Apr 25 '14 at 08:38