Friday, April 6, 2012

Android FAQ

The following are the problems I am facing while developing apps on Android.

Question 1: [App in com.android.phone ]
Can my App run in an exsisting process ?
Answer :
Well i tried to just change the application attribute in the AndroidManifest.xml but it didnt work .
You have to change the attribute of the android component in the manifest. By android component I mean , Broadcast listeners , Activities and services. Please check this out
----------------------------------------------------------------------------------------------------------
Setting Application Manifest : GIT Code from the Android GB
----------------------------------------------------------------------------------------------------------
        <activity android:name="IccLockSettings" android:label="@string/sim_lock_settings"
                android:process="com.android.phone">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.VOICE_LAUNCH" />
            </intent-filter>
        </activity>
 ----------------------------------------------------------------------------------------------------------

Interview Questions Feb 2012

This is what I have heard someone got asked.

1. What are the Kinds of Android Services

The answer is here : http://developer.android.com/guide/topics/fundamentals/services.html

I was asked where the binder is given to the calling Api. I forgot the answer for this.
The answer is here : http://developer.android.com/guide/topics/fundamentals/bound-services.html

private ServiceConnection mConnection = new ServiceConnection() {

        @Override
        public void onServiceConnected(ComponentName className,
                IBinder service) {
                }
}