Tôi có thể tạo hồ sơ sip bằng cách sử dụng lớp SipProfile.Builder. Tôi đã sử dụng đoạn mã sau để làm điều đó:Xây dựng Hồ sơ Sip: Android
if (SipManager.isApiSupported(MyActivity.this)&& SipManager.isVoipSupported(MyActivity.this)) {
SipManager manager=SipManager.newInstance(this);
SipProfile.Builder builder;try {
builder = new Builder(userName,domainName);
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} manager = SipManager.newInstance(MyActivity.this);
builder.setPassword(password);
profile = builder.build();
try {
manager.open(profile);
} catch (SipException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try {
manager.register(profile, 30, MyActivity.this);
} catch (SipException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Toast.makeText(MyActivity.this, "created",
Toast.LENGTH_LONG).show();
} else {
Toast.makeText(MyActivity.this, "Not Supported",
Toast.LENGTH_LONG).show();
}
Nó hiển thị như một tài khoản nhâm nhi trong cài đặt/cuộc gọi/cài đặt cuộc gọi Internet. Vấn đề là tôi không thể làm cho nó như là tài khoản chính. Làm thế nào tôi có thể làm cho nó như là tài khoản chính?
Bạn có thể giải thích ý nghĩa của "tài khoản chính" không? – hovanessyan
trong khi thêm tài khoản sip theo cách thủ công trong điện thoại, có một tùy chọn "Đặt tài khoản này làm tài khoản chính". Vì vậy, làm thế nào tôi có thể làm cho nó lập trình. –