Im trying to replace android incoming call screen. Here is the way i try;
A broadcastreceiver receive a broadcast when the phonstate is changed. The software can handle the imncoming calls and tries to abort broadcast, but this doesnot work. Is there any way to cancel or modify default incoming call screen.
Manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.cemtuver.fullycid"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="7" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<application android:icon="@drawable/icon" android:label="@string/app_name" android:enabled="true">
<receiver android:name=".FullycidReceiver">
<intent-filter>
<action android:name="android.intent.action.PHONE_STATE"></action>
</intent-filter>
</receiver>
</manifest>
FullycidReceiver:
public class FullycidReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
Bundle bundle = intent.getExtras();
if (bundle!=null) {
String state = bundle.getString(TelephonyManager.EXTRA_STATE);
Log.w("FULLYCID DEV LOG - STATE", state);
if (state.equals(TelephonyManager.EXTRA_STATE_RINGING)) {
setResultData(null);
abortBroadcast();
}
}
}
}
I've read some article that indicates that incoming call broadcast is un-oredered broadcast so broadcast priority is not important and the broadcast cannot be aborted.