Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

How to show Distribution Bar Graphs in Android

From here you can be able to display the Bar Graphs through android applications. First of all you need to add achartengine-1.0.0.jar to your project . Which can be easily downloaded from here Now you can use the following activity, in which...

How to create a Custom Button

How to create Custom Button in Android In Android it is very easy to use buttons , eclipse Ide provides you with drag and drop functionality.But we can use different approach and create our own custom button. create an android projec...

How to open an URL in Android's web browser using intent

Here is how we can open an URL in Android's web browser. Just pass the URL in Intent like: Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.evontech.com")); startActivity(intent); Also, do not forget to add the inte...

How to check if a device has camera in Android

At times, we make apps which use camera feature but that app can also be used on non camera devices for other features. There we have to apply a check on using the camera feature, that is as follows: PackageManager packageManager = activity.ge...

How to use Permissions in Android

Android use Permissions In android we have to set permissions in the project manifest file to get the required android resource. In a basic android application there are no permissions associated with it by default,so it cannot affect the...

How to add ImageView to the Layout

How to add imageview to the layout and change the source of the image with the click of the button. This is a very simple android code in which we set the mage view in the layout and then use the the imageview to set the new source.This ...

Creating shapes,Boder,selector and Drawable using xml in Android

This blog will help you to Create shapes,Border,selector and Drawable using xml in Android. 1.Selector for a button: Create xml file named background_selector.xml in res/drawable and write the bellow code in that <?xml version="1.0" enco...

How to create a simple Timer in Android

In this tutorial we will make a simple android timer application using a Handler.In the layout of the main activity we will set a TextView to Display the timer and to Buttons for Start and Pause. We set the string resource for the timer value...

How to make a Gridview with Horizontal scrolling

Here for the scrolling Grid View I have use SectionPagerAdapter . Simply what I have done here is that , i have created a Fragment with a layout containing a grid view. And with the help of SectonpagerAdapter the fragment will inflate as many as ...

Read Data From Raw Resource in Android

How to read raw data from raw resource in android. In this tutorial i am using a text file as a raw resource in res/raw/wordslist.txt .This text file is read by the activity and you can use the data whatever way you like. for eg You can...

Android Custom camera

This tutorial helps you how to create custom camera app, with the help of the following sample code. The Custom camera capture the image with auto focus and flash on the click of the capture button.Some developers may require a camera u...

Getting roundedCorner for an Image in Android

