Android MediaPlayer Example

Android MediaPlayer Example

In android, we can play the audio file from the resource. How to do it ? Step1:- In your project , create a folder named with 'raw' in res folder ...

More

Android HorizontalScrollview Example

Android HorizontalScrollview Example

In android, we can scroll the elements in both horizontal and vertical format. To scroll in Vertical we can use Scrollview, to scroll in horizontal format we need ...

More

Android Loading Welcome Splash / Spash Screen Example

Android Loading Welcome Splash / Spash Screen Example

In android, when we build an application we may need to display a splash screen ( welcome screen ) for users to intimate some thing & do some ...

More

Android Button Highlight

Android Button Highlight

In android, we can highlight the button through custom images. Here is a example that will give you about how to set a image when the button is ...

More

Android Listview Example

Android Listview Example

Today, we are going to see about a simple listview example. In Android, Listview is used to show a list of items in a vertically scrolling list.  Learn ...

More


Android ClipboardManager Example

September 2, 2010 in Android Tutorial by Sasikumar

Today we are going to see about how to get and set the Clipboard content using ClipboardManager.
ClipboardManager interface to the clipboard service, for placing and retrieving text in the global clipboard.
hasText() is used to check whether the clipboard contains text or not. Return value is boolean.
getText() is used to get clipboard text.
setText() is used to set clipboard text.

Read the rest of this entry →

Android ClipboardManager Example

Android XML Parsing Tutorial – Using DOMParser

August 31, 2010 in Tutorial, XML Parsing by Sasikumar

Moving ahead from Android XML Parsing using SAXParser, here we are going to see about how to parse a XML using DOM Parser.
we are going to parse XML from net ( by passing URL ) not from local file or string.

The output looks similar to

Read the rest of this entry →

Android XML Parsing Tutorial – Using DOMParser

Android Webview example-part 1

August 30, 2010 in Android Tutorial by S.Janardhanan

Webview primarily used for loading a html content  in our application.

Let us discuss this in several parts. In this first part let load a normal web page to application using webview.

loadUrl is  the prime method to load a particular webpage to webview.

Hence make use of the snippet to load a page.

Read the rest of this entry →

Android Webview example-part 1

Android Gravity Example

August 26, 2010 in Common Issue by Sasikumar

Gravity is used to align a view in proper way. It may helps us in UI part very much.
Gravity have some option like top, left, center, right, bottom, center-vertical, etc… You can use any option to gravity according to your UI Design.

Read the rest of this entry →

Android Gravity Example

Android Set Image as Wallpaper

August 13, 2010 in Common Issue, image by Sasikumar

Today we are going to see about how to set a image as wallpaper in 2 line of code in android.
we can easily set any image from your res folder as a wallpaper in a 2 line of code.
First step is you need to change your image as Bitmap, then use getApplicationContext() to set your wallpaper.
That’s it!


Read the rest of this entry →

Android Set Image as Wallpaper

Android Dialog Input Text

August 12, 2010 in Dialog by Sasikumar

Moving ahead from custom dialog example and other dialog example, here we are going to see about how to get input text from user in dialog using edittext.
In some cases we may need to get input from user in dialog. At that time we need no to use custom dialog instead of that you can use simple alert dialog itself by using setView(View view) property.
Using setView() we can set any view to alert. Here we set the edittext view to setView() to get input from user.


 Read the rest of this entry →
Android Dialog Input Text

Using Terminal to Run Apps on Emulator or Device

August 9, 2010 in ADB by S.Janardhanan

Here is the situation. You have an app source and you want to test it on your emulator  Ever felt bored using Eclipse or Netbeans every time to install the app in emulator or device? Then you are at the right place. In this post you will learn how to use the terminal or command prompt to install and run android apk files. You can also get the log.

Read the rest of this entry →

Using Terminal to Run Apps on Emulator or Device

Android Ringer Control

August 4, 2010 in Common Issue by Sasikumar

Today we are going to see about AudioManager uses. AudioManager provides access to volume and ringer mode control.
Use

Context.getSystemService(Context.AUDIO_SERVICE)

to get an instance of AudioManager Class.
AudioManager have more features. In that we are going to see about setRingerMode(int RingerMode);

setRingerMode() is used to control the ring tone. If you need to stop a incoming call ring tone through your code you can use this method.
Read the rest of this entry →

Android Ringer Control

Android Portrait & Landscape Differeent Layouts

July 30, 2010 in Common Issue, emulator by Sasikumar

Today we are going to see about, How to use different layout when screen orientation changes from Portrait to Landscape or Landscape to Portrait.
For example :-
In portrait mode , the option page button will looks like nice when buttons are in one by one position.
But in landscape if we use the same process we need to have scrollview to see all the option button in the page.
To overcome this problem here is a easy solution.
In your res folder create two folders for Landscape 1) drawable-land 2) layout-land
drawable-land folder images is used when the phone orientation in landscape mode.
layout-land folder layout files is used when the phone orientation in landscape mode.

Read the rest of this entry →

Android Portrait & Landscape Differeent Layouts

Android Facebook API example using FBRocket

July 26, 2010 in Tutorial, facebook by Sasikumar

This post is posted as per the request of many comments on Android JTwitter Example.

Now let proceed ahead with Facebook using FBrocket.

Using FB rocket we can update our facebook profile status from mobile application.

Before we get into coding we got to make sure that we do the following steps

  1. Import the FBrocket JAR file to the eclipse project and add it to JAR libraries. Download here ( http://www.xeomax.net/fbrocket/download.php?d=bin&v=0.1a )
  2. Make sure you have created an application in http://www.facebook.com/developers/#!/developers/createapp.php
  3. Note down application name and API key, do not reveal API key to anybody.

Read the rest of this entry →

Android Facebook API example using FBRocket