Android 无法调试以意图筛选器启动的活动

Android 无法调试以意图筛选器启动的活动,android,android-intent,csip-simple,Android,Android Intent,Csip Simple,我正在使用android studio并使用CsipSimple。我正在设法弄清楚一个呼出电话的流程 有一个名为Place call的方法,它触发处理scheme csip的action\u调用的意图 @Override public void placeCall(String number, Long accId) { if(!TextUtils.isEmpty(number)) { Intent it = new Intent(Intent.ACTION_CALL);

我正在使用android studio并使用CsipSimple。我正在设法弄清楚一个呼出电话的流程

有一个名为Place call的方法,它触发处理scheme csip的action\u调用的意图

@Override
public void placeCall(String number, Long accId) {
    if(!TextUtils.isEmpty(number)) {
        Intent it = new Intent(Intent.ACTION_CALL);
        it.setData(SipUri.forgeSipUri(SipManager.PROTOCOL_CSIP, SipUri.getCanonicalSipContact(number, false)));
        it.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        if(accId != null) {
            it.putExtra(SipProfile.FIELD_ACC_ID, accId);
        }
        getActivity().startActivity(it);
    }
}

@Override
protected void onNewIntent(Intent intent) {
    super.onNewIntent(intent);
    resetInternals();
}
下面是清单中处理操作的活动声明

<activity
            android:name="com.freemobile.ui.outgoingcall.OutgoingCallChooser"
            android:allowTaskReparenting="false"
            android:configChanges="orientation"
            android:excludeFromRecents="true"
            android:label="@string/call"
            android:launchMode="singleTask"
            android:permission="android.permission.USE_FREEMOBILE_SIP"
            android:process=":sipStack"
            android:taskAffinity=""
            android:theme="@style/DarkTheme.Dialog" >
            <intent-filter>
                <action android:name="android.intent.action.CALL" />

                <category android:name="android.intent.category.DEFAULT" />

                <data android:scheme="csip" />
                <data android:scheme="sip" />
                <data android:scheme="sips" />
            </intent-filter>
            <intent-filter android:priority="10" >
                <action android:name="android.phone.extra.NEW_CALL_INTENT" />

                <category android:name="android.intent.category.DEFAULT" />

                <data android:scheme="csip" />
                <data android:scheme="sip" />
                <data android:scheme="sips" />
            </intent-filter>
        </activity>


我在activity OutgoingCallChooser的onCreate方法中设置了一个调试点。但它从未出现过。请帮帮我。我是否遗漏了一些明显的内容?

您应该在活动中覆盖onNewIntent:

  @Override
protected void onNewIntent(Intent intent) 
{
    super.onNewIntent(intent);
   //Do something
}
更多信息请点击此处:

您应该在活动中覆盖onNewIntent:

  @Override
protected void onNewIntent(Intent intent) 
{
    super.onNewIntent(intent);
   //Do something
}
更多信息请点击此处:

由于清单中的android:launchMode=“singleTask”标志,您无法获得onCreate,只需在onNewIntent中放置一个断点,看看是否达到了目标。问题是我也在onNewIntent中尝试了调试点。它不起作用。但是,由于清单中的android:launchMode=“singleTask”标志,您无法获得onCreate,只需在onNewIntent中放置一个断点,看看您是否到达那里。问题是我也在onNewIntent中尝试了调试点。它不起作用。然而,Logcat是有效的