Appcelerator WebView Offline Browsing - android

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.

Related

Extract html data after logging into website from android app

I recently started to learn to develop apps for android, but I'm stuck for quite a while on 1 problem:
I want to log from my app to a website (http://student.tu-sofia.bg/) and download some data from it, so I can use it later in my app. I have red different articles and tried different things but in the end nothing worked. The closest thing that I got as a result was receiving the source code of the login page( tried this Android: How to programatically login to website and retrieve data from it?)
Can someone tell my what I am doing wrong or give an advice how I should approach this ?

Responsive blog post display in Android

I am working on porting some features of a website to a native Android app, I am new to Android development so I'm still working out some of the kinks. I want to display a responsive blog post (Twitter Bootstrap) in an Activity, assuming that this will allow the post to fit the screen it is being viewed on and allow me to maintain the post's content.
As an Android novice, the first thing that comes to mind is using a WebView widget to load a minimal version of the post into the Activity. I also saw that it is possible to display HTML in a TextView but obviously not something that includes Twitter Bootstrap - and I'm assuming it would not be responsive.
Would a WebView be the right thing to use here? What are some alternatives, pros, cons?
Thanks!

How to get the content of website in phonegap?

I have to design a android,ios application for my website.I searched and find out that phonegap can be good one for that.Please provide me info that how to get the content of website in phonegap?On the first page i have buttons like home,contact etc.On click of home button,the home page from website should be shown.
PhoneGap is set of libraries like jQuery.
You normally write html pages and include javascript files from phonegap.
Check out phonegap example project.
Look, what you are talking about is .html,.css,.js files that you can easily get after saving any web page from your web-browser.
Rest you can use in the www folder of your phonegap project. And I
would rather suggest you to go for webview present in the native
android that is nothing but actually would provide you the same
functionality that you have been looking for.
---Edit---
Now as you have said that you want the home page buttons like about us etc. that would be copied via web browser and would be there for you as far as the html code is concerned but if you want it to look well on a small mobile device that you should create a responsive designed html and you should read some good articles about responsive web design. That would actually change your way of thinking about creating applications via html within mobile devices.

Cordova 2.xx Plugin Procedure

I don't quite understand the cordova plugin procedure.
I found out that it works through the Cordova Webview, but I don't know which
functions and classes are necessary.
It would be great if someone had the time to explain it, a sequencediagramm would be the best for understanding.
greetings, Kurt
This may help you to understand more:
Using WebViews
A WebView uses the same rendering and JavaScript engine as the browser, but it runs under the control of your application. The WebView can be full screen or you can mix it with other Views. The content for your WebView can come from anywhere. The WebView can download content from the web, or it can come from local files stored in your assets directory. The content can even be dynamically generated by your application code.
and
Android WebView, Javascript and CSS
I have come across some situations where I had to use a WebView to display some HTML content. Displaying HTML content is pretty straight-forward. But when it comes to controlling the web view, it gets a little complex. Things like showing alerts, manipulating divs and controlling the activity (closing/finishing). This example shows a few techniques that will get you going with Javascript and CSS with WebView.

slideshare in android app

I am new to Android and I am studying the possibility of including/embedding a slideshare slideshow (among other contents) into an Android app.
The idea would be receiving from the user the URL of the resource, such as:
"http://es.slideshare.net/slideshow/embed_code/16060200?rel=0"
And in certain section of the app display the slideshow mixed with other contents (text or whatever...)
I have been searching and the only option I saw (I insist I am really new to this...) would be making a webview for that activity... but... Is a webview fullscreen only? Can it be just part of an activty?
I hope I got to make myself understood... otherwise, let's try to clear it out and ask me whatever you may need to understand the question ;)
Thank you very much in advance,
Miguel
PS: I can accept other systems instead of slideshare, what i want is to embed an slideshow
Sounds like what you need is a WebView, just like you said. They can be non-fullscreen as well. Not sure how much this helps, but here's a tutorial on WebView's from the dev site:
Building Web Apps in WebView

Categories

Resources