diff --git a/templates/java/android/services/UploadService.mustache b/templates/java/android/services/UploadService.mustache index cfd2316d..c1829e1d 100644 --- a/templates/java/android/services/UploadService.mustache +++ b/templates/java/android/services/UploadService.mustache @@ -51,10 +51,10 @@ import java.util.concurrent.Future open class UploadService( private val notificationId: Int = DEFAULT_NOTIFICATION_ID, protected val channelId: String = DEFAULT_NOTIFICATION_SERVICE_CHANNEL_ID, - @StringRes private val channelNameResourceId: Int = R.string.channel_name, + @StringRes private val channelNameResourceId: Int = R.string.upload_notification_channel_name, @StringRes private val channelDescriptionResourceId: Int = 0, - @DrawableRes protected val notificationIconResourceId: Int = R.drawable.ic_api_video_logo, - @ColorRes protected val notificationColorResourceId: Int = R.color.primary_orange + @DrawableRes protected val notificationIconResourceId: Int = R.drawable.ic_upload_notification, + @ColorRes protected val notificationColorResourceId: Int = R.color.upload_notification_color ) : Service() { private val uploadFuturesMap = ConcurrentHashMap>() private val binder = UploadServiceBinder() @@ -219,7 +219,7 @@ open class UploadService( open fun onUploadErrorNotification(id: String, e: Exception): Notification? { return NotificationCompat.Builder(this, channelId) .setStyle(this, notificationIconResourceId, notificationColorResourceId) - .setContentTitle(getString(R.string.notification_error_title)) + .setContentTitle(getString(R.string.upload_notification_error_title)) .setContentText(e.localizedMessage) .build() } @@ -237,10 +237,10 @@ open class UploadService( return NotificationCompat.Builder(this, channelId) .setStyle(this, notificationIconResourceId, notificationColorResourceId) .setOngoing(true) - .setContentTitle(getString(R.string.notification_progress_title)) + .setContentTitle(getString(R.string.upload_notification_progress_title)) .setContentText( getString( - R.string.notification_progress_text, + R.string.upload_notification_progress_text, numOfUploaded, totalNumOfUploads - numOfCancelled ) diff --git a/templates/java/android/work/stores/NotificationConfigurationStore.mustache b/templates/java/android/work/stores/NotificationConfigurationStore.mustache index 6f88927d..42233eae 100644 --- a/templates/java/android/work/stores/NotificationConfigurationStore.mustache +++ b/templates/java/android/work/stores/NotificationConfigurationStore.mustache @@ -28,7 +28,7 @@ object NotificationConfigurationStore { */ @JvmStatic @StringRes - var channelNameResourceId: Int = R.string.channel_name + var channelNameResourceId: Int = R.string.upload_notification_channel_name /** * A string resource identifier for the user visible description of the notification channel, or 0 if no description is provided. @@ -42,12 +42,12 @@ object NotificationConfigurationStore { */ @JvmStatic @DrawableRes - var notificationIconResourceId: Int = R.drawable.ic_api_video_logo + var notificationIconResourceId: Int = R.drawable.ic_upload_notification /** * The color id of the notification. */ @JvmStatic @ColorRes - var notificationColorResourceId: Int = R.color.primary_orange + var notificationColorResourceId: Int = R.color.upload_notification_color } \ No newline at end of file diff --git a/templates/java/android/work/workers/AbstractUploadWorker.mustache b/templates/java/android/work/workers/AbstractUploadWorker.mustache index 4c87b3f9..e415c02d 100644 --- a/templates/java/android/work/workers/AbstractUploadWorker.mustache +++ b/templates/java/android/work/workers/AbstractUploadWorker.mustache @@ -80,7 +80,7 @@ abstract class AbstractUploadWorker( open fun onUploadStarted(): Notification { return NotificationCompat.Builder(applicationContext, channelId) .setStyle(applicationContext, notificationIconResourceId, notificationColorResourceId) - .setContentTitle(applicationContext.getString(R.string.notification_upload_started_title)) + .setContentTitle(applicationContext.getString(R.string.upload_notification_upload_started_title)) .build() } @@ -95,7 +95,7 @@ abstract class AbstractUploadWorker( open fun onUploadError(e: Exception): Notification? { return NotificationCompat.Builder(applicationContext, channelId) .setStyle(applicationContext, notificationIconResourceId, notificationColorResourceId) - .setContentTitle(applicationContext.getString(R.string.notification_error_title)) + .setContentTitle(applicationContext.getString(R.string.upload_notification_error_title)) .setContentText(e.localizedMessage) .build() } @@ -120,17 +120,17 @@ abstract class AbstractUploadWorker( notificationColorResourceId ) .setOngoing(true) - .setContentTitle(applicationContext.getString(R.string.notification_progress_title)) + .setContentTitle(applicationContext.getString(R.string.upload_notification_progress_title)) .setContentText( applicationContext.getString( - R.string.notification_current_progress_text, + R.string.upload_notification_current_progress_text, progress ) ) .setProgress(100, progress, false) .addAction( android.R.drawable.ic_delete, - applicationContext.getString(R.string.notification_cancel), + applicationContext.getString(R.string.upload_notification_cancel), intent ) .build() diff --git a/templates/java/statics/android-uploader/src/main/res/drawable/ic_api_video_logo.xml b/templates/java/statics/android-uploader/src/main/res/drawable/ic_upload_notification.xml similarity index 100% rename from templates/java/statics/android-uploader/src/main/res/drawable/ic_api_video_logo.xml rename to templates/java/statics/android-uploader/src/main/res/drawable/ic_upload_notification.xml diff --git a/templates/java/statics/android-uploader/src/main/res/values/colors.xml b/templates/java/statics/android-uploader/src/main/res/values/colors.xml index fe0a09cf..54af32ab 100644 --- a/templates/java/statics/android-uploader/src/main/res/values/colors.xml +++ b/templates/java/statics/android-uploader/src/main/res/values/colors.xml @@ -1,10 +1,4 @@ - #FA5B30 - #FFB39E - #D9E1EC - #414F6E - #0B0F17 - #FFFFFF - #66FFFFFF + #FA5B30 \ No newline at end of file diff --git a/templates/java/statics/android-uploader/src/main/res/values/strings.xml b/templates/java/statics/android-uploader/src/main/res/values/strings.xml index 6f09ffb6..bbb528b4 100644 --- a/templates/java/statics/android-uploader/src/main/res/values/strings.xml +++ b/templates/java/statics/android-uploader/src/main/res/values/strings.xml @@ -1,10 +1,10 @@ - api.video - Uploading - Uploaded %1d of %1d - %1d %% - Upload error - Upload starting… - Cancel + api.video + Uploading + Uploaded %1d of %1d + %1d %% + Upload error + Upload starting… + Cancel \ No newline at end of file diff --git a/templates/java/statics/android/examples/service/src/main/java/video/api/client/service/example/CustomUploaderService.kt b/templates/java/statics/android/examples/service/src/main/java/video/api/client/service/example/CustomUploaderService.kt index 11bdecba..0b4519a6 100644 --- a/templates/java/statics/android/examples/service/src/main/java/video/api/client/service/example/CustomUploaderService.kt +++ b/templates/java/statics/android/examples/service/src/main/java/video/api/client/service/example/CustomUploaderService.kt @@ -9,7 +9,7 @@ import video.api.client.api.services.UploadService class CustomUploaderService : UploadService( notificationId = DEFAULT_NOTIFICATION_ID, channelId = DEFAULT_NOTIFICATION_CHANNEL_ID, - channelNameResourceId = R.string.channel_name, + channelNameResourceId = R.string.upload_notification_channel_name, ) { companion object { const val DEFAULT_NOTIFICATION_CHANNEL_ID = diff --git a/templates/java/statics/android/src/main/res/drawable/ic_api_video_logo.xml b/templates/java/statics/android/src/main/res/drawable/ic_upload_notification.xml similarity index 100% rename from templates/java/statics/android/src/main/res/drawable/ic_api_video_logo.xml rename to templates/java/statics/android/src/main/res/drawable/ic_upload_notification.xml diff --git a/templates/java/statics/android/src/main/res/values/colors.xml b/templates/java/statics/android/src/main/res/values/colors.xml index fe0a09cf..54af32ab 100644 --- a/templates/java/statics/android/src/main/res/values/colors.xml +++ b/templates/java/statics/android/src/main/res/values/colors.xml @@ -1,10 +1,4 @@ - #FA5B30 - #FFB39E - #D9E1EC - #414F6E - #0B0F17 - #FFFFFF - #66FFFFFF + #FA5B30 \ No newline at end of file diff --git a/templates/java/statics/android/src/main/res/values/strings.xml b/templates/java/statics/android/src/main/res/values/strings.xml index 6f09ffb6..bbb528b4 100644 --- a/templates/java/statics/android/src/main/res/values/strings.xml +++ b/templates/java/statics/android/src/main/res/values/strings.xml @@ -1,10 +1,10 @@ - api.video - Uploading - Uploaded %1d of %1d - %1d %% - Upload error - Upload starting… - Cancel + api.video + Uploading + Uploaded %1d of %1d + %1d %% + Upload error + Upload starting… + Cancel \ No newline at end of file