Turn on speakerphone whenever an outgoing call is made

My requirement is to turn on speakerphone whenever an outgoing call is initiated. I tried the following code, but it is not working. In fact, speakerphone turns on when in the middle of a call, a second call comes ! package in.co.allsolutions; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.telephony.TelephonyManager; import android.util.Log; //import […]

How to set a background image in android

Im very new to this android development.I just started to create a hello world application. I tried to set a background image and it is working fine.When i tried to add a text on the image it is not working. I tried in the way below.Can anyone please help me where im going wrong. in […]

Animate list items in ListView

I try to animate new items in my ListView. I have stable id-s, so I know exactly which element to animate. The problem comes from the recycle mechanism of ListView. I call startAnimation on the View when I know I got a recently inserted element. But then, the view got recycled, filled with different data. […]

Protect script from bots and unwanted requests posting data

I’m modifying an Android app that utilizes a webapp via a webview. Currently the the code base for the webapp is written in ColdFusion – so all the session management is done in CF. There are certain hooks in the webapp that force the Android app to do native functions and sometimes call external scripts […]

How to add custom action bar with navigation drawer?

I tried using Custom Action bar as: bar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM); bar.setCustomView(R.layout.xyz); but navigation drawer becomes invisible.

how to resolve this error “com.android.internal.telephony cannot be resolved to a type” in android

i am creating simple call filter application which restrict unwanted calls. i use following code to restrict call but i am unable to resole problem of this line in below code ” com.android.internal.telephony.ITelephony telephonyService = (ITelephony) m.invoke(tm); ” it show the error message com.android.internal.telephony cannot be resolved to a type in android how to resolve […]

How to program a simple music sequencer for Android (Java)

What I want to do: I would like to program a very simple music sequencer for Android. But I’ve never worked with audio on Android or in Java, respectively. What the application should do: play back samples (WAVE/OGG files) play several audio channels simultaneously (e.g. the trumpet and the flute should play simultaneously, maximum of […]

Must be one of: View.VISIBLE, View.INVISIBLE, View.GONE

This question already has an answer here: Not able to dynamically set the setVisibility() parameter 2 answers

passing custom object to android service in different process

I have a service that is set to start in a separate process: <service android:name=”.services.UploadService” android:process=”:UploadServiceProcess” /> And I can successfully bind to it using bindService(). My issue occurs when I try to send a message by calling Messenger.send(): service.send(Message.obtain(null, UploadService.MESSAGE_UPLOAD_REQUEST, uploadRequest)); where uploadRequest is a custom object that implements Parcelable public class UploadRequest implements […]

default camera to take a picture in android

How to use default camera to take a picture in android ?

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