Packagecom.distriqt.extension.pushnotifications.builders
Classpublic class ChannelBuilder
InheritanceChannelBuilder Inheritance Object



Public Methods
 MethodDefined By
  
ChannelBuilder
  
Create an instance of the Channel
ChannelBuilder
  
enableLights(enabled:Boolean):ChannelBuilder
Sets whether notifications posted to this channel should display notification lights, on devices that support that feature.
ChannelBuilder
  
Sets whether notification posted to this channel should vibrate.
ChannelBuilder
  
setDescription(description:String):ChannelBuilder
Sets the user visible description of this channel.
ChannelBuilder
  
setGroup(groupId:String):ChannelBuilder
Sets what group this channel belongs to.
ChannelBuilder
  
setId(channelId:String):ChannelBuilder
The id of the channel.
ChannelBuilder
  
Sets the level of interruption of this notification channel.
ChannelBuilder
  
setName(name:String):ChannelBuilder
Sets the user visible name of this channel.
ChannelBuilder
  
setShowBadge(enabled:Boolean):ChannelBuilder
Sets whether notifications posted to this channel can appear as application icon badges in a Launcher.
ChannelBuilder
  
setSound(sound:String):ChannelBuilder
Set the sound to play when a notification is displayed in this channel.
ChannelBuilder
Constructor Detail
ChannelBuilder()Constructor
public function ChannelBuilder()



Method Detail
build()method
public function build():Channel

Create an instance of the Channel

Returns
Channel — Channel
enableLights()method 
public function enableLights(enabled:Boolean):ChannelBuilder

Sets whether notifications posted to this channel should display notification lights, on devices that support that feature.

Parameters

enabled:Boolean — true if notification lights should be allowed

Returns
ChannelBuilder — The instance of the ChannelBuilder for chaining
enableVibration()method 
public function enableVibration(enabled:Boolean):ChannelBuilder

Sets whether notification posted to this channel should vibrate.

Parameters

enabled:Boolean — true if vibration should be allowed

Returns
ChannelBuilder — The instance of the ChannelBuilder for chaining
setDescription()method 
public function setDescription(description:String):ChannelBuilder

Sets the user visible description of this channel.

The recommended maximum length is 300 characters; the value may be truncated if it is too long.

Parameters

description:String

Returns
ChannelBuilder — The instance of the ChannelBuilder for chaining
setGroup()method 
public function setGroup(groupId:String):ChannelBuilder

Sets what group this channel belongs to. Group information is only used for presentation, not for behavior.

Parameters

groupId:String — The id of a group

Returns
ChannelBuilder — The instance of the ChannelBuilder for chaining
setId()method 
public function setId(channelId:String):ChannelBuilder

The id of the channel. Must be unique per package. The value may be truncated if it is too long.

Parameters

channelId:String

Returns
ChannelBuilder — The instance of the ChannelBuilder for chaining
setImportance()method 
public function setImportance(importance:int):ChannelBuilder

Sets the level of interruption of this notification channel.

Parameters

importance:int — The amount the user should be interrupted by notifications from this channel. See Channel.IMPORTANCE_... values.

Returns
ChannelBuilder — The instance of the ChannelBuilder for chaining
setName()method 
public function setName(name:String):ChannelBuilder

Sets the user visible name of this channel.

The recommended maximum length is 40 characters; the value may be truncated if it is too long.

Parameters

name:String

Returns
ChannelBuilder — The instance of the ChannelBuilder for chaining
setShowBadge()method 
public function setShowBadge(enabled:Boolean):ChannelBuilder

Sets whether notifications posted to this channel can appear as application icon badges in a Launcher.

Parameters

enabled:Boolean — true if badges should be allowed to be shown

Returns
ChannelBuilder — The instance of the ChannelBuilder for chaining
setSound()method 
public function setSound(sound:String):ChannelBuilder

Set the sound to play when a notification is displayed in this channel.

Parameters

sound:String — The local path to a sound (eg "assets/notifications/sounds/notification.mp3" )

Returns
ChannelBuilder — The instance of the ChannelBuilder for chaining