belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1
NotificationCompat.Action.Builder
public
static
final
class
NotificationCompat.Action.Builder
extends Object
java.lang.Object | |
↳ | android.support.v4.app.NotificationCompat.Action.Builder |
Builder class for NotificationCompat.Action
objects.
Summary
Public constructors | |
---|---|
NotificationCompat.Action.Builder(int icon, CharSequence title, PendingIntent intent)
Construct a new builder for |
|
NotificationCompat.Action.Builder(NotificationCompat.Action action)
Construct a new builder for |
Public methods | |
---|---|
NotificationCompat.Action.Builder
|
addExtras(Bundle extras)
Merge additional metadata into this builder. |
NotificationCompat.Action.Builder
|
addRemoteInput(RemoteInput remoteInput)
Add an input to be collected from the user when this action is sent. |
NotificationCompat.Action
|
build()
Combine all of the options that have been set and return a new |
NotificationCompat.Action.Builder
|
extend(NotificationCompat.Action.Extender extender)
Apply an extender to this action builder. |
Bundle
|
getExtras()
Get the metadata Bundle used by this Builder. |
NotificationCompat.Action.Builder
|
setAllowGeneratedReplies(boolean allowGeneratedReplies)
Set whether the platform should automatically generate possible replies to add to
|
NotificationCompat.Action.Builder
|
setSemanticAction(int semanticAction)
Sets the |
NotificationCompat.Action.Builder
|
setShowsUserInterface(boolean showsUserInterface)
Set whether or not this |
Inherited methods | |
---|---|
From
class
java.lang.Object
|
Public constructors
NotificationCompat.Action.Builder
NotificationCompat.Action.Builder (int icon, CharSequence title, PendingIntent intent)
Construct a new builder for NotificationCompat.Action
object.
Parameters | |
---|---|
icon |
int : icon to show for this action |
title |
CharSequence : the title of the action |
intent |
PendingIntent : the PendingIntent to fire when users trigger this action
|
NotificationCompat.Action.Builder
NotificationCompat.Action.Builder (NotificationCompat.Action action)
Construct a new builder for NotificationCompat.Action
object using the fields from an
NotificationCompat.Action
.
Parameters | |
---|---|
action |
NotificationCompat.Action : the action to read fields from.
|
Public methods
addExtras
NotificationCompat.Action.Builder addExtras (Bundle extras)
Merge additional metadata into this builder.
Values within the Bundle will replace existing extras values in this Builder.
Parameters | |
---|---|
extras |
Bundle |
Returns | |
---|---|
NotificationCompat.Action.Builder |
See also:
addRemoteInput
NotificationCompat.Action.Builder addRemoteInput (RemoteInput remoteInput)
Add an input to be collected from the user when this action is sent.
Response values can be retrieved from the fired intent by using the
getResultsFromIntent(Intent)
function.
Parameters | |
---|---|
remoteInput |
RemoteInput : a RemoteInput to add to the action |
Returns | |
---|---|
NotificationCompat.Action.Builder |
this object for method chaining |
build
NotificationCompat.Action build ()
Combine all of the options that have been set and return a new NotificationCompat.Action
object.
Returns | |
---|---|
NotificationCompat.Action |
the built action |
extend
NotificationCompat.Action.Builder extend (NotificationCompat.Action.Extender extender)
Apply an extender to this action builder. Extenders may be used to add metadata or change options on this builder.
Parameters | |
---|---|
extender |
NotificationCompat.Action.Extender |
Returns | |
---|---|
NotificationCompat.Action.Builder |
getExtras
Bundle getExtras ()
Get the metadata Bundle used by this Builder.
The returned Bundle is shared with this Builder.
Returns | |
---|---|
Bundle |
setAllowGeneratedReplies
NotificationCompat.Action.Builder setAllowGeneratedReplies (boolean allowGeneratedReplies)
Set whether the platform should automatically generate possible replies to add to
getChoices()
. If the NotificationCompat.Action
doesn't have a
RemoteInput
, this has no effect.
Parameters | |
---|---|
allowGeneratedReplies |
boolean : true to allow generated replies, false
otherwise |
Returns | |
---|---|
NotificationCompat.Action.Builder |
this object for method chaining
The default value is true
|
setSemanticAction
NotificationCompat.Action.Builder setSemanticAction (int semanticAction)
Sets the NotificationCompat.Action.SemanticAction
for this NotificationCompat.Action
. A NotificationCompat.Action.SemanticAction
denotes what an NotificationCompat.Action
's PendingIntent
will do (eg. reply, mark
as read, delete, etc).
Parameters | |
---|---|
semanticAction |
int : a NotificationCompat.Action.SemanticAction defined within NotificationCompat.Action with
SEMANTIC_ACTION_ prefixes |
Returns | |
---|---|
NotificationCompat.Action.Builder |
this object for method chaining |
setShowsUserInterface
NotificationCompat.Action.Builder setShowsUserInterface (boolean showsUserInterface)
Set whether or not this NotificationCompat.Action
's PendingIntent
will open a user
interface.
Parameters | |
---|---|
showsUserInterface |
boolean : true if this NotificationCompat.Action 's PendingIntent
will open a user interface, otherwise false |
Returns | |
---|---|
NotificationCompat.Action.Builder |
this object for method chaining
The default value is true
|
Annotations
Interfaces
- ActionBarDrawerToggle.Delegate
- ActionBarDrawerToggle.DelegateProvider
- ActivityCompat.OnRequestPermissionsResultCallback
- ActivityCompat.PermissionCompatDelegate
- FragmentManager.BackStackEntry
- FragmentManager.OnBackStackChangedListener
- LoaderManager.LoaderCallbacks
- NotificationCompat.Action.Extender
- NotificationCompat.Extender
- SharedElementCallback.OnSharedElementsReadyListener
- TaskStackBuilder.SupportParentable
Classes
- ActionBarDrawerToggle
- ActivityCompat
- ActivityManagerCompat
- ActivityOptionsCompat
- AlarmManagerCompat
- AppLaunchChecker
- AppOpsManagerCompat
- BundleCompat
- DialogFragment
- Fragment
- Fragment.SavedState
- FragmentActivity
- FragmentContainer
- FragmentController
- FragmentHostCallback
- FragmentManager
- FragmentManager.FragmentLifecycleCallbacks
- FragmentManagerNonConfig
- FragmentPagerAdapter
- FragmentStatePagerAdapter
- FragmentTabHost
- FragmentTransaction
- FrameMetricsAggregator
- JobIntentService
- ListFragment
- LoaderManager
- NavUtils
- NotificationCompat
- NotificationCompat.Action
- NotificationCompat.Action.Builder
- NotificationCompat.Action.WearableExtender
- NotificationCompat.BigPictureStyle
- NotificationCompat.BigTextStyle
- NotificationCompat.Builder
- NotificationCompat.CarExtender
- NotificationCompat.CarExtender.UnreadConversation
- NotificationCompat.CarExtender.UnreadConversation.Builder
- NotificationCompat.DecoratedCustomViewStyle
- NotificationCompat.InboxStyle
- NotificationCompat.MessagingStyle
- NotificationCompat.MessagingStyle.Message
- NotificationCompat.Style
- NotificationCompat.WearableExtender
- NotificationCompatExtras
- NotificationCompatSideChannelService
- NotificationManagerCompat
- RemoteInput
- RemoteInput.Builder
- ServiceCompat
- ShareCompat
- ShareCompat.IntentBuilder
- ShareCompat.IntentReader
- SharedElementCallback
- TaskStackBuilder
Exceptions