public final class UploadNotificationConfig extends Object implements Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<UploadNotificationConfig> |
CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
UploadNotificationConfig()
Creates a new upload notification configuration with default settings:
android.R.drawable.ic_menu_upload will be used as the icon
If the user taps on the notification, nothing will happen
Once the operation is completed (either successfully or with an error):
the default notification sound will be emitted (or the default notification vibration if the device is in silent mode)
the notification will remain in the Notification Center until the user swipes it out
|
Modifier and Type | Method and Description |
---|---|
UploadNotificationConfig |
addActionForAllStatuses(UploadNotificationAction action)
Adds the same notification action for all the notification statuses.
|
int |
describeContents() |
UploadNotificationStatusConfig |
getCancelled() |
UploadNotificationStatusConfig |
getCompleted() |
UploadNotificationStatusConfig |
getError() |
String |
getNotificationChannelId() |
UploadNotificationStatusConfig |
getProgress() |
boolean |
isRingToneEnabled() |
UploadNotificationConfig |
setClearOnActionForAllStatuses(boolean clearOnAction)
Sets whether or not to clear the notification when the user taps on it
for all the notification statuses.
|
UploadNotificationConfig |
setClickIntentForAllStatuses(PendingIntent clickIntent)
Sets the same intent to be executed when the user taps on the notification
for all the notification statuses.
|
UploadNotificationConfig |
setIconColorForAllStatuses(int iconColorResourceID)
Sets the same notification icon for all the notification statuses.
|
UploadNotificationConfig |
setIconForAllStatuses(int resourceID)
Sets the same notification icon for all the notification statuses.
|
UploadNotificationConfig |
setLargeIconForAllStatuses(Bitmap largeIcon)
Sets the same large notification icon for all the notification statuses.
|
UploadNotificationConfig |
setNotificationChannelId(String channelId)
Sets notification channel ID
|
UploadNotificationConfig |
setRingToneEnabled(Boolean enabled)
Sets whether or not to enable the notification sound when the upload gets completed with
success or error.
|
UploadNotificationConfig |
setTitleForAllStatuses(String title)
Sets the notification title for all the notification statuses.
|
void |
writeToParcel(Parcel dest,
int flags) |
public static final Parcelable.Creator<UploadNotificationConfig> CREATOR
public UploadNotificationConfig()
android.R.drawable.ic_menu_upload
will be used as the iconpublic final UploadNotificationConfig setTitleForAllStatuses(String title)
title
- Title to show in the notification iconUploadNotificationConfig
public final UploadNotificationConfig setIconForAllStatuses(int resourceID)
resourceID
- Resource ID of the icon to useUploadNotificationConfig
public final UploadNotificationConfig setIconColorForAllStatuses(int iconColorResourceID)
iconColorResourceID
- Resource ID of the color to useUploadNotificationConfig
public final UploadNotificationConfig setLargeIconForAllStatuses(Bitmap largeIcon)
largeIcon
- Bitmap of the icon to useUploadNotificationConfig
public final UploadNotificationConfig setClickIntentForAllStatuses(PendingIntent clickIntent)
clickIntent
- PendingIntent
containing the user's actionUploadNotificationConfig
public final UploadNotificationConfig addActionForAllStatuses(UploadNotificationAction action)
action
- UploadNotificationAction
action to addUploadNotificationConfig
public final UploadNotificationConfig setClearOnActionForAllStatuses(boolean clearOnAction)
clearOnAction
- true to clear the notification, otherwise falseUploadNotificationConfig
public final UploadNotificationConfig setRingToneEnabled(Boolean enabled)
enabled
- true to enable the default ringtoneUploadNotificationConfig
public final UploadNotificationConfig setNotificationChannelId(String channelId)
channelId
- notification channel IDUploadNotificationConfig
public boolean isRingToneEnabled()
public UploadNotificationStatusConfig getProgress()
public UploadNotificationStatusConfig getCompleted()
public UploadNotificationStatusConfig getError()
public UploadNotificationStatusConfig getCancelled()
public String getNotificationChannelId()
public int describeContents()
describeContents
in interface Parcelable
public void writeToParcel(Parcel dest, int flags)
writeToParcel
in interface Parcelable