Android: Need to record mic input

Is there a way to record mic input in android while it is being process for playback/preview in real time? I tried to use AudioRecord and AudioTrack to do this but the problem is that my device cannot play the recorded audio file. Actually, any android player application cannot play the recorded audio file. On […]

How to query Android MediaStore Content Provider, avoiding orphaned images?

I’m trying to provide an in-app Activity which displays thumbnails of photos in the device’s media store, and allow the user to select one. After the user makes a selection, the application reads the original full-size image and does things with it. I’m using the following code to create a Cursor over all the images […]

Is it safe to use .getWidth on Display even though its deprecated

So i have a small problem, i’m writing a function which need to send screen width to server. I got it all to work, and i use: Display display = getWindowManager().getDefaultDisplay(); int width = display.getWidth(); to get width. However .getWidht() function is deprecated and it says u need to use: Point size = new Point(); […]

How to use View Stub in android

I want to use ViewStub in android, so please help me. I have created ViewStub stub = new ViewStub; View inflated = stub.inflate(); How to use it programmatically?

Android: CountDownTimer skips last onTick()!

Code: public class SMH extends Activity { public void onCreate(Bundle b) { super.onCreate(b); setContentView(R.layout.main); TextView tv = (TextView) findViewById(; new CountDownTimer(10000, 2000) { public void onTick(long m) { long sec = m/1000+1; tv.append(sec+” seconds remain\n”); } public void onFinish() { tv.append(“Done!”); } }.start(); } Output: 10 seconds remain 8 seconds remain 6 seconds remain 4 […]

Android Studio: Gradle build fails — Execution failed for task ':compileDebugAidl'

After changes to source and building with gradle in Android Studio (I/O preview) AI – 130.677228 the build fails with the following error: Gradle: FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ‘:compileDebugAidl’. > No signature of method: is applicable for argument types: () values: [] Possible solutions: […]

PreferenceActivity Android 4.0 and earlier

Trying the different preference activities in the ApiDemos for Android 4.0, I see in the code that some methods are deprecated in, for example. So my question is: if I use PreferenceFragment, will it work for all version or only 3.0 or 4.0 and up? If so, what should I use that works for […]

Adding Tab inside Fragment In Android?

I am trying to add a TabHost inside a Fragment. The code is given below. Here inside the Fragment. I am trying to add TabHost to show two Tabs: package com.nordicsoft.dilosysNewVersion; import; import android.content.Intent; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TabHost; public class Fragment_Coupons extends Fragment { TabHost tabHost; TabHost.TabSpec spec; […]

Project has no target set. Edit the project properties to set one

When I import a new existing project into Eclipse, I get the following error message when attempting to execute as an Android project: Project has no target set. Edit the project properties to set one Any help is appreciated.

How to use AsyncTask correctly in Android

I don’t want to pass any arguments to doInBackground method of the AsyncTask. So what should be the code like?

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.