Reputation: 13
I want to get the content to be displayed in my android application as soon as it is updated on a particular website. how can I do that? I'm new to android development....please help
Upvotes: 1
Views: 59
Reputation: 9442
You can display the web content using these ways,
If you try to display a web content using Android WebView class, refer this sample tutorial.
Upvotes: 0
Reputation: 5260
Hi you can use WebView for this purpose please have alook as the example is given below
res/layout/main.xml –
<?xml version="1.0" encoding="utf-8"?>
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/webView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
the WebViewActivity.java is as follows
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;
public class WebViewActivity extends Activity {
private WebView webView;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.webview);
webView = (WebView) findViewById(R.id.webView1);
webView.getSettings().setJavaScriptEnabled(true);
webView.loadUrl("http://www.google.com");
}
}
do not forget to have permission at manifest
<uses-permission android:name="android.permission.INTERNET" />
Upvotes: 0
Reputation: 11
sure use WebView - Android documentation here: http://developer.android.com/reference/android/webkit/WebView.html
You can also consider using PhoneGap and make a hybrid native html5 app.
Upvotes: 1