Updates Notifications: Replaced action Details → Download(now by clicking the notification user goes to the release page instead of direct download).
This commit is contained in:
parent
6b0ef799c6
commit
7bd24c78c6
3 changed files with 11 additions and 8 deletions
|
|
@ -6,6 +6,7 @@ import android.app.NotificationManager
|
|||
import android.app.PendingIntent
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.graphics.drawable.Icon
|
||||
import android.net.Uri
|
||||
import ua.acclorite.book_story.R
|
||||
import ua.acclorite.book_story.data.remote.dto.LatestReleaseInfo
|
||||
|
|
@ -53,11 +54,13 @@ class UpdatesNotificationServiceImpl @Inject constructor(
|
|||
releaseInfo.name
|
||||
)
|
||||
)
|
||||
.setContentIntent(downloadLatestVersionPendingIntent)
|
||||
.setContentIntent(latestReleasePendingIntent)
|
||||
.addAction(
|
||||
R.drawable.app_icon_monochrome,
|
||||
Notification.Action.Builder(
|
||||
Icon.createWithResource(application, R.drawable.app_icon_monochrome),
|
||||
application.getString(R.string.updates_notification_action),
|
||||
latestReleasePendingIntent
|
||||
downloadLatestVersionPendingIntent
|
||||
).build()
|
||||
)
|
||||
.build()
|
||||
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@
|
|||
<string name="updates_notification_title">Нове оновлення Історії Книги!</string>
|
||||
<string name="updates_notification_desc">
|
||||
Оновлення %1$s вийшло!
|
||||
Натиснувши на це сповіщення, ви завантажете останню версію застосунку.
|
||||
Натисніть, щоб перейти на сторінку релізу.
|
||||
</string>
|
||||
<string name="updates_notification_action">
|
||||
Подробиці
|
||||
Завантажити
|
||||
</string>
|
||||
|
||||
<!-- Screens -->
|
||||
|
|
|
|||
|
|
@ -32,10 +32,10 @@
|
|||
<string name="updates_notification_title">New update of Book\'s Story!</string>
|
||||
<string name="updates_notification_desc">
|
||||
Update %1$s just released!
|
||||
By clicking this notification you will download the latest version of the app.
|
||||
Click to go to the release page.
|
||||
</string>
|
||||
<string name="updates_notification_action">
|
||||
Details
|
||||
Download
|
||||
</string>
|
||||
|
||||
<!-- Screens -->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue