How to cache a webpage locally on an Android phone with app made by App Inventor? I'm actually making a web browser app for Android and I want it load my website without internet! Please help!!!
Dowload the HTML content of the page and then display it .
WebView mWebView = null;
mWebView = (WebView) findViewById(R.id.webview);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.loadUrl("yourhtmlfilepath");
dont forget to add file:/// before path
Related
As i'm developing a Web API for angular application i have saved the image in my Web Api project and the project folder structure is below.
Now as i'm trying to get access for the image via browser it doesn't show the image here is a snapshot for it below.
I have tried calling the HTML page of angular like this below.
<img src="http://localhost:4000/Uploads/Profile/057f4ed8-5b52-4ba0-b3ec-ae3b4f4e9baa.jpg" class="img-fluid">
It doesn't work how can i access these images in my other project and also the Web API project is running.
To Enable Static Content go to Window Features then iis
Hi im using Xamarin forms webview and i had a specific url which is developed by my company when ever im loading the url the webview is returning empty screen can someone help me with this?
First of all the URLs must be fully formed with the protocol specified (i.e. it must have "http://" or "https://" prepended to it).
var browser = new WebView
{
Source = "http://xamarin.com"
};
Check your webview layout. Maybe is not have a good position in xaml.
For ios check NSAppTransportSecurity if the url is not https.
If you want open the browser tab inside your app check this
https://askxammy.com/customizing-browser-appearance-in-xamarin-forms/
I have made an app that calls my mobile website. The mobile website has a click-to-call button, and when touching this button in my app, I get an error message saying "Webpage not available". This is not a problem if I visit my site through the browser. Anyone having an idea what to do?
are you using the webviewer component? The webviewer is no full browser...You could add a button in App Inventor and use the phone call component alternatively.
or you could use the activity starter to start a full browser to display your page, more info see here
Open the browser to a Web page
Use these activity starter properties to open a specific web page:
Action: android.intent.action.VIEW
DataUri: http://news.google.com
Hi i'm using the webbrowser control to download a html webpage. I only need the code, however the webbrowser is also downloading all the extra css/javascript/images linked to from the webpage, which is using up time and bandwidth. So is there a way to make the web browser only download the webpage and nothing else? I have to use this webbrowser because it's logged in to the site, so unfortunately a webclient would not work.
Thanks,
ng93
How is it logged into the site? Could you use GetCookies() API on the browser control and add that to the HttpWebRequest?
I'm using the embedded web browser, and it (the browser) works fine. Can I display a locally stored HTML file in it? The file is in folder 'html'. I am trying it but it does not work - says it cannot find the web page.
My code:
<phone:WebBrowser Name="webBrowser1" Height="467" Source="/html/test.html"/>
To display static content in a browser control, you can "use a WebBrowser control to display static web content that an application has saved into isolated storage using the SaveToString() method".
See: http://msdn.microsoft.com/en-us/library/ff431811(v=vs.92).aspx
Hope this helps you.