Class PushedCall
A call that is already ringing when the app finds out about it.
This is the part of VoIP that surprises people. On iOS a call arriving as a
push must be shown to the user before any of this app's code runs -- the
operating system requires it and kills the app otherwise -- so by the time
a VoipPushListener is told, the phone is ringing, the lock screen shows
the caller, and the user may already have answered.
The app's job is therefore not to decide whether to ring. It is to attach
media to a call that exists, and then wait for
com.codename1.call.session.CallActionListener#answerRequested like any
other call. Android does not have the same constraint, but the port
synthesizes the same shape so that application code has one path.
-
Method Summary
Modifier and TypeMethodDescriptiongetData()The opaquedatafield from the push payload, or null.Who is calling, as the push said.longWhen the push arrived, in wall-clock milliseconds.The call, already reported to the system and usually ringing.booleanWhether the identifier was invented locally because the push payload carried none or carried a malformed one.booleanisStale()The call is over and cannot be answered.
-
Method Details
-
getSession
The call, already reported to the system and usually ringing. -
getHandle
Who is calling, as the push said. -
getData
The opaque
datafield from the push payload, or null.The framework never parses this. It exists because the deadline-bound native path cannot run app code, so anything the app needs -- a room id, a session token -- has to travel through and be read later.
-
isStale
public boolean isStale()The call is over and cannot be answered.
True for a call that rang while the app was not running and was finished -- unanswered, cancelled, or killed with the process -- before the app got here. Log it as a missed call and show it in history; do not attach media, and do not expect an answer action.
-
isIdentifierSynthesized
public boolean isIdentifierSynthesized()Whether the identifier was invented locally because the push payload carried none or carried a malformed one.
The call was still rung -- refusing would have killed the app -- but the identifier will not match the sender's, so signalling keyed on it will not line up. This flag exists so that a server-side bug is findable instead of presenting as calls that mysteriously never connect.
-
getReceivedAt
public long getReceivedAt()When the push arrived, in wall-clock milliseconds.
-