Sometimes we need to display images with rounded corners in our several Applications, and this can be done very easily by writing some lines of code. To get roundedCorner for an Image use the following code: /** * This method is used to ...

How to record an audio and save the audio file

In this tutorial, I'll be making a UI with a start/stop recording button. I am using MediaRecording class to record the audio. After making the layout, Call the method below on click of the mike button in the respective class: MediaRecorder...

Post in FaceBook using your Android device via feed dialog

In many applications we have to share content, links etc on Facebook. We can achieve this by using Facebook feed dialog. The following lines of code explains how to use feed/publish dialog. First you need to get the app id and create a meta da...

Load Multiple Image From server using imageloader class store in cache memory in android

Displaying images in a mobile application is one of the most common tasks for app developers. It can be quite challenging to efficiently load multiple images and display it on list-view or grid-view in Android. You can use following single...

Steps to import and use appcompat v7 support library in your project

If you want to use the ActionBar APIs in the support library. So before you can add the action bar, you must have to set up your project with the appcompat v7 support library. Steps given below to import and setup appcompat v7 support library...

Custom Dialog like spinner in android

If you want to create a dialog which will look like as spinner dialog of single choice in android which will open in button click event than you can create a custom dialog. Sample code given below :- You just have to call this method on cli...

TabHosting using TabActivity in android

TabHosting can be used to explore and switch between different views or functional aspects of your app. In this tutorial we will make an activity and host three activities to its tab by using tab hosting . Tab layout is used for this purp...

How to create app icon on home screen on app installation in Android

Here is how we can create app shortcut icon on device's home screen after app installation: There's only a few lines of code. if(!MyUtility.getIsFirstTime(splash).equals("true")) { MyUtility.setIsFirstTime(splash, "tru...

Save ArrayList of Object into Shared Preferences in Android

Sometime we need to save ArrayList of Objects into Shared preferences so that we can use that data in multiple Activities when required. We can do that easily as below: Suppose we have model Users as below: public class Users { privat...

Impleneting a Navigation Drawer in Android

Navigation drawer :It can used as an app's main navigation option on the left edge of the screen. it it hidden all the time and revealed on the click of the app icon or swipe gesture from the left of the screen. Navigation drawer is used...

Easy methods of incorporating Google maps for Android

First create a layout for Map Activity. The name of layout is activity_main.xml <fragment xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/map" class="com.google...

Set Alarm Using TimePicker in Android

This tutorial will help you in creating an android application to set alarm using TimePicker. This is a basic android tutorial which will make you familiar with Intents , Pending Intents and BroadcastReceiver. Step 1: Create an android ...

How to display multiple images one after another in some time interval

Sometimes we need to display ads in our application.To display the multiple images one after another in some time interval write the following code: Create a customTimerTask class that extends the TimerTask class public class customTime...

getting contact information from contact list in Android

We can get a contact information for any contact from contact list of an Android Device easily. For this follow the steps below: Write the permission to read Contact's data into your AndroidManifest.xml <uses-permission android:name="a...

Using TTS(TextToSpeech) in Android

We have a feature called TextToSpeech and is available for Android 1.6 and higher. Usind TTS we can build an app that speaks the text of various languages. Below are the steps to do so: Simply create an xml layout that includes an input ...

How to Use Services in Android Simple Example

Using Services In Android Service is an application component which runs in the background and do not have a user interface.Services can be of two forms:: Started Service can be started from an application component such ...

Make payment using PayPal MPL(Mobile Payment Libraries) in Android

There are certain applications in which we need to integrate the PayPal for enabling the user to pay certain amount to use further features of the app. Before starting, download the PayPal_MPL.jar file from PayPal developer's website and copy ...

Android Screen recording using ADB shell in Android KitKat 4.4

The feature is available for devices running Android 4.4(API level 19) and higher. We use screenrecord command to perform this task. The screen activity is recorded to an MPEG-4 file, and the same can be downloaded from the device. Below is th...

Sorting an ArrayList by date

From here you can learn how to sort an Array List of a particular data type by one it date component. :- By calling the method below you can easily sort your array list. The format you put inside the SimpleDateFormat method is the format of...

Set Google Map API v2 in android

Set Google map in android application To get a google map view in your android application .First you have to create your Google Api Key on the following link https://code.google.com/apis/console/ . First make a project on t...

Load Image From Url

How To Load a Image Form a url You can use this class in your application to load image . It can be use by calling its DisplayImage(String url, int loader, ImageView imageView) function.This function there are three parameters first is Str...

GPS tracking in android tutorial

If you want to integrate GPS tracked latitude longitude to your application, then u need to add a GPS module to your program to make your app more smarter ,to automatically get the GPS tracked location in your app. In this tutorial ...

Use existing sqlite database in android

I will show you the easiest solution, by far, is to use SQLiteAssetHelper. You add your existing sqlite database in a specified location in your project's assets/ directory, then use SQLiteAssetHelper to access your database (much same as you wo...

Adjust Image view width dynamically according to the screen size in android.

It is very difficult to re-size the image-view width according to the screen without losing the quality of the image or you can say increase the width in proportionate to height of the image view. I will show you the trick how you can do tha...

Finding Current Location in Android

To find the current location, follow the steps below: Create a dialog box to display loading message while finding the location ProgressDialog dialog=new ProgressDialog(this); dialog.setMessage("Please wait while getting your location in...

Make String with different colors in Android

We will use SpannableString to add different colors to a string and will use the setSpan(Object what, int start, int end, int flags) method of SpannableString to change the color for defined range of characters in that string. Here is the cod...

Fragment Tutorial in Android

This tutorial helps you how to use Fragment Class in android Application the sample code give you the brief on how you can use an fragment class. In main Activity we have created four fragments. And use FragmentManager and FragmentTransaction...

Using ViewPager for Screen Slides in Android

ViewPagers have built-in swipe gestures to transition through pages You don't need to add any animation. sample code : Set your main Activity layout as: in mainactivity Layout xml file set relative layout,in it set the view p...

How To use dataBase in Your android App

Use DataBase Helper Class in your code, Which extends the base class SQLiteOpenHelper Class Sample code package com.searchoffers.android; import java.util.ArrayList; import java.util.List; import android.content.ContentValues; ...

How to use Gallery for scrolling images with page indicator in android

First of all you need to use a custom class in place of Gallery :- package com.pakagename; import android.content.Context; import android.util.AttributeSet; import android.view.KeyEvent; import android.view.MotionEvent; import android.wid...

How to change the Image orientation in Android

To change the orientation of an image write the following code: BitmapFactory.Options o2 = new BitmapFactory.Options(); o2.inSampleSize = 2; // Get the original bitmap from the filepath to which you want to change orientation // fileName i...

Play YouTube videos and other Webview videos in Android.

In android playing videos from web-view is such a mess but now just using a small trick you can play all web videos of the YouTube, Daily-motions, etc. You just have to add this method in your web-view Activity. Here is the trick-: ...

How to make your Android Applications better by applying the Drag and drop functionality

Drag and Drop functionality provides user a facility to move a data (or object) from one view to another. This tutorial will help you with the development of the Drag and Drop functionality in your android application. For this you require API l...

Giving Android Dialog a custom layout.

We see situations while developing an app that we need to put certain things inside the Android Dialog box. Here is how we can achieve the same: First, create the layout that you want to give to the Dialog. Below is a sample layout: custom_...

Get Facebook messages in Android

Note- Facebook provides 25 latest message conversation. To get Facebook chat messages in Android, following steps are used: Define the 'read_mailbox' property as below: private static final List PERMISSIONS = Arrays.asList("read_mailbo...

Custom Search in ListView

In OnCreate() Method add addTextChangedListener(new TextWatcher() to an EditText View example: searchEditText.addTextChangedListener(new TextWatcher() { @Override public void onTextChanged(CharSequence s, int ...

Playing with date format in Android

We can change date format of a date as below: Here, I have defined different date formats: String FACEBOOK_DATE_FROMAT = "yyyy-MM-dd'T'HH:mm:ssZZZZZ"; String MESSAGE_DATE_FORMAT = "MM/dd/yyyy hh:mm a"; String MESSAGE_DATE_TIME_FORMAT = "M...

Getting MMS from an Android Device programmatically

To get MMS conversation from an Android device, use the following code: ContentResolver contentResolver = getActivity().getContentResolver(); Uri uri = Uri.parse("content://mms"); Cursor cursor = contentResolver.query(uri, null, "thread_id ...

Download and Install Android paid app for free

Do you want to install paid application present in Google market without wasting your money? If "YES" then you can follow these steps. Step 1: Open the Google Play in your android device. Step 2: Search your desired app in search bar. St...
1 20
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: