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 |
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 |
setCompletedMessage(String message)
Sets the message to be shown when the upload is completed.
|
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 useUploadNotificationConfig
public final UploadNotificationConfig setTitle(String title)
title
- Title to show in the notification iconUploadNotificationConfig
public final UploadNotificationConfig setInProgressMessage(String message)
message
- Message to showUploadNotificationConfig
public final UploadNotificationConfig setErrorMessage(String message)
message
- Message to showUploadNotificationConfig
public final UploadNotificationConfig setCompletedMessage(String message)
message
- Message to showUploadNotificationConfig
public final UploadNotificationConfig setAutoClearOnSuccess(boolean clear)
clear
- true to automatically clear the notification, otherwise falseUploadNotificationConfig
public final UploadNotificationConfig setClearOnAction(boolean clear)
clear
- true to clear the notification, otherwise falseUploadNotificationConfig
public final UploadNotificationConfig setClickIntent(Intent clickIntent)
clickIntent
- Intent
.
For example: new Intent(context, YourActivity.class)UploadNotificationConfig
public final UploadNotificationConfig setRingToneEnabled(Boolean enabled)
enabled
- true to enable the default ringtoneUploadNotificationConfig
public int describeContents()
describeContents
in interface Parcelable
public void writeToParcel(Parcel parcel, int arg1)
writeToParcel
in interface Parcelable