Meine BroadcastReceiver
empfängt nicht die gesendete Intent
. Was übersehe ich?
Manifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.app"
android:versionCode="1"
android:versionName="1.0" >
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
<uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS"/>
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".Preferences"
android:label="@string/title_activity_nrpreferences" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver android:name=".CallReceiver">
<intent-filter>
<action android:name="android.intent.action.ACTION_NEW_OUTGOING_CALL"/>
<action android:name="android.intent.action.ANSWER"/>
</intent-filter>
</receiver>
</application>
</manifest>
Empfänger
package com.app;
import static com.samsung.nr.control.NRPreferences.*;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.media.AudioManager;
import android.telephony.PhoneStateListener;
import android.telephony.TelephonyManager;
public class CallReceiver extends BroadcastReceiver {
private static boolean inCall = false;
private Context mContext;
@Override
public void onReceive(Context context, Intent i) {
Log("onReceive " + i.getAction());
}
}