Category : Android

Asynchronous ImageLoading in Listview android

  Asynchronous ImageLoading in Listview: There are some libraries available for async Image Loading. Some Of them are: 1.Universal Image Loading 2.AndroidQuery(AQuery)   Here I will explain Async image Loading with “Universal Image Loader”.Following are the steps: Step1: Download universal-image-loader-1.9.2.jar  file add add this in libs folder of your project.   Step2: Create the instance

Read More →

1,516 total views, 2 views today

Record Video using mediRecorder API

Steps to record video are

  592 total views, no views today

592 total views, no views today

Get Instance of currently visible Fragment in view pager

There are two ways to get the instance of current visible item in view Pager. 1. First way is: Step1: get the position of viewpager using int item = mViewpager.getCurrentItem(); Step2: find the tag of fragment using item which you added at the time of fragment add or replace String tag = “”; if(item ==

Read More →

10,205 total views, 5 views today

Soundpool vs Media Player in Android

There are two methods for playing sounds in android Soundpool and Media Player. Soundpool : Soundpool is designed for short clips which can be kept in memory decompressed for quick access, this is best suited for sound effects in apps or games. Using this method with soundboards is a bad idea as you will be loading

Read More →

2,403 total views, no views today

Record and Save Voice

Below is the code for recording a voice through mic and saving it in sdcard :   //Code for saving recording private void startRecording(){ mRecorder = new MediaRecorder(); File sampleDir = Environment.getExternalStorageDirectory(); try { audiofile = File.createTempFile(“sound”, “.3gp”, sampleDir); } catch (Exception e) { // TODO: handle exception Log.e(“Path Error”, “Error in making directory”); }

Read More →

818 total views, no views today

1 2 3 4 6