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 →
Tags: clipboard, ClipboardManager, example
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 →
Tags: dom, example, sax, source code, Tutorial, XML Parsing
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 →
Tags: android, application, example, http, inside, Tutorial, webcontent, webpage, webview
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 →
Tags: android, example, gravity
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 →
Tags: android, image, imageview, wallpaper
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 →
Tags: android, code, Dialog, input text, source
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 →
Tags: ADB, APK, command, console, from, install, prompt
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 →
Tags: android, audiomanager, control, ringer
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 →
Tags: landscape, layouts, portrait, screen orientation
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
- 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 )
- Make sure you have created an application in http://www.facebook.com/developers/#!/developers/createapp.php
- Note down application name and API key, do not reveal API key to anybody.
Read the rest of this entry →
Tags: facebook, fbrocket, jtwitter, post, status, Twitter