Package org.linphone.core
Interface PushNotificationConfig
public interface PushNotificationConfig
Object holding push notification config that will be set in the contact URI
parameters of the Contact header in the REGISTER, if the
is configured to allow push notifications, see
.
This object can be accessed through the
be obtained from your
parameters of the Contact header in the REGISTER, if the
AccountParams
is configured to allow push notifications, see
AccountParams.setPushNotificationAllowed(boolean)
.
This object can be accessed through the
AccountParams
object, which canbe obtained from your
Account
object. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Instantiate a new push notification parameters with values from source.Gets the app's bundle identifier for "contact uri parameter".Gets the call_snd for "contact uri parameter".Gets the call_str for "contact uri parameter".Gets the groupchat_str for "contact uri parameter".Gets the msg_snd for "contact uri parameter".Gets the msg_str for "contact uri parameter".long
Gets the native pointer used by this class to make native method calls.getParam()
Gets the param for "contact uri parameter".getPrid()
Gets the prid for "contact uri parameter".Gets the provider for "contact uri parameter".Gets the remote token for "contact uri parameter".Gets the team id for "contact uri parameter".Gets the object stored in this object user's dataGets the voip token for "contact uri parameter".boolean
isEqual
(PushNotificationConfig otherConfig) Checks if two Push Notification Configurations are identical.void
setBundleIdentifier
(String bundleIdentifier) Sets the bundle_identifier for "contact uri parameter".void
setCallSnd
(String callSnd) Sets the call_snd for "contact uri parameter", specific for remote push
notification.void
setCallStr
(String callStr) Sets the call_str for "contact uri parameter", specific for remote push
notification.void
setGroupChatStr
(String groupChatStr) Sets the group_chat_str for "contact uri parameter", specific for remote push
notification.void
Sets the msg_snd for "contact uri parameter", specific for remote push
notification.void
Sets the msg_str for "contact uri parameter", specific for remote push
notification.void
Sets the param for "contact uri parameter".void
Sets the prid for "contact uri parameter".void
setProvider
(String provider) Sets the provider for "contact uri parameter".void
setRemotePushInterval
(String remotePushInterval) Specifies the interval in seconds between to subsequent remote push
notifications when remote push notifications are used to notify a call invite
to clients that haven't published any token for VoIP and background push
notifications.void
setRemoteToken
(String remoteToken) Sets the remote_token for "contact uri parameter", specific for remote push
notification.void
Sets the team id for "contact uri parameter".void
setUserData
(Object data) Sets the object to store in this object user's datavoid
setVoipToken
(String voipToken) Sets the voip_token for "contact uri parameter", specific for voip push
notification.toString()
-
Method Details
-
getBundleIdentifier
Gets the app's bundle identifier for "contact uri parameter".
- Returns:
- The app's bundle identifier if set, null otherwise.
-
setBundleIdentifier
Sets the bundle_identifier for "contact uri parameter".
It's not necessary if param is set. SeesetParam(java.lang.String)
.- Parameters:
bundleIdentifier
- The new bundle_identifier set for push notification
config.
-
getCallSnd
Gets the call_snd for "contact uri parameter".
- Returns:
- The call_snd, default value "notes_of_the_optimistic.caf".
-
setCallSnd
Sets the call_snd for "contact uri parameter", specific for remote push
notification.
- Parameters:
callSnd
- The new call_snd set for push notification config.
-
getCallStr
Gets the call_str for "contact uri parameter".
- Returns:
- The call_str, default value "IC_MSG".
-
setCallStr
Sets the call_str for "contact uri parameter", specific for remote push
notification.
- Parameters:
callStr
- The new call_str set for push notification config.
-
getGroupChatStr
Gets the groupchat_str for "contact uri parameter".
- Returns:
- The groupchat_str, default value "GC_MSG".
-
setGroupChatStr
Sets the group_chat_str for "contact uri parameter", specific for remote push
notification.
- Parameters:
groupChatStr
- The new group_chat_str set for push notification config.
-
getMsgSnd
Gets the msg_snd for "contact uri parameter".
- Returns:
- The msg_snd, default value "msg.caf".
-
setMsgSnd
Sets the msg_snd for "contact uri parameter", specific for remote push
notification.
- Parameters:
msgSnd
- The new msg_snd set for push notification config.
-
getMsgStr
Gets the msg_str for "contact uri parameter".
- Returns:
- The msg_str, default value "IM_MSG".
-
setMsgStr
Sets the msg_str for "contact uri parameter", specific for remote push
notification.
- Parameters:
msgStr
- The new msg_str set for push notification config.
-
getParam
Gets the param for "contact uri parameter".
- Returns:
- The param if set, null otherwise.
-
setParam
Sets the param for "contact uri parameter".
If it's not set, "team_id.bundle_identifier.services" will be used.- Parameters:
param
- The new param set for push notification config.
-
getPrid
Gets the prid for "contact uri parameter".
- Returns:
- The prid if set, null otherwise.
-
setPrid
Sets the prid for "contact uri parameter".
If it's not set, "voip_token&remote_token" will be used.- Parameters:
prid
- The new prid set for push notification config.
-
getProvider
Gets the provider for "contact uri parameter".
- Returns:
- The provider if set, null otherwise.
-
setProvider
Sets the provider for "contact uri parameter".
If not set, the default value will be used for "contact uri
parameter", "firebase" for android or "apns" for ios.- Parameters:
provider
- The new provider set for push notification config.
-
setRemotePushInterval
Specifies the interval in seconds between to subsequent remote push
notifications when remote push notifications are used to notify a call invite
to clients that haven't published any token for VoIP and background push
notifications.
In that case, several PNs are sent subsequently until the call is picked up,
declined or canceled. This parameter sets a value for
'pn-call-remote-push-interval' Contact header inside SIP REGISTER requests. A
value of zero will cause the deactivation of push notification repetitions and
the sending of the final notification. Thus, only the first push notification
will be sent. If specified the value must be in [0;30] If not specified
'pn-call-remote-push-interval' will not be added to Contact header.- Parameters:
remotePushInterval
- The new remote push interval set for push
notification config.
-
getRemoteToken
Gets the remote token for "contact uri parameter".
- Returns:
- The remote token if set, null otherwise.
-
setRemoteToken
Sets the remote_token for "contact uri parameter", specific for remote push
notification.
It's not necessary if prid is set. SeesetPrid(java.lang.String)
.- Parameters:
remoteToken
- The new remote_token set for push notification config.
-
getTeamId
Gets the team id for "contact uri parameter".
- Returns:
- The team id if set, null otherwise.
-
setTeamId
Sets the team id for "contact uri parameter".
It's not necessary if param is set. SeesetParam(java.lang.String)
.- Parameters:
teamId
- The new team id set for push notification config.
-
getVoipToken
Gets the voip token for "contact uri parameter".
- Returns:
- The voip token if set, null otherwise.
-
setVoipToken
Sets the voip_token for "contact uri parameter", specific for voip push
notification.
It's not necessary if prid is set. SeesetPrid(java.lang.String)
.- Parameters:
voipToken
- The new voip_token set for push notification config.
-
clone
Instantiate a new push notification parameters with values from source.
- Returns:
- The newly created
PushNotificationConfig
object.
-
isEqual
Checks if two Push Notification Configurations are identical.
- Parameters:
otherConfig
- ThePushNotificationConfig
object to compare to.- Returns:
- True only if the two configurations are identical.
-
setUserData
Sets the object to store in this object user's data- Parameters:
data
- the object to store
-
getUserData
Object getUserData()Gets the object stored in this object user's data- Returns:
- the object store if any, null otherwise
-
getNativePointer
long getNativePointer()Gets the native pointer used by this class to make native method calls.- Returns:
- the nativer pointer, as long
-
toString
String toString()
-