Notification.MessagingStyle.Message
public
static
final
class
Notification.MessagingStyle.Message
extends Object
| java.lang.Object | |
| ↳ | android.app.Notification.MessagingStyle.Message |
Summary
Public constructors | |
|---|---|
Notification.MessagingStyle.Message(CharSequence text, long timestamp, CharSequence sender)
Constructor |
|
Public methods | |
|---|---|
String
|
getDataMimeType()
Get the MIME type of the data pointed to by the Uri |
Uri
|
getDataUri()
Get the the Uri pointing to the content of the message. |
Bundle
|
getExtras()
Get the extras Bundle for this message. |
CharSequence
|
getSender()
Get the text used to display the contact's name in the messaging experience |
CharSequence
|
getText()
Get the text to be used for this message, or the fallback text if a type and content Uri have been set |
long
|
getTimestamp()
Get the time at which this message arrived |
Notification.MessagingStyle.Message
|
setData(String dataMimeType, Uri dataUri)
Sets a binary blob of data and an associated MIME type for a message. |
Inherited methods | |
|---|---|
java.lang.Object
| |
Public constructors
Notification.MessagingStyle.Message
Notification.MessagingStyle.Message (CharSequence text, long timestamp, CharSequence sender)
Constructor
| Parameters | |
|---|---|
text |
CharSequence: A CharSequence to be displayed as the message content |
timestamp |
long: Time at which the message arrived |
sender |
CharSequence: A CharSequence to be used for displaying the name of the
sender. Should be null for messages by the current user, in which case
the platform will insert getUserDisplayName().
Should be unique amongst all individuals in the conversation, and should be
consistent during re-posts of the notification.
|
Public methods
getDataMimeType
String getDataMimeType ()
Get the MIME type of the data pointed to by the Uri
| Returns | |
|---|---|
String |
|
getDataUri
Uri getDataUri ()
Get the the Uri pointing to the content of the message. Can be null, in which case is used.
| Returns | |
|---|---|
Uri |
|
See also:
getSender
CharSequence getSender ()
Get the text used to display the contact's name in the messaging experience
| Returns | |
|---|---|
CharSequence |
|
getText
CharSequence getText ()
Get the text to be used for this message, or the fallback text if a type and content Uri have been set
| Returns | |
|---|---|
CharSequence |
|
getTimestamp
long getTimestamp ()
Get the time at which this message arrived
| Returns | |
|---|---|
long |
|
setData
Notification.MessagingStyle.Message setData (String dataMimeType, Uri dataUri)
Sets a binary blob of data and an associated MIME type for a message. In the case where the platform doesn't support the MIME type, the original text provided in the constructor will be used.
| Parameters | |
|---|---|
dataMimeType |
String: The MIME type of the content. See
for the list of supported MIME
types on Android and Android Wear. |
dataUri |
Uri: The uri containing the content whose type is given by the MIME type.
|
| Returns | |
|---|---|
Notification.MessagingStyle.Message |
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
- FragmentManager.FragmentLifecycleCallbacks
- FragmentManagerNonConfig
- FragmentTransaction
- Instrumentation
- Instrumentation.ActivityMonitor
- Instrumentation.ActivityResult
- IntentService
- KeyguardManager
- KeyguardManager.KeyguardDismissCallback
- 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
- NotificationChannel
- NotificationChannelGroup
- NotificationManager
- NotificationManager.Policy
- PendingIntent
- PictureInPictureParams
- PictureInPictureParams.Builder
- Presentation
- ProgressDialog
- RemoteAction
- 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