I'm currently working on flutter_webview_plugin and I'm opening up my company website inside the webview, The thing is website shows error if suddenly someone turns off the internet (I know This is how it suppose to work) But is there any way I can save the whole website in the storage so it works without the Internet (I know this is kind of ridiculous)?
It will be great if you can answer this with flutter_webview_plugin perspective.
Thanks
You can try this:
Uri.dataFromString('<html><body>hello world</body></html>', mimeType: 'text/html').toString()
Related
I am trying to open a link in chrome from a webview on android. Is it possible to do this with the URI rather than using an intent.
For example doing something like "chrome://www.google.com"
I have been looking around on here and other places on the internet seeing things like googlechrome:// and googlechrome://navigate?url= as well, but I cannot seem to find anything that works.
Thanks in advance!
I was not able to force it to open in chrome, however, I was able to force it open in the android browser by replacing "https" with "browser." I still do not know if it is possible to force it out of the webview and open it with chrome, but this solution works for my purposes.
I am trying to achieve this in Appcelerator Alloy: I would like my users to be able to click a UI button to save a website currently shown in a WebView element for later recall. It should then work offline and include CSS and Images included in the HTML (and CSS) code. Is there any best practice to start off with here? I am targeting iOS and android with this app.
Thank you for your input!
jŒ
I will not post code here, but I can tell you what to do, as I coded the same thing a few days ago. But not with Alloy.
You have to download the html content via xhr get or post and save it into a file to the applicationDataDirectory. Then you can access to it completely whenever you want.
What would be causing a mobile browser to disable all CSS?
Screenshot:
Website Screenshot
when you access the website on your mobile is already like this?
If yes maybe you linked the css file wrong for the mobile, see if you put wrong.
Sometimes one wrong line of code mess all up ^^.
I have a code in my application to open a browser.
Sometimes I need to tell the browser to load another URL after a few seconds.
Is there a way to make the first browser to change the URL or I need to open a new one always?
Thanks,
Simon
The best way to achieve this would probably be to embed a WebView in your application, and then you can control it directly. Otherwise, as far as I know, you can't control a browser opened up via Intents. I could be wrong about that, but embedding a WebView and controlling it directly seems much more straightforward.
The WebView class reference:
http://developer.android.com/reference/android/webkit/WebView.html
Some notes on the WebView (less pertinent to what you're doing [this article pertains to writing HTML/native hybrid apps], but may have some useful information):
http://developer.android.com/guide/webapps/webview.html
Good morning, first of all sorry if this have been asked before, i've found no answer yet and i've been looking for it for a long time.
The problem: there's links to external websites in my app. This links always open inside my app. I want them to open like the following image, asking me what app i want to use to open the link:
Click to see image
http://blog.laptopmag.com/wpress/wp-content/uploads/2013/03/complete-action-i.jpg
Another problem is that i have some files i want to download from the app. They have the same problem. I would like the requested file to download automatically but it does nothing.
Wish you could help me, i am new in this and i'm a little (or too much) lost. Appreciate your help¡¡¡ Thanks
I'm pretty sure that you can do this with the InAppBrowser plugin: http://cordova.apache.org/docs/en/3.0.0/cordova_inappbrowser_inappbrowser.md.html#window.open
If you set the target=_system, it will "Opens in the system's web browser." I think if you have set a default web browser already on your device, it will probably use that web browser and not give you the prompt in your screen shot. I don't think there is a way to force the system to ask you which app to use, unless the user somehow clears that association/setting.