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 |
|---|---|
int |
describeContents() |
UploadNotificationConfig |
setAutoClearOnError(boolean clear)
Sets whether or not to auto clear the notification when an error happens during upload.
|
UploadNotificationConfig |
setAutoClearOnSuccess(boolean clear)
Sets whether or not to auto clear the notification when the upload is completed successfully.
|
UploadNotificationConfig |
setClearOnAction(boolean clear)
Sets whether or not to clear the notification when the user taps on it.
|
UploadNotificationConfig |
setClickIntent(Intent clickIntent)
Sets the intent to be executed when the user taps on the notification.
|
UploadNotificationConfig |
setCompletedIcon(int resourceID)
Sets the icon to show in the notification when the operation is completed successfully.
|
UploadNotificationConfig |
setCompletedMessage(String message)
Sets the message to be shown when the upload is completed.
|
UploadNotificationConfig |
setErrorIcon(int resourceID)
Sets the icon to show in the notification when an error happens.
|
UploadNotificationConfig |
setErrorMessage(String message)
Sets the message to be shown if an error occurs.
|
UploadNotificationConfig |
setIcon(int resourceID)
Sets the notification icon.
|
UploadNotificationConfig |
setInProgressMessage(String message)
Sets the message to be shown while upload is in progress.
|
UploadNotificationConfig |
setRingToneEnabled(Boolean enabled)
Sets whether or not to enable the notification sound when the upload gets completed with
success or error
|
UploadNotificationConfig |
setTitle(String title)
Sets the notification title.
|
void |
writeToParcel(Parcel parcel,
int arg1) |
public static final Parcelable.Creator<UploadNotificationConfig> CREATOR
public UploadNotificationConfig()
android.R.drawable.ic_menu_upload will be used as the iconpublic final UploadNotificationConfig setIcon(int resourceID)
resourceID - Resource ID of the icon to useUploadNotificationConfigpublic final UploadNotificationConfig setCompletedIcon(int resourceID)
resourceID - Resource ID of the icon to useUploadNotificationConfigpublic final UploadNotificationConfig setErrorIcon(int resourceID)
resourceID - Resource ID of the icon to useUploadNotificationConfigpublic final UploadNotificationConfig setTitle(String title)
title - Title to show in the notification iconUploadNotificationConfigpublic final UploadNotificationConfig setInProgressMessage(String message)
message - Message to showUploadNotificationConfigpublic final UploadNotificationConfig setErrorMessage(String message)
message - Message to showUploadNotificationConfigpublic final UploadNotificationConfig setCompletedMessage(String message)
message - Message to showUploadNotificationConfigpublic final UploadNotificationConfig setAutoClearOnSuccess(boolean clear)
clear - true to automatically clear the notification, otherwise falseUploadNotificationConfigpublic final UploadNotificationConfig setAutoClearOnError(boolean clear)
clear - true to automatically clear the notification, otherwise falseUploadNotificationConfigpublic final UploadNotificationConfig setClearOnAction(boolean clear)
clear - true to clear the notification, otherwise falseUploadNotificationConfigpublic final UploadNotificationConfig setClickIntent(Intent clickIntent)
clickIntent - Intent.
For example: new Intent(context, YourActivity.class)UploadNotificationConfigpublic final UploadNotificationConfig setRingToneEnabled(Boolean enabled)
enabled - true to enable the default ringtoneUploadNotificationConfigpublic int describeContents()
describeContents in interface Parcelablepublic void writeToParcel(Parcel parcel, int arg1)
writeToParcel in interface Parcelable