0
我想補充一個AlertDialog當接收到呼叫(SIP應用程序),我真的很困惑,如何在這個聯盟補充一點:我們如何將AlertDialog添加到此區塊?
public class IncomingCallReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
SipAudioCall incomingCall = null;
try {
SipAudioCall.Listener listener = new SipAudioCall.Listener() {
@Override
public void onRinging(SipAudioCall call, SipProfile caller) {
try {
call.answerCall(30);
} catch (Exception e) {
e.printStackTrace();
}
}
};
SIPCommunicator wtActivity = (SIPCommunicator) context;
incomingCall = wtActivity.manager.takeAudioCall(intent, listener);
incomingCall.answerCall(30);
incomingCall.startAudio();
incomingCall.setSpeakerMode(true);
if(incomingCall.isMuted()) {
incomingCall.toggleMute();
}
wtActivity.call = incomingCall;
wtActivity.updateStatus(incomingCall);
} catch (Exception e) {
if (incomingCall != null) {
incomingCall.close();
}
}
}
}
非常感謝您爲您的幫幫我。
我可以這樣做的:\? – androniennn 2011-04-25 15:52:45
我認爲你可以使用適當的意圖啓動一個活動,然後顯示活動 – Josnidhin 2011-04-25 16:00:43
內的改變對話框,像這樣Intent monIntent = new Intent(this,dialog.class); startActivity(monIntent); ?????? – androniennn 2011-04-25 16:42:00