These features have been added in 5.0.0 release of the SDK.

Common features

You can check out our tutorials for a sample on how to use the new features in an app: https://gitlab.linphone.org/BC/public/tutorials

Audio routes

See the dedicate page about audio devices.

Automatic iterate()

The newly added auto iterate mode is enabled by default on Android & iOS, but you can disable it with either core.setAutoIterateEnabled(false) method.

You can also configure that behavior in the config file like this:

[misc]
auto_iterate=0

If you forgot to disable it in the Core and you kept your existing code for scheduling the iterate nevermind, it will be of no consequence.

Foreground / Background modes

Previously developpers had to create code to detect whether the app was in foreground or background and call core.enterBackground() or core.enterForeground() accordingly.

This is no longer required as the liblinphone will do it by itself.

Accounts

ProxyConfig object is now deprecated, and a new object called Account replaces it.

Account offers the same features as ProxyConfig but with a simpler API.

To create an Account, first create a default AccountParams object, configure it and then create the Account with the AccountParams:

AccountParams params = core.createAccountParams();
Address identityAddress = core.interpretUrl("sip:username@domain.tld");
params.setIdentityAddress(identity);
params.setRegisterEnabled(true);
Address proxyAddress = core.interpretUrl("<sip:domain.tld;transport=tcp>");
params.setServerAddress(proxyAddress);
Account account = core.createAccount(params);
core.addAccount(account);
core.setDefaultAccount(account);

From the Account object you can get the current AccountParams but it is read-only.

If you want to edit an Account you must clone the AccountParams with params.clone(), edit it and set it back using account.setParams() !

Here's an example on how to configure change the transport to TLS on an Account:

Account account = core.getDefaultAccount();
AccountParams params = account.getParams().clone();
params.setTransport(TransportType.TLS);
account.setParams(params);

Push notifications

See the dedicated page about push notifications.

Android specifics

See Android's getting started page.

iOS Specifics

See iOS's getting started page.

Tags: