Category Archives: ANDROID

How to set your Android phone in Silent Mode or Vibrate Mode or Normal Mode programatically?

By | July 19, 2011

First create an instance of the AudioManager Class using which you can set the phone in Normal, Silent and Vibration Mode. AudioManager audio_mngr = (AudioManager) getBaseContext().getSystemService(Context.AUDIO_SERVICE); For setting the phone in Silent mode.. audio_mngr .setRingerMode(AudioManager.RINGER_MODE_SILENT); For setting the phone in Normal mode.. audio_mngr .setRingerMode(AudioManager.RINGER_MODE_NORMAL); For setting the phone in Vibrate mode.. audio_mngr .setRingerMode(AudioManager.RINGER_MODE_VIBRATE);

Customizing a spinner in android.

By | July 18, 2011

Hello everyone……… You all knew that a spinner or combobox is an inbuilt widget in android. And Like any other widgets spinners are also customizable. Here is a simple example to customize a spinner. First we will look at the java code. The getView method is called for each row in the spinner. So with… Read More »

Customizing a spinner in android.

By | July 18, 2011

Hello everyone……… You all knew that a spinner or combobox is an inbuilt widget in android. And Like any other widgets spinners are also customizable. Here is a simple example to customize a spinner. First we will look at the java code. The getView method is called for each row in the spinner. So with… Read More »

Customizing a spinner in android.

By | July 18, 2011

Hello everyone……… You all knew that a spinner or combobox is an inbuilt widget in android. And Like any other widgets spinners are also customizable. Here is a simple example to customize a spinner. First we will look at the java code. The getView method is called for each row in the spinner. So with… Read More »

Customizing a spinner in android.

By | July 18, 2011

Hello everyone……… You all knew that a spinner or combobox is an inbuilt widget in android. And Like any other widgets spinners are also customizable. Here is a simple example to customize a spinner. First we will look at the java code. The getView method is called for each row in the spinner. So with… Read More »

Customizing a spinner in android.

By | July 18, 2011

Hello everyone……… You all knew that a spinner or combobox is an inbuilt widget in android. And Like any other widgets spinners are also customizable. Here is a simple example to customize a spinner. First we will look at the java code. The getView method is called for each row in the spinner. So with… Read More »

How to read webpage contents as a string in Android?

By | July 17, 2011

This is a simple example to read a webpage content as a string in android. This example can also be used to get the response as a string when you make a call to a webpage. For example a php script. You can have a http script that will call a php script and get… Read More »

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

How to find the device ID or Serial Number of an android device?

By | July 11, 2011

Here is a simple API to find the device ID of an android device. There are many ways to get the device ID in android Note : Try this in a real device, then only you will get the device ID. Also put this permission in the AndroidManifest file

How to Download an image in ANDROID programatically?

By | July 7, 2011

Hello everyone.. In one of my tutorials I have shown you how to upload an image in android.. In todays tutorial I will show you how to download an image into your phone programatically. I am just picking up an image url from google to show the download. Previously I have shown three other methods… Read More »

How to check internet connection is available in ANDROID or not?

By | July 7, 2011

Today we will see how to check whether there is any internet connection available to your phone in android.If any of the internet connection is available then the below function returns true otherwise false. Dont forget to add these two permissions in the manifest file. Press the +1 button to share it across the web… Read More »

TextSwitching animation in ANDROID or Using TextSwitcher Control in ANDROID

By | July 2, 2011

Hi all….. Today I will show you how to do a simple and beautiful text animation while switching the text in a textView in android The advantage is that you don’t need a seperate xml file for animation in this program, all is done inside the java code. This is the main java file. Here… Read More »

Fancy SrollBar in ANDROID…

By | June 27, 2011

Hello all.. ScrollBars are our basic needs in a UI if we have to show a content that do not fit fully into our layout. A normal scrollBar doesn’t look so beautiful, but don’t worry ANDROID is so customizable that you can customize your scrollBar also. Here is a simple demo to make a custom… Read More »

How to Open camera in ANDROID?

By | June 25, 2011

Hello everyone.. In today’s tutorial I will show you how to use camera in ANDROID in your program. In this tutorial we will be having a button which will open the camera and after taking the photo it will show it in an imageView. Note: This program will work only in the real device not… Read More »

How to use SeekBar in ANDROID?

By | June 21, 2011

Here is a simple example to show how to use seek Bar in android. Create a new project and place this code in it. The main.xml file The strings.xml file. Here is another example to show How to get the current progress on your SeekBar in android? Please leave your valuable cmments

ColourPickerDialog in ANDROID.

By | June 17, 2011

Hello all.. This is an example demo showing the color picker in ANDROID. This example is from the developer site of ANDROID. You can go to the developer site and download the Demo. However here I am introducing it to you for easiness. This is the output you will get after running this application. Color… Read More »

How to Fix ‘Warning : Multiple Build Commands For Output File' ?

By | June 14, 2011

Hi, The following warning, ‘Multiple Build Commands For Output File’ occurs when you try to delete resource files by ‘delete reference’ other than the correct method of‘move to trash’ while deleting files from ‘Resources’ folder of your project. Therefore the Copy Bundle Resources still holds the references of the same file you have deleted and… Read More »