自分のアプリを使用して発信通話を処理しようとすると、最近のアプリにゾンビ/ゴースト/セカンド ネイティブ電話ダイヤラーが表示されます。これは、レシーバーで setResultData(null) を呼び出すことに関連しているようです。
ネクサス 4 (アンドロイド 4.3)
正しい権限を追加しました
<uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS" />
そして、次のように受信機を登録しました
<receiver android:name=".OutGoingCallReceiver">
<intent-filter>
<action android:name="android.intent.action.NEW_OUTGOING_CALL" />
</intent-filter>
</receiver>
そして作成します:
public class OutGoingCallReceiver extends BroadcastReceiver{
@Override
public void onReceive(Context context, Intent intent) {
// Cancel the broadcast and prevent other receivers from picking it up
setResultData(null);
// Do awesome call handling here
//...
}
}
何が間違っているのですか?