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

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...

Launch application after phone boot or screen unlock in Android using BroadcastReceiver

We have BroadcastReceiver to listen to the system events. There are receivers like BOOT_COMPLETED, SCREEN_ON, USER_PRESENT which we can register to perform any specific task when phone boots or screen unlocks. The same we are using here to Launc...

How to generate MD5 and SHA-1 fingerprints for an android application

By following these steps you can be able to generate MD5 and SHA1 fingerprint for your android application using command prompt.(It will surely work in windows7) First of all you need to get the paths for keytool and keystore. keytool you...

How to get SMS from an Android Device programatically

To get SMS conversation from an Android device we will use following code: ContentResolver contentResolver = getActivity().getContentResolver(); Uri uri = Uri.parse("content://sms/conversations/"); Cursor cursor = con...

Associate your actionbar popup menu with the hardware menu button in Android.

Google Kills Android Menu Button, Replaces It with Action Bar But still so many devices have hardware menu button so now we can combine hardware menu button along with action bar option popup menu by just doinig a small trick. When you clicks...

Steps to download a file in android using Asynctask

Five Steps for downloading a file using AsyncTask in android Declare the reference of ProgressDialog class in your Activity globally. Ex:- ProgressDialog mProgressDialog; Instantiate the above reference in onCreate() method of activity...

Dynamicaly load more items to the ListView

To dynamically load more items to the ListView when you scroll at the bottom, we implement onScroll() method in which we can find out the which item is visible when we will reach at bottom it will load more items. Following steps are used fo...
1 19 21 next
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: