wordpress-mobile / wordpress-mobile/WordPress-Android

Pending drafts local notifications

Open
#14,240 9 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

[Type] Bug [Type] Task Notifications
Dominant language
Kotlin
Stars
3.2k
Forks
1.4k
Avg merge
1d 11h
Merged PRs (30d)
69

Description

Not sure there is a real issue, but since I will not be able to look into it soon-ish, creating this so it's not lost 😄

Don't think it's urgent so adding it to GK project for now.

Expected behavior

The following is what I understood the feature should look like (so my interpretation of it 😄 )

In Notifications settings, the Notify me on pending drafts flag should deactivate/activate local AlarmManager notifications reminding the user about drafts they created on the app but they didn't promote to Published.

Actual behavior

With that flag on or off I did not get local notifications

Steps to reproduce the behavior

The relevant code is in PendingDraftsNotificationsUtils and NotificationsPendingDraftsReceiver. I reduced on purpose the NotificationsPendingDraftsReceiver.ONE_DAY variable to 60 * 1000 so to accelerate the tests. For completeness I'm not even sure we are using that Notify me on pending drafts anymore (but better to confirm it).

  • Create a draft post and save it
  • You can check the alarms are scheduled using this adb shell dumpsys alarm | grep -i "org.wordpress.android"
  • Wait for the first alarm trigger (60 seconds in my accelerated test)
  • Notification was not triggered for me
Tested on [OnePlus 7T], Android [10], WPAndroid [16.9 develop]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with PendingDraftsNotificationsUtils and NotificationsPendingDraftsReceiver, then reproduce the issue with a saved draft and the accelerated ONE_DAY value. Use adb shell dumpsys alarm | grep -i "org.wordpress.android" to verify scheduling; done means the Notify me on pending drafts setting correctly controls the alarm and a local notification appears after it triggers.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.