Tag Archives: boolean

How to stream an audio in Android?

By | August 16, 2012

This is a simple example to how to stream an audio in android. Here is the java code for that. This is the xml that contains the button. When you run this program you will see a button and on clicking on that button you will see a dialog with message “Buffering…..”. Once the buffering… Read More »

A Simple FlashLight Application.

By | July 21, 2012

Here is a simple Application on how to use flashlight in android. Now the layout file main.xml. AndroiManifest.xml file contents. Make sure to add the permissions. Download the android java source code from here. please leave your valuable comments on this post.

How to delete a contact in android?

By | June 30, 2012

Hello all previously I have shown how to list all contacts in your phone and in another post I showed how to programatically create a contact in android. In today’s tutorial I will show you how to delete a contact in android programatically. This simple code does that.

How to Check whether is GPS is enabled in your android device?

By | June 1, 2012

This simple code checks whether GPS in enabled in your android device or not. If the GPS is not enabled the user is redirected to the settings page. Turn off the GPS on your device and running it will display this screen. Please test GPS on the device because emulators don’t have GPS. But anyway… Read More »

How to use Calendar in Android?

By | June 18, 2012

Hello all……. In today’s post I will show you how to use Calendar in android. Actually it is really easy to use calendar in android. For that android provides a calendar widget. We use calendar class to show the Calendar widget. Here is the java source code for this example. This is the main.xml for… Read More »

Listening to checkBox stateChange in Android

By | February 14, 2012

This is a simple example showing how to listen to checkbox in android. To check whether the checkbox is in on state or in off state just add a listener to the checkbox you want to listen. This is how we do this. ch.setOnCheckedChangeListener(new OnCheckedChangeListener() { }); This is the layout contaning a checkbox. This… Read More »

How will you programatically enable or disable WIFI in android?

By | May 26, 2012

Hello all.. This is a simple code snippet to enable WI-FI in android programatically in android. Note : Make sure to add the permissions in the manifest file. These are the permissions. Please leave your valuable comments on this post.

How to listen to the softkeyboard done button in android?

By | July 13, 2011

Instead of using a button on the view we can use the softkeyboard done button to trigger an action. The action can include calling another activity or retrieving the data from the EditText etc. The main.xml contains an Edittext For listening to the keyboard event we need onKeyListener