I'm having issue trying to handle a phone call. I'm trying with an intentReceiver but it doesn't seem to work... Since I don't know how to make a incoming phone call on the emulator, I tried to handle others actions such as TIME_TICK but I doesn't seem to work either...
First, what I've done :
AndroidManifest.xml :
- Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.bibi">
<application android:icon="@drawable/icon">
<activity class=".App" android:label="@string/app_name">
<intent-filter>
<action android:value="android.intent.action.MAIN" />
</intent-filter>
<receiver class=".OutGoingCallReceiver">
<intent-filter>
<action android:value="android.intent.action.DIAL" />
<action android:value="android.intent.action.TIME_TICK" />
</intent-filter>
</receiver>
</activity>
</application>
</manifest>
My IntentReceiver :
- Code: Select all
public class OutGoingCallReceiver extends IntentReceiver {
@Override
public void onReceiveIntent(Context context, Intent intent) {
NotificationManager nm = NotificationManager.from(context);
nm.notifyWithText(12555,"Action : " + intent.getAction(),NotificationManager.LENGTH_LONG,null);
Log.w(App.class.toString(),"Action : " + intent.getAction());
}
public OutGoingCallReceiver(){}
}
But when the "time ticks" (minute changes) nothing happens.
So I have several questions :
1. Does the emulator broadcast all action like it should or is it limited?
2. Is my code OK?
Thanks








