I saw this android app called Lyrics App. It provides the lyrics of the song currently played but needs internet connection always. Now, I wanted to make a similar app, that
Try...
DefaultHttpClient httpClient = new DefaultHttpClient();
HttpGet httpGet = new HttpGet("http://www.someplace.com");
ResponseHandler<String> resHandler = new BasicResponseHandler();
String page = httpClient.execute(httpGet, resHandler);
This can be used to grab the whole webpage as a string of html, i.e., "<html>...</html>"
EDIT: Note, you need to declare the following 'uses-permission' in the android manifest xml file...
<uses-permission android:name="android.permission.INTERNET" />
To those that don't already know, each of your android programs has a file called a manifest.
The manifest content is xml, and typically looks like this:
<?xml version="1.0" encoding="utf-8"?>
<manifest>
<uses-permission />
<permission />
<permission-tree />
<permission-group />
<instrumentation />
<uses-sdk />
<uses-configuration />
<uses-feature />
<supports-screens />
<compatible-screens />
<supports-gl-texture />
<application>
<activity>
<intent-filter>
<action />
<category />
<data />
</intent-filter>
<meta-data />
</activity>
<activity-alias>
<intent-filter> . . . </intent-filter>
<meta-data />
</activity-alias>
<service>
<intent-filter> . . . </intent-filter>
<meta-data/>
</service>
<receiver>
<intent-filter> . . . </intent-filter>
<meta-data />
</receiver>
<provider>
<grant-uri-permission />
<meta-data />
<path-permission />
</provider>
<uses-library />
</application>
</manifest>
Along with other things, this file is where you specify the uses permissions that your program uses e.g. if it needs to make a phone-call, to upload data etc.
These uses permissions invoke a question-box each upon application installation, giving the user the opportunity to allow or deny your application various services.
Bear (Rawr!) this in mind when programming, because your application will be a better if a user denies your application from uploading and your application still works.
Specific to your application, you need the internet permission. To enable it, add the following uses permission in the manifest file wherever you wish within the tag at the top and the tag at the foot:
<uses-permission android:name="android.permission.INTERNET" />
This will prompt the user to decide, "Do you want to allow this application internet access?"