gdelataillade / alarm

A Flutter plugin to easily manage alarms on iOS and Android
https://pub.dev/packages/alarm
MIT License
132 stars 86 forks source link

alarm won't be fired when screen is locked #108

Closed whowillcare closed 9 months ago

whowillcare commented 1 year ago

Alarm plugin version ex: 2.1.0 (please update to the latest version before submitting the issue)

Describe the bug i only tested it on some of the Android phones, alarm won't start if phone screen is locked even the alarm time is passed, as long as you unlock the phone the Alam rings right away.

To Reproduce Steps to reproduce the behavior:

  1. say set alarm at 1pm around 12:58pm, then lock the screen
  2. after 1pm, you won't hear any alarm sound.
  3. at 1:02, you unlock the phone, the alarm starts to go off

Expected behavior A clear and concise description of what you expected to happen. alarm should go off at preset time, no matter if screen is locked or not, as long as app is still running at either background or foreground

Screenshots If applicable, add screenshots to help explain your problem.

Device info Provide device info (Manufacturer, OS version, ...) Ex: iPhone 13 Pro, iOS 16.2, ... android 10 huawei honor, android 13, xiaomi note 10 Additional context Add any other context about the problem here.

gdelataillade commented 1 year ago

Hi @whowillcare

That's weird that you are experiencing this issue. Is it happening all the time ?

I'm currently working on a big refactoring of the android part, moving all the code to native code. It will probably fix your issue and you will be able to ring your alarm even if the app was killed.

whowillcare commented 1 year ago

yes. It happens all the time.

On Fri, Nov 10, 2023 at 5:12 AM Gautier de Lataillade < @.***> wrote:

Hi @whowillcare https://github.com/whowillcare

That's weird that you are experiencing this issue. Is it happening all the time ?

I'm currently working on a big refactoring of the android part, moving all the code to native code. It will probably fix your issue and you will be able to ring your alarm even if the app was killed.

— Reply to this email directly, view it on GitHub https://github.com/gdelataillade/alarm/issues/108#issuecomment-1805447418, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUL3KEXGKZYKIADGYI3463YDX4Y7AVCNFSM6AAAAAA7FGNGYCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBVGQ2DONBRHA . You are receiving this because you were mentioned.Message ID: @.***>

gdelataillade commented 1 year ago

Hi @whowillcare

I finished working on the big refactoring of the Android part of the plugin.

You can test it on release 3.0.0.dev-2.

Let me know if it fixes your issue.

One more thing: if you still have the issue, try to remove battery optimization in you device settings.

whowillcare commented 1 year ago

Thank you. Will have a test on it.

On Mon, Nov 20, 2023 at 4:19 PM Gautier de Lataillade < @.***> wrote:

Hi @whowillcare https://github.com/whowillcare

I finished working on the big refactoring of the Android part of the plugin.

You can test it on release 3.0.0.dev-2 https://pub.dev/packages/alarm/versions/3.0.0-dev.2.

Let me know if it fixes your issue.

One more thing: if you still have the issue, try to remove battery optimization in you device settings.

— Reply to this email directly, view it on GitHub https://github.com/gdelataillade/alarm/issues/108#issuecomment-1819819102, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUL3KDW637V63EJE4S5FLLYFPCONAVCNFSM6AAAAAA7FGNGYCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJZHAYTSMJQGI . You are receiving this because you were mentioned.Message ID: @.***>

whowillcare commented 1 year ago

Actually, this version has broken a lot of past dependencies. However, I've managed them migrated. However, it has some hardcode dependency to asset file packages/alarm/assets/not_blank.mp3, which should be happening in my opnion though.

Thank you

gdelataillade commented 1 year ago

Indeed I removed some dependencies. This way, I have more control on compatibility, maintainability and plugin's size.

Make sure to follow instruction steps here: https://github.com/gdelataillade/alarm/tree/main/help

I added not_blank.mp3 in the .pubignore so it should not have an impact on the plugin. I use this asset for testing purposes only.

Let me know if you have any questions.

gdelataillade commented 11 months ago

Hi @whowillcare

I just released version 3.0.0. Let me know if it fixes your issue.

singhcreations commented 10 months ago

i want to contact you please help me i am working for ngo i need your help please give me ways to contact you

whowillcare commented 10 months ago

Sorry, was on vacation, will take a look the new version soon and give you a feedback.

On Sat, Dec 30, 2023, 03:42 Singhcreations @.***> wrote:

i want to contact you please help me i am working for ngo i need your help please give me ways to contact you

— Reply to this email directly, view it on GitHub https://github.com/gdelataillade/alarm/issues/108#issuecomment-1872484577, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUL3KFCRIXXIW3ADYMWQTLYL7HYLAVCNFSM6AAAAAA7FGNGYCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZSGQ4DINJXG4 . You are receiving this because you were mentioned.Message ID: @.***>