How to avoid OutOfMemory Exception in android- Second Method?

By | July 24, 2011

In the previous tutorial I showed you one method to avoid OutOfMemory Exception in android. And In this tutorial I will show you another method. The reduceImageSize function in this code reduces the image to the desired size you want. Create a fresh project and copy this code into it. How to put images inside… Read More »

How to avoid OutOfMemory Exception in android?

By | July 23, 2011

Hello all.. The OutofMemory exception is a common exception in android when you select an image from a gallery or load Big Images in android. There are different methods to solve this problem. Today I will show you one of the method to solve this problem. The method I am going to explain here is… Read More »

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 invite / transfer all your facebook friends to google plus ?

By | July 15, 2011

Hi, As most of you know already, Facebook won’t allow direct transfer of your Facebook contacts to gmail or to Google Plus. Yup, they are rivals! But there is a very simple and easy way to transfer all your facebook contacts to gmail and invite all of them via google plus. Follow the simple and… 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 »