Users Online

· Guests Online: 133

· Members Online: 0

· Total Members: 188
· Newest Member: meenachowdary055

Forum Threads

Newest Threads
No Threads created
Hottest Threads
No Threads created

Latest Articles

Articles Hierarchy

Articles: Android

048 Java Android Program to Parse Xml Using Dom Parser

In this example we are going to parse an Xml that we receive from the internet particularly from http://developer.yahoo.com/yql/console/ from here go to the bottom right corner in DATA TABLES and select Show Community Table and scroll dowm to yahoo and click on yahoo.finance.quote in the console that appears and type the following sql statement – select * from yahoo.finance.quote where symbol in (“MSFT”) , and uncheck Diagnostics and click on test , now u will get the following shown output


049 Java Android to demonstrate Download Manager in Android

Here is source code of the Program demonstrates Download Manager in Android in Android. The program is successfully compiled and run on a Windows system using Eclipse Ide. The program output is also shown below.

 

Before you can access Internet resources, you need to add an INTERNET uses-permission node to your application manifest, as shown in the following XML snippet:

<uses-permission android:name=”android.permission.INTERNET/>

The Download Manager was introduced in Android 2.3 (API level 9) as a Service to optimize the handling of long-running downloads. The Download Manager handles the HTTP connection and monitors connectivity changes and system reboots to ensure each download completes successfully.

To access the Download Manager, request the DOWNLOAD_SERVICE using the getSystemService method, as follows:

String serviceString = Context.DOWNLOAD_SERVICE;
DownloadManager downloadManager;
downloadManager = (DownloadManager)getSystemService(serviceString);

050 Java Android Program to Demonstrate Connection to an Internet Resource

Java Android Program to Demonstrate Connection to an Internet Resource

Here is source code of the Program to Demonstrate Connection to an Internet Resource in Android. The program is successfully compiled and run on a Windows system using Eclipse Ide. The program output is also shown below.

 

In this program we initiate a HTTPS connection and using this connection we get a json object which we print on the screen.


051 Java Android Program to demonstrate Google Maps in Android

In this tutorial we would be dealing with Google map and how to show a Google Map in your Application using Google Map API’s , in order to do so we would need the MapFragment class which extends the Fragment class and provides the life-cycle management and the services for displaying a GoogleMap widget. GoogleMap is the class which shows the map. The MapFragment has the getMap() method to access this class.


052 Java Android Program to demonstrate Zoom-IN and Zoom -Out of an image using Touch events

Program to demonstrate Zoom-IN and Zoom -Out of an image using Touch events in Android. The program is successfully compiled and run on a Windows system using Eclipse Ide. 


053 Java Android Program to Demonstrate Creating and Saving Shared Preferences

Shared Preferences are a simple, lightweight name/value pair (NVP) mechanism for saving primitive application data, most commonly a user’s application preferences.


054 Java Android Program to Demonstrate Preference Screen

Android offers an XML-driven framework to create system-style Preference Screens for your applications.
By using this framework you can create Preference Activities that are consistent with those used in both native and other third-party applications.
This has two distinct advantages:
1. Users will be familiar with the layout and use of your settings screens.
2. You can integrate settings screens from other applications (including system settings such as location settings) into your application’s preferences.


055 Java Android Program to Demonstrate Using Subscreen in a Preference Screen

If you want to place groups of settings into a subscreen , place the group of Preference objects inside a PreferenceScreen.


056 Java Android Program to Demonstrate Intent in Preference Screen

Here is source code of the Program to Write to Demonstrate Intent in Preference Screen in Android. The program is successfully compiled and run on a Windows system using Eclipse Ide. The program output is also shown below.

 

In some cases, you might want a preference item to open a different activity instead of a settings screen, such as a web browser to view a web page. To invoke an Intent when the user selects a preference item, add an  element as a child of the corresponding  elemen


057 Java Android Program to Demonstrate Prefernce Fragement

Java Android Program to Demonstrate Prefernce Fragment


058 Java Android Program to Demonstrate Preference Headers

This Android Java Program demonstrates Preference Headers.

 

Here is source code of the Program to Demonstrate Preference Headers in Android. The program is successfully compiled and run on a Windows system using Eclipse Ide. The program output is also shown below.

In rare cases, you might want to design your settings such that the first screen displays only a list of subscreens. When you’re developing such a design for Android 3.0 and higher, you should use a new “headers” feature in Android 3.0, instead of building subscreens with nested PreferenceScreen elements.

To build your settings with headers, you need to:
1.Separate each group of settings into separate instances of PreferenceFragment. That is, each group of settings needs a separate XML file.
2.Create an XML headers file that lists each settings group and declares which fragment contains the corresponding list of settings.
3.Extend the PreferenceActivity class to host your settings.
4.Implement the onBuildHeaders() callback to specify the headers file.

A great benefit to using this design is that PreferenceActivity automatically presents the two-pane layout when running on large screens.
for more info go to:-
http://developer.android.com/guide/topics/ui/settings.html#top


059 Java Android Program to Demonstrate Preferenece Activity

Java Android Program to Demonstrate Preferenece Activity


060 Java Android Program to Demonstrate Reading a File on SD Card

Java Android Program to Demonstrate Reading a File on SD Card


061 Java Android Program to Demonstrate Reading and Writing to a File in Android

Java Android Program to Demonstrate Reading and Writing to a File in Android


062 Java Android Program to Write to a SQLite Database in Android

Java Android Program to Write to a SQLite Database in Android

Render time: 0.97 seconds
10,808,093 unique visits