Android take screenshot from code

Android java snippet to capture screenshot from code.

Android maintain static orientation from code

Request Orientation to be in static from code.

Android Dialog Input Text

Here we are going to see about how to get input text from user in dialog using edittext.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.


Android check SD card availability from code Function in code to check the availability of SD card in the hand held android device.

Android TabHost Tutorial – Part 2

Here we are going to see about how to set TabWidget Tab background/color, tab icon with a simple example.

Android Loading Welcome Splash / Spash Screen Example

Here we are going to see about a simple splash screen example that displays a textview as splash screen & then move to main activity after the splash screen times up.

Android TabHost Tutorial - Part 1

In this tutorial, we are going to see about simple tabhost example that contains two tabs & TabSpec uses for tabs.

Android how to send mail from code using email client

There is always a need of sending a mail from our application. In android the user will be able to invoke the mail client from code and send to desired mail id from.

For sending  the mail, the mobile or emulator’s mail client  should be pre-configured to a mail id.

Make sure you have enabled the pop3 setting in your email settings.

Android Viewflipper Example

Here is a small and easy example of how to use viewflipper in android. Android viewflipper is used to add multiple views in a single Flipper.

ViewFlipperName.showNext() is used to show the next item in flipper.

Android Check GPS is Enabled or Not

In android, we can easily check whether GPS is enabled in device or not using LocationManager.
Here is a simple program to Check.
GPS Enabled or Not :-
Add the below user permission line in AndroidManifest.xml to Access Location
[sourcecode language="xml"]
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
Your java class file sgould be
[sourcecode language="java"]
public class ExampleApp extends Activity {
/** Called when the activity is first created.

Syndicate content