Class CallConfiguration
The calling identity this app presents to the operating system: the name shown above a call, the icon beside it, the ringtone, and what kinds of address the app understands.
Hand one to Calls.configure(CallConfiguration) before reporting anything. On Android this
registers the PhoneAccount, and until it has been registered
TelecomManager silently ignores every incoming call the app reports
-- no error, no call, nothing in the log. That silence is why configuring
is a separate step rather than something inferred from the first call.
What cannot be set here
On iOS the provider's name, icon and ringtone are also needed before any
of this app's code runs, because a call arriving as a VoIP push is
reported to the system by native code during launch. Those come from build
hints baked into the app -- ios.call.providerName, ios.call.icon,
ios.call.ringtone -- and what is set here refines them once the app is
up. Setting only this and expecting a pushed call to ring with the right
name is the mistake the guide warns about.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a configuration with the defaults: audio only, calls in the system call log, no conferencing, phone-number and generic handles. -
Method Summary
Modifier and TypeMethodDescriptiondisplayName(String name) The name shown above a call.The display name, or null for the application's own.The address kinds the app understands.intHow many conferences may exist at once.intHow many calls may be in one conference.handleTypes(CallHandleType[] types) Replaces the set of address kinds the app understands.includesCallsInRecents(boolean value) Whether calls appear in the system call log.booleanWhether calls appear in the system call log.booleanWhether video is offered.maximumCallGroups(int value) How many separate conferences may exist at once.maximumCallsPerGroup(int value) How many calls may be in one conference.videoSupported(boolean value) Whether the app offers video calls.
-
Constructor Details
-
CallConfiguration
public CallConfiguration()Creates a configuration with the defaults: audio only, calls in the system call log, no conferencing, phone-number and generic handles.
-
-
Method Details
-
displayName
The name shown above a call. Defaults to the application name. -
videoSupported
Whether the app offers video calls. -
includesCallsInRecents
Whether calls appear in the system call log. Turning this off also stops the user calling back from Recents, which is usually not what is wanted. -
maximumCallGroups
How many separate conferences may exist at once. -
maximumCallsPerGroup
How many calls may be in one conference. -
handleTypes
Replaces the set of address kinds the app understands.
At least one, and
nullrestores the defaults. An EMPTY array is refused rather than obeyed or ignored: it reads as "route nothing to me", which is not a configuration an account can hold -- a PhoneAccount with no URI scheme and a provider with no handle type can never be given a call -- and the ports had no way to tell it from "not set", so they filled in the defaults and the app silently got the types it had just removed. Refusing says so where the caller can still act on it.- Parameters:
types- the kinds, or null for the defaults- Throws:
IllegalArgumentException- whentypesis present and holds no usable kind
-
getDisplayName
The display name, or null for the application's own. -
isVideoSupported
public boolean isVideoSupported()Whether video is offered. -
isIncludesCallsInRecents
public boolean isIncludesCallsInRecents()Whether calls appear in the system call log. -
getMaximumCallGroups
public int getMaximumCallGroups()How many conferences may exist at once. -
getMaximumCallsPerGroup
public int getMaximumCallsPerGroup()How many calls may be in one conference. -
getHandleTypes
The address kinds the app understands.
-