Commit e75feaf2 authored by wanglei's avatar wanglei

...

parent 4feaa0aa
......@@ -11,7 +11,6 @@ import android.os.Build
import android.widget.RemoteViews
import androidx.core.app.NotificationCompat
import androidx.core.graphics.drawable.IconCompat
import com.base.pdfviewerscannerwhite.BuildConfig
import com.base.pdfviewerscannerwhite.R
import com.base.pdfviewerscannerwhite.bean.ConstObject.NOTIFICATION_ACTION_APP_PROCESS
import com.base.pdfviewerscannerwhite.bean.ConstObject.NOTIFICATION_ACTION_CLEAN_JUNK
......@@ -216,7 +215,7 @@ object NotificationUiUtil {
}
NOTIFICATION_ACTION_SCREENSHOT -> {
val tittle = context.getString(R.string.screenshot_clean)
val tittle = "Not enough storage space? Clean up screenshots to free up space."
val desc = context.getString(R.string.find_your_screenshot_clean_it)
bigRemoteViews.setTextViewText(R.id.tv_tittle, tittle)
smallRemoteViews.setTextViewText(R.id.tv_tittle, tittle)
......@@ -226,7 +225,7 @@ object NotificationUiUtil {
}
NOTIFICATION_ACTION_SIMILAR -> {
val tittle = context.getString(R.string.similar_photos)
val tittle = "Too many similar photos? Organize your memories and save space."
val desc = context.getString(R.string.find_your_similar_photos_to_clean_it)
bigRemoteViews.setTextViewText(R.id.tv_tittle, tittle)
smallRemoteViews.setTextViewText(R.id.tv_tittle, tittle)
......@@ -236,7 +235,7 @@ object NotificationUiUtil {
}
NOTIFICATION_ACTION_WHATSAPP -> {
val tittle = context.getString(R.string.whatsapp_clean)
val tittle = "Clear WhatsApp cache and free up space on your device!"
val desc = context.getString(R.string.whatsapp_pop)
bigRemoteViews.setTextViewText(R.id.tv_tittle, tittle)
smallRemoteViews.setTextViewText(R.id.tv_tittle, tittle)
......@@ -246,7 +245,7 @@ object NotificationUiUtil {
}
NOTIFICATION_ACTION_LARGEFILE -> {
val tittle = context.getString(R.string.large_file_clean)
val tittle = "One-tap cleanup of large files to free up your phone's storage."
val desc = context.getString(R.string.find_your_large_file_to_clean_it)
bigRemoteViews.setTextViewText(R.id.tv_tittle, tittle)
smallRemoteViews.setTextViewText(R.id.tv_tittle, tittle)
......@@ -254,13 +253,14 @@ object NotificationUiUtil {
smallRemoteViews.setTextViewText(R.id.tv_desc, desc)
sendCustomNotification(context, intent, bigRemoteViews, smallRemoteViews)
}
NOTIFICATION_ACTION_ZODIAC->{
NOTIFICATION_ACTION_ZODIAC -> {
val tittle = context.getString(R.string.zodiac)
val content = arrayOf(
"Click to explore your horoscope!",
"Tap to reveal your horoscope's potential!",
"Click for today's transformative insights!",
"Click to follow your horoscope's guidance!"
"Your daily horoscope has the answers you seek. Click to discover!",
"Your horoscope opens new doors. Click to unlock your destiny!",
"Today's horoscope reveals life-changing secrets. Click to see!",
"Your daily horoscope maps your path to success. Click to find it!"
).random()
val desc = content
bigRemoteViews.setTextViewText(R.id.tv_tittle, tittle)
......@@ -494,7 +494,12 @@ object NotificationUiUtil {
NOTIFICATION_ACTION_IMPORTANT_DOCUMENT,
NOTIFICATION_ACTION_APP_PROCESS,
NOTIFICATION_ACTION_CLEAN_JUNK,
NOTIFICATION_ACTION_WEATHER
NOTIFICATION_ACTION_WEATHER,
NOTIFICATION_ACTION_SCREENSHOT,
NOTIFICATION_ACTION_SIMILAR,
NOTIFICATION_ACTION_WHATSAPP,
NOTIFICATION_ACTION_LARGEFILE,
NOTIFICATION_ACTION_ZODIAC
)
private var nextIdIndex = -1
......
......@@ -6,6 +6,8 @@ import androidx.activity.addCallback
import com.base.pdfviewerscannerwhite.BuildConfig
import com.base.pdfviewerscannerwhite.R
import com.base.pdfviewerscannerwhite.databinding.ActivitySetBinding
import com.base.pdfviewerscannerwhite.fcm.NotificationUiUtil
import com.base.pdfviewerscannerwhite.fcm.NotificationUiUtil.getNextActionId
import com.base.pdfviewerscannerwhite.helper.BaseActivity
import com.base.pdfviewerscannerwhite.helper.ConfigHelper
import com.base.pdfviewerscannerwhite.helper.MyApplication
......@@ -40,8 +42,13 @@ class SetActivity : BaseActivity<ActivitySetBinding>() {
onBackPressedDispatcher.onBackPressed()
}
binding.llRate.setOnClickListener {
if (BuildConfig.DEBUG) {
NotificationUiUtil.setActionNotification(this@SetActivity, getNextActionId())
} else {
showRateDialog(true)
}
}
binding.llFeedback.setOnClickListener {
startActivity(Intent(this, FeedbackActivity::class.java))
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment