RemoteInput.Builder
public
static
final
class
RemoteInput.Builder
extends Object
| java.lang.Object | |
| ↳ | android.app.RemoteInput.Builder |
Builder class for RemoteInput objects.
Summary
Public constructors | |
|---|---|
RemoteInput.Builder(String resultKey)
Create a builder object for |
|
Public methods | |
|---|---|
RemoteInput.Builder
|
addExtras(Bundle extras)
Merge additional metadata into this builder. |
RemoteInput
|
build()
Combine all of the options that have been set and return a new |
Bundle
|
getExtras()
Get the metadata Bundle used by this Builder. |
RemoteInput.Builder
|
setAllowFreeFormInput(boolean allowFreeFormInput)
Specifies whether the user can provide arbitrary values. |
RemoteInput.Builder
|
setChoices(CharSequence[] choices)
Specifies choices available to the user to satisfy this input. |
RemoteInput.Builder
|
setLabel(CharSequence label)
Set a label to be displayed to the user when collecting this input. |
Inherited methods | |
|---|---|
java.lang.Object
| |
Public constructors
RemoteInput.Builder
RemoteInput.Builder (String resultKey)
Create a builder object for RemoteInput objects.
| Parameters | |
|---|---|
resultKey |
String:
the Bundle key that refers to this input when collected from the user
|
Public methods
addExtras
RemoteInput.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 | |
|---|---|
RemoteInput.Builder |
|
See also:
build
RemoteInput build ()
Combine all of the options that have been set and return a new RemoteInput
object.
| Returns | |
|---|---|
RemoteInput |
|
getExtras
Bundle getExtras ()
Get the metadata Bundle used by this Builder.
The returned Bundle is shared with this Builder.
| Returns | |
|---|---|
Bundle |
|
setAllowFreeFormInput
RemoteInput.Builder setAllowFreeFormInput (boolean allowFreeFormInput)
Specifies whether the user can provide arbitrary values.
| Parameters | |
|---|---|
allowFreeFormInput |
boolean:
The default is true.
If you specify false, you must provide a non-null
and non-empty array to setChoices(CharSequence[]) or an
IllegalArgumentException is thrown. |
| Returns | |
|---|---|
RemoteInput.Builder |
this object for method chaining |
setChoices
RemoteInput.Builder setChoices (CharSequence[] choices)
Specifies choices available to the user to satisfy this input.
| Parameters | |
|---|---|
choices |
CharSequence:
an array of pre-defined choices for users input.
You must provide a non-null and non-empty array if
you disabled free form input using setAllowFreeFormInput(boolean). |
| Returns | |
|---|---|
RemoteInput.Builder |
this object for method chaining |
setLabel
RemoteInput.Builder setLabel (CharSequence label)
Set a label to be displayed to the user when collecting this input.
| Parameters | |
|---|---|
label |
CharSequence:
The label to show to users when they input a response. |
| Returns | |
|---|---|
RemoteInput.Builder |
this object for method chaining |
Interfaces
- ActionBar.OnMenuVisibilityListener
- ActionBar.OnNavigationListener
- ActionBar.TabListener
- AlarmManager.OnAlarmListener
- Application.ActivityLifecycleCallbacks
- Application.OnProvideAssistDataListener
- AppOpsManager.OnOpChangedListener
- DatePickerDialog.OnDateSetListener
- FragmentBreadCrumbs.OnBreadCrumbClickListener
- FragmentManager.BackStackEntry
- FragmentManager.OnBackStackChangedListener
- KeyguardManager.OnKeyguardExitResult
- LoaderManager.LoaderCallbacks
- Notification.Action.Extender
- Notification.Extender
- PendingIntent.OnFinished
- SearchManager.OnCancelListener
- SearchManager.OnDismissListener
- SharedElementCallback.OnSharedElementsReadyListener
- TimePickerDialog.OnTimeSetListener
- UiAutomation.AccessibilityEventFilter
- UiAutomation.OnAccessibilityEventListener
Classes
- ActionBar
- ActionBar.LayoutParams
- ActionBar.Tab
- Activity
- ActivityGroup
- ActivityManager
- ActivityManager.AppTask
- ActivityManager.MemoryInfo
- ActivityManager.ProcessErrorStateInfo
- ActivityManager.RecentTaskInfo
- ActivityManager.RunningAppProcessInfo
- ActivityManager.RunningServiceInfo
- ActivityManager.RunningTaskInfo
- ActivityManager.TaskDescription
- ActivityOptions
- AlarmManager
- AlarmManager.AlarmClockInfo
- AlertDialog
- AlertDialog.Builder
- AliasActivity
- Application
- ApplicationErrorReport
- ApplicationErrorReport.AnrInfo
- ApplicationErrorReport.BatteryInfo
- ApplicationErrorReport.CrashInfo
- ApplicationErrorReport.RunningServiceInfo
- AppOpsManager
- AutomaticZenRule
- DatePickerDialog
- Dialog
- DialogFragment
- DownloadManager
- DownloadManager.Query
- DownloadManager.Request
- ExpandableListActivity
- Fragment
- Fragment.SavedState
- FragmentBreadCrumbs
- FragmentContainer
- FragmentController
- FragmentHostCallback
- FragmentManager
- FragmentManagerNonConfig
- FragmentTransaction
- Instrumentation
- Instrumentation.ActivityMonitor
- Instrumentation.ActivityResult
- IntentService
- KeyguardManager
- KeyguardManager.KeyguardLock
- LauncherActivity
- LauncherActivity.IconResizer
- LauncherActivity.ListItem
- ListActivity
- ListFragment
- LoaderManager
- LocalActivityManager
- MediaRouteActionProvider
- MediaRouteButton
- NativeActivity
- Notification
- Notification.Action
- Notification.Action.Builder
- Notification.Action.WearableExtender
- Notification.BigPictureStyle
- Notification.BigTextStyle
- Notification.Builder
- Notification.CarExtender
- Notification.CarExtender.Builder
- Notification.CarExtender.UnreadConversation
- Notification.DecoratedCustomViewStyle
- Notification.DecoratedMediaCustomViewStyle
- Notification.InboxStyle
- Notification.MediaStyle
- Notification.MessagingStyle
- Notification.MessagingStyle.Message
- Notification.Style
- Notification.WearableExtender
- NotificationManager
- NotificationManager.Policy
- PendingIntent
- Presentation
- ProgressDialog
- RemoteInput
- RemoteInput.Builder
- SearchableInfo
- SearchManager
- Service
- SharedElementCallback
- TabActivity
- TaskStackBuilder
- TimePickerDialog
- UiAutomation
- UiModeManager
- VoiceInteractor
- VoiceInteractor.AbortVoiceRequest
- VoiceInteractor.CommandRequest
- VoiceInteractor.CompleteVoiceRequest
- VoiceInteractor.ConfirmationRequest
- VoiceInteractor.PickOptionRequest
- VoiceInteractor.PickOptionRequest.Option
- VoiceInteractor.Prompt
- VoiceInteractor.Request
- WallpaperInfo
- WallpaperManager
Exceptions


