Overrides the ContentTitle set in the Notification Builder.
BigPictureAsandroid.graphics.Bitmap [write only]
Provides the Big Picture to be used in the BigPicture notification.
Initialize
Helper class for generating large-format notifications that include a large image attachment. If the platform does not provide large-format notifications, this method has no effect.
IsInitializedAsBoolean
SummaryTextAsString [write only]
Sets the first line of text after the details section
Overrides the ContentTitle set in the Notification Builder.
BigTextAsString [write only]
Provides the longer text to displayed in the content area. Replaces ContextText.
Initialize
Helper class for generating large-format notifications that include a lot of text. If the platform does not provide large-format notifications, this method has no effect.
IsInitializedAsBoolean
SummaryTextAsString [write only]
Sets the first line of text after the details section
Actions are buttons displayed on the notification that can allow users to do something without starting the app. e.g Call back a missed call, pause a sound track, etc
The icon file should manually copied to the Objects\res\drawable\ folder and set to read-only. The file name is case sensitive and should not contain the file extension. If tag is set to "" then it will default to the passed title.
tags are named 'Notification_Action_Tag'
Use AddAction2 to pass a Service module instead of an Activity.
MAXIMUM of 3 Actions can be added to each notification.
Sets a custom vibrate pattern for new notification The Array of values can be as long as you wish. The first Value is the pause before vibration starts, then its ON, OFF, ON, OFF,........
Example: DimnbasNotificationBuilder Dimv() asLong
v = ArrayasLong(0, 100, 200, 300, 400)
nb.CustomVibrate(v)
DefaultLightAsBoolean [write only]
Sets whether the notification will show a light.
Setting to True will over ride any custom light settings.
Example: nb.DefaultLight = True
DefaultSoundAsBoolean [write only]
Sets whether the notification will play a sound.
Note: Setting to True will over ride any custom sound set.
Example: nb.DefaultSound = False
DefaultVibrateAsBoolean [write only]
Sets whether the notification will vibrate the device.
Note: Setting to True will over ride any custom vibration settings.
i.e NotificationWearableExtender is used to extend the notification with functions only available to Wearable devices.
GetNotificationAsandroid.app.Notification
Gets the Notification Object. Useful for things like Foreground Services
GroupAsString [write only]
Set this notification to be part of a group of notifications sharing the same key. Grouped notifications may display in a cluster or stack on devices which support such rendering.
To make this notification the summary for its group, also call nb.GroupSummary = True A sort order can be specified by using nb.SortKey(Key)
GroupSummaryAsBoolean [write only]
Set this notification to be the group summary for a group of notifications. Grouped notifications may display in a cluster or stack on devices which support such rendering.
The GroupSummary notification will not show on the notification stack on Wearables, but will show as the only notification on handheld devices. See URL Click
Requires a group key also be set using nb.Group(GroupKey)
Initialize
IsInitializedAsBoolean
LargeIconAsandroid.graphics.Bitmap [write only]
Add a large icon to the notification (and the ticker on some devices). In the platform template, this image will be shown on the left of the notification view in place of the small icon (which will move to the right side).
LocalOnlyAsBoolean [write only]
Sets whether or not this notification is only relevant to the current device. Some notifications can be bridged to other devices for remote display. I.E Wear Devices
Notify (idAsInt)
Displays the notification. id - The notification id. This id can be used later to update the notification (by calling Notify again with the same id), or to cancel the notification
NumberAsInt
Gets or Sets the number to be shown on the notification. This is useful to represent multiple events in a single notification.
OnGoingEventAsBoolean [write only]
Sets whether the notification is an 'ongoing event'. The notification will be shown in the ongoing section and will not be cleared.
OnlyAlertOnceAsBoolean [write only]
Sets whether the notification will only play sound / vibrate /show light if the notification is not already showing.
PriorityAsInt [write only]
Experimental - Googles' notes:- 'Set the relative priority for this notification. Priority is an indication of how much of the user's valuable attention should be consumed by this notification. Low-priority notifications may be hidden from the user in certain situations, while the user might be interrupted for a higher-priority notification. The system sets a notification's priority based on various factors including the setPriority value. The effect may differ slightly on different platforms.'
API 16+
setActivity (ActivityAsObject)
Sets the activity that will be launched when the Notification is tapped.
Use nb.Intent to use your own calling intent
setCustomLight (argbAsInt, onMsAsInt, offMsAsInt)
Sets a custom argb value for the notification light, also sets the rates at which it flashes. argb - The color that the devices led will flash. onMs - The time in milliseconds that the led will stay on each blink. offMs - The time in millliseconds that the led will be off after each blink.
NOTE: Not all devices will honour these settings, it is dependent on hardware abilities.
setDeleteActivity (ActivityAsObject)
Experimental - Setting a DeleteActivity will (should) show the activity when the user clears the notification manually.
API 11+
setDeleteService (ServiceAsObject)
Experimental - Setting a DeleteService will (should) show the service when the user clears the notification manually.
A{PI 11+
setIntent (intentAsandroid.content.Intent)
Sets the Intent that will be called when the Notification is tapped.
Use nb.Activity to call an activity in your project.
setParentActivity (ActivityAsObject)
Sets a Parent Activity to add to the 'Back Stack'. If this method is used then once you have entered an Activity from your notification, pressing back will return to the Parent Activity, rather than exiting the App.
Must be passed a style object:- NotificationInboxStyle NotificationBigTextStyle NotificationBigPictureStyle
API 16+
ShowTimeAsBoolean [write only]
Sets whether the time stamp is shown on the notification. Default is 'true'
SmallIconAsString [write only]
Sets the Small Icon to be displayed. The image file should manually copied to the Objects\res\drawable\ folder and set to read-only. The file name is case sensitive and should not contain the file extension. You can use "icon" to use the applications icon.
SortKeyAsString [write only]
Set a sort key that orders this notification among other notifications from the same package. This can be useful if an external sort was already applied and an app would like to preserve this. Notifications will be sorted lexicographically using this value.
This sort key can also be used to order members of a notification group.
SubTextAsString [write only]
Set the third line of text in the platform notification template. Don't use if you're also using setProgress(); they occupy the same location in the standard template. If the platform does not provide large-format notifications, this method has no effect. The third line of text only appears in expanded view.
API 16+
TagAsString [write only]
The Tag is a string that can be extracted later on Activity_Resume. This can be used to determine which notification has been clicked by the user when multiple notifications exist.
Example of extracting the Tag: SubActivity_Resume DiminasIntent DimintentExtraasString
in = Activity.GetStartingIntent Ifin.HasExtra("Notification_Tag") Then intentExtra = in.GetExtra("Notification_Tag")
EndIf EndSub
TickerAsString [write only]
Sets the Ticker Text which shows along side the status bar icon of new Notifications.
UsesChronoAsBoolean [write only]
If set the timestamp place on the notification will be used as a stopwatch. It will automatically update the minutes and seconds since .When()
API 16+
WhenAsLong [write only]
Sets the time stamp that shows on the notification. This should indicate the time the event occurred. Default is the current time. Setting to 0 will reset to current time.
Enables the Click action for a view in a custom layout.
View - The name of the view as defined in the xml layout Activity - The activity that will be launched when the view is clicked (Maybe service will work too) Tag - The tag that will be returned as an extra in the starting intent
Sets the parameters for a progress bar used in a notification
ProgressBar - The name of the progress bar as defined in the xml layout MaxProgress - the upper limit of the progress bar. A good value is 100 Progress - the current level of progress to be shown. Must be <= maxProgress. Indeterminate - set the progress bar as indeterminate
SetTextColor (TextFieldAsString, ColorAsInt)
Sets the color of the text in a text field in a custom layout
TextField - The name of the text element as defined in the xml layout Color - The color that will be assigned to the text element
SetTextField (TextFieldAsString, TextAsString)
Sets the text field in a custom layout
TextField - The name of the text element as defined in the xml layout Text - The string that will be assigned to the text element
Adds a line to the details section. You can add a MAXIMUM of 5 lines.
BigContentTitleAsString [write only]
Overrides the ContentTitle set in the Notification Builder.
Initialize
Helper class for generating large-format notifications that include a list of (up to 5) strings. If the platform does not provide large-format notifications, this method has no effect
IsInitializedAsBoolean
SummaryTextAsString [write only]
Sets the first line of text after the details section
Extracts a RemoteInput (voice) string from starting intent
Use this in the Activity_Resume of the Activity called by the Action. Example:
DimInasintent In = Activity.GetStartingIntent IfIn.HasExtra("Notification_Wear_Action_Tag") Then IfIn.GetExtra("Notification_Wear_Action_Tag") = TagThen'Tag set when adding Action to Notification DimRemasNotificationRemoteInput
ToastMessageShow(Rem.GetRemoteInput(In, Label), false) 'Label set on Initialize EndIf EndIf
Initialize (LabelAsString)
Initializes the object.
Label - Used to retrieve the reply later.
See GetRemoteInput for details on how to get the input.
NOTE: you do not need to call Initialize in order to use GetRemoteInput.
IsInitializedAsBoolean
LabelAsString [write only]
Sets the label to show when requesting for voice input
Similar to NotificatioBuilder.AddAction, but the Action will show on Wear Devices only. If this method is used the Wear device will NOT display any of the other actions.
Adds an additional page to notifications shown on Wear Device
Page - A new notification.
Example:
DimNotification1, Notification2asNotificationBuilder 'code to build notifications ...
Notification1.AddPage(Notification2.build())
...
BackgroundAsandroid.graphics.Bitmap
Set or Get the background of the Wear Notification (no matter what the Style)
BOTTOMAsInt
CENTER_VERTICALAsInt
ClearActions
Clears any previously added Actions.
ClearPages
Clears any previously added Pages.
ContentActionAsInt [write only]
Sets the action to be clickable with the content of this notification. i.e. When you click the main notification, it will trigger the Action.
This action will no longer display separately from this notification's content. For notifications with multiple pages, child pages can also have content actions set, although the list of available actions comes from the main notification and not from the child page's notification.
ActionIndex is the ID of the Action to use. ID's start at 0
ContentIconAsString [write only]
Sets the Icon that goes with the content of this notification
The image file should manually copied to the Objects\res\drawable\ folder and set to read-only. The file name is case sensitive and should not contain the file extension. You can use "icon" to use the applications icon.
ContentIconGravityAsInt [write only]
Sets the gravity for the ContentIcon. Supported values START, END Use the built in constants. e.g WearExtender.START
Sets whether the content intent is available when the wearable device is not connected to a companion device.
CustomContentHeightAsInt
Sets or Gets the custom height for the display of this notifications content.
NOTE: This option is only available for custom display notifications created using DisplayIntent
CustomSizePresetAsInt
Sets or Gets the custom size preset for the display of this notification out of the available presents. Use the built in constants. e.g. WearExtender1.SIZE_LARGE Possible values - SIZE_DEFAULT, SIZE_FULL_SCREEN, SIZE_LARGE, SIZE_MEDIUM, SIZE_SMALL, SIZE_XSMALL
ENDAsInt
GravityAsInt [write only]
Sets the gravity of the Notification on the device. Supported values BOTTOM, CENTER_VERTICALLY, TOP Use the built in constants. e.g WearExtender.TOP
HideIconAsBoolean [write only]
Hides the Icon if set to true.
Initialize
Initializes the object
IsInitializedAsBoolean
setDisplayIntent (ActivityAsObject)
Googles Docs ------------ Set an activity to be displayed while viewing the notification.
My Version after doing a little research ---------------------------------------- When creating a notification directly from an App on the Wear device, you can use custom layouts. This is done by creating the layout in an activity in the App. Then call this method, passing the layout activity as the Parameter.
The activity to launch needs to allow embedding, must be exported and should have an empty task affinity. It is also recommended to use the device default light theme. This is achieved by adding the following to the Manifest Editor
Only the background image of this notification should be displayed, and other semantic content should be hidden. This method only applies to sub Pages.
SIZE_DEFAULTAsInt
SIZE_FULL_SCREENAsInt
SIZE_LARGEAsInt
SIZE_MEDIUMAsInt
SIZE_SMALLAsInt
SIZE_XSMALLAsInt
STARTAsInt
StartScrollBottomAsBoolean [write only]
Sets whether the scrolling position for the contents of this notification should start at the bottom of the contents instead of the top when the contents are too long to display within the screen. Default is false (start scroll at the top)