jtxBoard icon indicating copy to clipboard operation
jtxBoard copied to clipboard

[BUG] No Jtx alarm full screen notification on lock screen

Open fcrvincent opened this issue 4 months ago • 8 comments

Describe the bug Thanks Patrick for this greatly improved 2.12.00 ose version, especially with the new yearly and monthly by day task recurrence options.

Also the led notification when the screen is off is now working on my device (as well as the notification sound). However when it triggers, the task's alarm does not display anything when the phone is locked; other applications (like Tasks or K9 mail) would show the app's name and/or the notification content if the Android notification settings allow it.

To Reproduce

Add a task with an alarm at a specific date and time.

Expected behavior

At the alarm's date and time the notification would display something like Jtx notification and optionally the task's summary.

Screenshots The screen remains black/off when a task's alarm triggers.

Device and version

  • Device: Xiaomi A2 Lite (also called Redmi 6 Pro)
  • Android version: Android 10
  • jtx Board version: 2.12.00 ose
  • Downloaded from: f-Droid/Neostore

fcrvincent avatar Aug 21 '25 22:08 fcrvincent

Hi @fcrvincent , to fully understand the issue: Do I get it right that the alarm gets triggered, but it doesn't "wake up" the phone? So when you push the side button to take up the phone, the notification would be there?

patrickunterwegs avatar Aug 22 '25 00:08 patrickunterwegs

Hi Patrick,

That's absolutely correct.

The alarm notification sounds the phone's notification chime, lights the phone's notification led and, when the phone is unlocked, shows the notification's content (in full screen if jtx's corresponding setting is selected), but it does not wake up the phone's screen to show the notification (temporarily that is, until the screen's goes to sleep).

Do not hesitate if you need me to do more input on this.

On 22 August 2025 01:56:01 BST, Patrick Lang @.***> wrote:

patrickunterwegs left a comment (TechbeeAT/jtxBoard#1999)

Hi @fcrvincent , to fully understand the issue: Do I get it right that the alarm gets triggered, but it doesn't "wake up" the phone? So when you push the side button to take up the phone, the notification would be there?

-- Reply to this email directly or view it on GitHub: https://github.com/TechbeeAT/jtxBoard/issues/1999#issuecomment-3212598875 You are receiving this because you were mentioned.

Message ID: @.***>

fcrvincent avatar Aug 22 '25 06:08 fcrvincent

A precision that I just tested: the notification shows when the phone is unlocked (with the fingerprint sensor for example) or when the display is powered on (with the power button on the side).

On 22 August 2025 07:24:14 BST, Frederic Vincent @.***> wrote:

Hi Patrick,

That's absolutely correct.

The alarm notification sounds the phone's notification chime, lights the phone's notification led and, when the phone is unlocked, shows the notification's content (in full screen if jtx's corresponding setting is selected), but it does not wake up the phone's screen to show the notification (temporarily that is, until the screen's goes to sleep).

Do not hesitate if you need me to do more input on this.

On 22 August 2025 01:56:01 BST, Patrick Lang @.***> wrote:

