When configuring an account that isn't sip.linphone.org, enable service notification to keep the service alive and have a better chance of receiving incoming calls because push notifications won't work
This commit is contained in:
parent
a1ee586a13
commit
cd1606643a
1 changed files with 6 additions and 0 deletions
|
@ -28,6 +28,7 @@ import android.view.WindowManager;
|
|||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import org.linphone.LinphoneManager;
|
||||
import org.linphone.LinphoneService;
|
||||
import org.linphone.R;
|
||||
import org.linphone.activities.DialerActivity;
|
||||
import org.linphone.activities.ThemeableActivity;
|
||||
|
@ -107,6 +108,11 @@ public abstract class AssistantActivity extends ThemeableActivity
|
|||
if (useLinphoneDefaultValues) {
|
||||
// Restore default values
|
||||
core.loadConfigFromXml(LinphoneManager.getInstance().getDefaultDynamicConfigFile());
|
||||
} else {
|
||||
// If this isn't a sip.linphone.org account, disable push notifications and enable
|
||||
// service notification, otherwise incoming calls won't work (most probably)
|
||||
LinphonePreferences.instance().setServiceNotificationVisibility(true);
|
||||
LinphoneService.instance().getNotificationManager().startForeground();
|
||||
}
|
||||
|
||||
if (proxyConfig == null) {
|
||||
|
|
Loading…
Reference in a new issue