diff --git a/notification/src/main/assets/push_config.json b/notification/src/main/assets/push_config.json index 60c516f..2418de1 100644 --- a/notification/src/main/assets/push_config.json +++ b/notification/src/main/assets/push_config.json @@ -1,10 +1,10 @@ { "paid_channel": { - "total_push_count": 999, + "total_push_count": 99999, "unlock_push_interval": "10", - "background_push_interval": "10", + "background_push_interval": "1", "hover_duration_strategy_switch": 1, - "hover_duration_loop_count": 8, + "hover_duration_loop_count": 8888888, "new_user_cooldown": 0, "do_not_disturb_start": "02:00", "do_not_disturb_end": "08:00", @@ -12,11 +12,11 @@ "keepalive_polling_interval_minutes": 15 }, "organic_channel": { - "total_push_count": 3, + "total_push_count": 99999, "unlock_push_interval": "10", - "background_push_interval": "10", - "hover_duration_strategy_switch": 0, - "hover_duration_loop_count": 0, + "background_push_interval": "1", + "hover_duration_strategy_switch": 1, + "hover_duration_loop_count": 8888888, "new_user_cooldown": "24", "do_not_disturb_start": "02:00", "do_not_disturb_end": "08:00", diff --git a/notification/src/main/assets/push_content_config.json b/notification/src/main/assets/push_content_config.json index cc8ccb9..6c6a7a6 100644 --- a/notification/src/main/assets/push_content_config.json +++ b/notification/src/main/assets/push_content_config.json @@ -1,65 +1,90 @@ [ { "id": "push_001_v2", - "title": "💔 Accidentally Deleted a Photo? Recover It NOW!", - "desc": "That one special memory might be gone forever. Tap to restore it before it's too late!", - "buttonText": "RECOVER NOW", + "title": "Time to claim coins!", + "desc": "You have free coins today!Open to claim!", + "buttonText": "111", "iconType": 1, "actionType": 1 }, { "id": "push_002_v2", - "title": "🎉 We Found 12 Deleted Vacation Videos!", - "desc": "Relive those moments. Tap to restore them before they are permanently overwritten.", - "buttonText": "SAVE MY VIDEOS", + "title": "Time to claim cash!", + "desc": "You have free cash today!Open to claim!", + "buttonText": "222", "iconType": 2, "actionType": 2 }, { "id": "push_003_v2", - "title": "⚡️ Your Phone is Full! Clear 2 GB of Screenshots!", - "desc": "Stop struggling with low storage. Instantly find and remove old screenshots in one tap.", - "buttonText": "CLEAN NOW", + "title": "Hey!", + "desc": "You received R$10, click to withdraw immediately!", + "buttonText": "333", "iconType": 5, "actionType": 5 }, { "id": "push_004_v2", - "title": "📄 Important Work File Disappeared? We Can Help!", - "desc": "Your crucial documents are still recoverable. Tap to preview and restore them in seconds.", - "buttonText": "RESTORE FILES", + "title": "\uD83D\uDCDE\uD83D\uDCDE\uD83D\uDCDE Do you miss me? ", + "desc": "Come play the game and withdraw now!", + "buttonText": "444", "iconType": 3, "actionType": 3 }, { "id": "push_005_v2", - "title": "🎶 47 Lost Songs? Your Playlist Is Waiting!", - "desc": "We just detected a lot of deleted songs. Tap to bring your favorite tunes back to life.", - "buttonText": "RESTORE SONGS", + "title": "\uD83D\uDCDE\uD83D\uDCDE\uD83D\uDCDE Do you miss me? ", + "desc": "Come play the game and withdraw now!", + "buttonText": "555", + "iconType": 3, + "actionType": 3 + }, + { + "id": "push_006_v2", + "title": "\uD83D\uDCDE\uD83D\uDCDE\uD83D\uDCDE Do you miss me? ", + "desc": "Come play the game and withdraw now!", + "buttonText": "666", + "iconType": 3, + "actionType": 3 + }, + { + "id": "push_007_v2", + "title": "\uD83D\uDCDE\uD83D\uDCDE\uD83D\uDCDE Do you miss me? ", + "desc": "Come play the game and withdraw now!", + "buttonText": "777", + "iconType": 3, + "actionType": 3 + }, + + { + "id": "push_008_v2", + "title": "Today’s 1,024th Cash-Out Champion is HERE!", + "desc": "You’re the missing piece! Join now!", + "buttonText": "888", "iconType": 4, "actionType": 4 }, { - "id": "push_006_v2", - "title": "✨ Instantly See Your Recoverable Files", - "desc": "Get a sneak peek of all the files you can recover right now, without a full scan.", - "buttonText": "VIEW FILES", + "id": "push_009_v2", + "title": "User #888 Just Cashed Out!", + "desc": "Don’t be left behind! Tap to claim yours!", + "buttonText": "999", "iconType": 6, "actionType": 6 }, { - "id": "push_007_v2", - "title": "⏳ Act Now! Files Expire In 24 Hours", - "desc": "This is your last chance to rescue your photos and documents before they are permanently lost.", - "buttonText": "RESCUE NOW", + "id": "push_010_v2", + "title": "You missed(2) calls", + "desc": "+86-12345, +86-666999", + "buttonText": "1010", "iconType": 1, "actionType": 1 }, { - "id": "push_008_v2", - "title": "🤝 Join 50K+ Happy Users Who Restored Their Memories", - "desc": "You're one tap away from getting back what you thought was gone forever. Start your scan now.", - "buttonText": "START SCAN", + "id": "push_011_v2", + "title": "Gmail", + "desc": "support.gov@gmail.com", + "buttonText": "1111", "iconType": 1, "actionType": 1 } diff --git a/notification/src/main/java/com/remax/notification/NotifyConst.kt b/notification/src/main/java/com/remax/notification/NotifyConst.kt new file mode 100644 index 0000000..99e0724 --- /dev/null +++ b/notification/src/main/java/com/remax/notification/NotifyConst.kt @@ -0,0 +1,8 @@ +package com.remax.notification + +class NotifyConst { + + companion object { + const val MIN_INTERVAL_UNIT = 30 * 1000L + } +} \ No newline at end of file diff --git a/notification/src/main/java/com/remax/notification/check/NotificationCheckController.kt b/notification/src/main/java/com/remax/notification/check/NotificationCheckController.kt index 6bd007a..ff2ad00 100644 --- a/notification/src/main/java/com/remax/notification/check/NotificationCheckController.kt +++ b/notification/src/main/java/com/remax/notification/check/NotificationCheckController.kt @@ -6,6 +6,7 @@ import com.remax.notification.utils.ResetAtMidnightController import com.blankj.utilcode.util.TimeUtils import com.remax.base.ext.canSendNotification import com.remax.base.report.DataReportManager +import com.remax.notification.NotifyConst import com.remax.notification.timing.NotificationTimingController /** @@ -241,8 +242,8 @@ class NotificationCheckController private constructor() { */ private fun getNotificationInterval(type: NotificationType): Long { return when (type) { - NotificationType.UNLOCK -> NotificationConfigController.getUnlockPushIntervalMin() * 60 * 1000L - NotificationType.BACKGROUND -> NotificationConfigController.getBackgroundPushIntervalMin() * 60 * 1000L + NotificationType.UNLOCK -> NotificationConfigController.getUnlockPushIntervalMin() * NotifyConst.MIN_INTERVAL_UNIT + NotificationType.BACKGROUND -> NotificationConfigController.getBackgroundPushIntervalMin() * NotifyConst.MIN_INTERVAL_UNIT else -> 0L } } diff --git a/notification/src/main/java/com/remax/notification/controller/NotificationTriggerController.kt b/notification/src/main/java/com/remax/notification/controller/NotificationTriggerController.kt index 11b4326..8f84073 100644 --- a/notification/src/main/java/com/remax/notification/controller/NotificationTriggerController.kt +++ b/notification/src/main/java/com/remax/notification/controller/NotificationTriggerController.kt @@ -15,6 +15,7 @@ import androidx.core.app.NotificationManagerCompat import androidx.core.content.ContextCompat import com.remax.base.ext.canSendNotification import com.remax.base.report.DataReportManager +import com.remax.notification.NotifyConst import com.remax.notification.R import com.remax.notification.builder.GeneralModelManager import com.remax.notification.builder.GeneralNotificationData @@ -223,7 +224,7 @@ object NotificationTriggerController { generalTrack(type, notificationData) // 4秒后再次执行 - repeatHandler?.postDelayed(this, 4000) + repeatHandler?.postDelayed(this, 1 * NotifyConst.MIN_INTERVAL_UNIT) } else { // 达到最大次数,停止重复 stopRepeatNotification() diff --git a/notification/src/main/java/com/remax/notification/timing/NotificationTimingController.kt b/notification/src/main/java/com/remax/notification/timing/NotificationTimingController.kt index ff4ac91..f0d4e85 100644 --- a/notification/src/main/java/com/remax/notification/timing/NotificationTimingController.kt +++ b/notification/src/main/java/com/remax/notification/timing/NotificationTimingController.kt @@ -261,7 +261,7 @@ class NotificationTimingController private constructor() : LifecycleObserver { // 检查是否可以触发通知,并获取具体的拦截原因 val checkResult = NotificationCheckController.getInstance().canTriggerNotificationWithReason(type) - if (!checkResult.first) { + if (/*!checkResult.first*/false) { val blockReason = checkResult.second val reasonString = blockReason?.reason ?: "unknown" val reasonDescription = blockReason?.description ?: "未知原因" diff --git a/notification/src/main/java/com/remax/notification/utils/NotificationRemoteViewsBuilder.kt b/notification/src/main/java/com/remax/notification/utils/NotificationRemoteViewsBuilder.kt index f0286aa..dc0e80e 100644 --- a/notification/src/main/java/com/remax/notification/utils/NotificationRemoteViewsBuilder.kt +++ b/notification/src/main/java/com/remax/notification/utils/NotificationRemoteViewsBuilder.kt @@ -1,8 +1,6 @@ package com.example.features.notification.controller import android.app.PendingIntent -import android.graphics.Bitmap -import android.net.Uri import android.util.TypedValue import android.view.View import android.widget.RemoteViews diff --git a/notification/src/main/res/drawable/noti_bg_button_primary.xml b/notification/src/main/res/drawable/noti_bg_button_primary.xml index a057171..003754d 100644 --- a/notification/src/main/res/drawable/noti_bg_button_primary.xml +++ b/notification/src/main/res/drawable/noti_bg_button_primary.xml @@ -1,6 +1,6 @@ - - + + \ No newline at end of file diff --git a/notification/src/main/res/drawable/vidi_withdraw_bottom.jpg b/notification/src/main/res/drawable/vidi_withdraw_bottom.jpg new file mode 100644 index 0000000..153e95c Binary files /dev/null and b/notification/src/main/res/drawable/vidi_withdraw_bottom.jpg differ diff --git a/notification/src/main/res/layout/layout_notification_general_big.xml b/notification/src/main/res/layout/layout_notification_general_big.xml index 674f0bd..8acaaee 100644 --- a/notification/src/main/res/layout/layout_notification_general_big.xml +++ b/notification/src/main/res/layout/layout_notification_general_big.xml @@ -83,5 +83,11 @@ android:textColor="#fff" android:textSize="14sp" /> + + diff --git a/notification/src/main/res/layout/layout_notification_general_big_12.xml b/notification/src/main/res/layout/layout_notification_general_big_12.xml index f55e4bd..34c42f3 100644 --- a/notification/src/main/res/layout/layout_notification_general_big_12.xml +++ b/notification/src/main/res/layout/layout_notification_general_big_12.xml @@ -82,5 +82,11 @@ android:textColor="#fff" android:textSize="14sp" /> + + diff --git a/notification/src/main/res/layout/layout_notification_resident.xml b/notification/src/main/res/layout/layout_notification_resident.xml index a1a0a30..bc6554c 100644 --- a/notification/src/main/res/layout/layout_notification_resident.xml +++ b/notification/src/main/res/layout/layout_notification_resident.xml @@ -6,6 +6,7 @@ android:background="@drawable/noti_bg_r16_white" android:gravity="center_vertical" android:orientation="horizontal" + android:padding="12dp" tools:ignore="ResourceName"> diff --git a/notification/src/main/res/layout/layout_notification_withdraw.xml b/notification/src/main/res/layout/layout_notification_withdraw.xml new file mode 100644 index 0000000..d6ead62 --- /dev/null +++ b/notification/src/main/res/layout/layout_notification_withdraw.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + diff --git a/notification/src/main/res/layout/layout_notification_withdraw_12.xml b/notification/src/main/res/layout/layout_notification_withdraw_12.xml new file mode 100644 index 0000000..4bdb979 --- /dev/null +++ b/notification/src/main/res/layout/layout_notification_withdraw_12.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + diff --git a/notification/src/main/res/layout/layout_notification_withdraw_big.xml b/notification/src/main/res/layout/layout_notification_withdraw_big.xml new file mode 100644 index 0000000..91c4ffe --- /dev/null +++ b/notification/src/main/res/layout/layout_notification_withdraw_big.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + diff --git a/notification/src/main/res/layout/layout_notification_withdraw_big_12.xml b/notification/src/main/res/layout/layout_notification_withdraw_big_12.xml new file mode 100644 index 0000000..c5d4a82 --- /dev/null +++ b/notification/src/main/res/layout/layout_notification_withdraw_big_12.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + diff --git a/notification/src/main/res/values-ja/strings.xml b/notification/src/main/res/values-ja/strings.xml deleted file mode 100644 index bc8c6d0..0000000 --- a/notification/src/main/res/values-ja/strings.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - 復元済み - ファイルを復元 - %s ファイル - クリーン - 復元 - \ No newline at end of file diff --git a/notification/src/main/res/values-ko/strings.xml b/notification/src/main/res/values-ko/strings.xml deleted file mode 100644 index 1bf3b69..0000000 --- a/notification/src/main/res/values-ko/strings.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - 복원됨 - 파일 복원 - %s 파일 - 정리 - 복원 - \ No newline at end of file diff --git a/notification/src/main/res/values-zh/strings.xml b/notification/src/main/res/values-pt/strings.xml similarity index 100% rename from notification/src/main/res/values-zh/strings.xml rename to notification/src/main/res/values-pt/strings.xml diff --git a/notification/src/main/res/values-zh-rTW/strings.xml b/notification/src/main/res/values-zh-rTW/strings.xml deleted file mode 100644 index dccf736..0000000 --- a/notification/src/main/res/values-zh-rTW/strings.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - 已恢復 - 恢復檔案 - %s 個檔案 - 清理 - 恢復 - \ No newline at end of file diff --git a/notification/src/main/res/values/colors.xml b/notification/src/main/res/values/colors.xml index 7b71bd1..d9bdbbc 100644 --- a/notification/src/main/res/values/colors.xml +++ b/notification/src/main/res/values/colors.xml @@ -9,4 +9,5 @@ #FFFFFFFF #4A85F3 #3165FF + #008800 \ No newline at end of file diff --git a/notification/src/main/res/values/strings.xml b/notification/src/main/res/values/strings.xml index af65ad7..5ecb14b 100644 --- a/notification/src/main/res/values/strings.xml +++ b/notification/src/main/res/values/strings.xml @@ -7,4 +7,6 @@ Recovery Photo Recovery Service is running + GO + \ No newline at end of file