patrickunterwegs left a comment (TechbeeAT/jtxBoard#1999)

Hi @fcrvincent , to fully understand the issue: Do I get it right that the alarm gets triggered, but it doesn't "wake up" the phone? So when you push the side button to take up the phone, the notification would be there?

-- Reply to this email directly or view it on GitHub: https://github.com/TechbeeAT/jtxBoard/issues/1999#issuecomment-3212598875 You are receiving this because you were mentioned.

Message ID: @.***>

fcrvincent avatar Aug 22 '25 06:08 fcrvincent

By the way, now that the tasks module has proper recurrence dates, I started using Jtx (synchronized with my Radicale server), and find it customisable, effective to use and well thought thru.

Thanks for the great and continued work.

On 22 August 2025 01:56:01 BST, Patrick Lang @.***> wrote:

patrickunterwegs left a comment (TechbeeAT/jtxBoard#1999)

Hi @fcrvincent , to fully understand the issue: Do I get it right that the alarm gets triggered, but it doesn't "wake up" the phone? So when you push the side button to take up the phone, the notification would be there?

-- Reply to this email directly or view it on GitHub: https://github.com/TechbeeAT/jtxBoard/issues/1999#issuecomment-3212598875 You are receiving this because you were mentioned.

Message ID: @.***>

fcrvincent avatar Aug 23 '25 10:08 fcrvincent

Hey @fcrvincent , thank you for the feedback :-)

Regarding the issue: I have checked a couple of things. If the notification appears on the Lock Screen, depends on the system itself. The app just hands over the notification to the system with a priority. This is already set to MAX for jtx Board notifications. Additionally jtx Board would make a full-screen alarm on the Lock Screen. The permission for this should automatically be granted. Can you check if this full screen notification option is enabled for you in the notification settings for jtx Board?

patrickunterwegs avatar Aug 23 '25 11:08 patrickunterwegs

Hi Patrick,

I am making some progress with the jtx notification issue.

After removimg the system's battery optimization for Jtx, the non full screen notifications now show correctly.

However when the Jtx full screen notification option is selected, the Jtx notifications still do not wake up the screen.

After some digging, I found the following:

"To use full-screen intents on Android 10, your app must declare the USE_FULL_SCREEN_INTENT permission in its AndroidManifest.xml file."

Looking at Jtx manifest file, I could not find this permission. May be that's the solution.

On 23 August 2025 12:49:35 BST, Patrick Lang @.***> wrote:

patrickunterwegs left a comment (TechbeeAT/jtxBoard#1999)

Hey @fcrvincent , thank you for the feedback :-)

Regarding the issue: I have checked a couple of things. If the notification appears on the Lock Screen, depends on the system itself. The app just hands over the notification to the system with a priority. This is already set to MAX for jtx Board notifications. Additionally jtx Board would make a full-screen alarm on the Lock Screen. The permission for this should automatically be granted. Can you check if this full screen notification option is enabled for you in the notification settings for jtx Board?

-- Reply to this email directly or view it on GitHub: https://github.com/TechbeeAT/jtxBoard/issues/1999#issuecomment-3216785614 You are receiving this because you were mentioned.

Message ID: @.***>

fcrvincent avatar Aug 24 '25 06:08 fcrvincent

Hi @fcrvincent , yeah, I'm not surprised that battery optimization messes with the notifications...

I'm not sure where you have looked up the Manifest, but the USE_FULL_SCREEN_INTENT permission is basically there in the Manifest.

It's a bit hard to debug this as it just works on my device as well as on the emulator.

patrickunterwegs avatar Aug 24 '25 16:08 patrickunterwegs

Thanks Patrick.

I looked up the manifest on github but must have checked the wrong file.

A quick ai search also shows quite a few requirements for full screen notifications to work on Android 10: https://search.brave.com/search?q=android+10+why+full+acreen+notification+does+not+wake+up+display&summary=1&conversation=93b9163d0456b13b92c324&spellcheck=0&source=alteredQueryOriginal

Android 10 Notification Screen

On Android 10, a full-screen notification may fail to wake the display if the notification's importance is not set to a high level. The notification channel must be configured with NotificationManager.IMPORTANCE_HIGH to ensure the full-screen intent activates when the screen is off. Simply setting the notification priority to PRIORITY_MAX is not sufficient on its own; the channel's importance is critical.

Furthermore, the app must declare the USE_FULL_SCREEN_INTENT permission in its manifest file, which is a normal permission automatically granted by the system.

If the app targets Android 10 or higher, this permission is required for full-screen intents to function.

To ensure the activity is displayed on the lock screen, the activity's onCreate method must include the flags setShowWhenLocked(true) and setTurnScreenOn(true) for Android Oreo MR1 (API 28) and above. Alternatively, these flags can be set in the AndroidManifest.xml file for the activity using android:showWhenLocked="true" and android:turnScreenOn="true".

Finally, the notification must be created with a unique notification ID. If a previous notification with the same ID exists, the full-screen intent may not launch, and a heads-up notification might be shown instead.

May be worth checking if your app does all this.

On 24 August 2025 17:02:25 BST, Patrick Lang @.***> wrote:

patrickunterwegs left a comment (TechbeeAT/jtxBoard#1999)

Hi @fcrvincent , yeah, I'm not surprised that battery optimization messes with the notifications...

I'm not sure where you have looked up the Manifest, but the USE_FULL_SCREEN_INTENT permission is basically there in the Manifest.

It's a bit hard to debug this as it just works on my device as well as on the emulator.

-- Reply to this email directly or view it on GitHub: https://github.com/TechbeeAT/jtxBoard/issues/1999#issuecomment-3218206765 You are receiving this because you were mentioned.

Message ID: @.***>

fcrvincent avatar Aug 24 '25 16:08 fcrvincent