-
Notifications
You must be signed in to change notification settings - Fork 369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rest Timer does not vibrate when complete #145
Comments
Yes, there is a weird behavior with the vibration and I realized that this is not always reproductible. On my phone, sometimes is works, sometimes it doesn't. I haven't investigated that much anyway but if you find something, let me know. |
Hey @brodeurlv, I looked into this quickly but I'm having issues debugging on my phone (I have the playstore version installed on there and I don't feel like wiping my data to use from AndroidStudio) but I did find something that might be the reason that it works only sometimes. In CountdownDialogbox.java, in the registerAlarm method line 78, we use "set" for the alarmManager. Per android docs: Reason I think this might be the problem is because I noticed on my phone that sometimes it vibrates when it's supposed to and gives me 3 zaps(restTime -2), sometimes its late and only gives me a single zap, and sometimes it doesn't happen. It looks like the better method to use on alarmManager would be setExact: https://developer.android.com/reference/android/app/AlarmManager#setExact(int,%20long,%20android.app.PendingIntent) Are you set up and have the time to verify this? |
Hi @sdriv3r , I gave it a try but I'm not sure it is changing anything. |
Hi @sdriv3r ,
FYI, with the recent commit from @ironjan , you can have a debug and a release app on the same device. So you should be able to debug this issue more easily on your device. |
Hi @brodeurlv , I kind of feel like Notification is a better choice and that Alarm seems a little too "aggressive", but the effect seems the same for our usage. Will submit a pull request in a little bit. Cheers |
Added an AudioAttribute with "USAGE_NOTIFICATION" to the vibration. It now seems to vibrate always, even with the screen off.
Describe your issue
I have the rest timer turned on for my programs. One thing I have noticed on my phone is that when the countdown reaches 0, it does not vibrate my phone. This only happens when my screen is off. If I leave my screen on, the vibration does work.
I am only reproducing this on my phone (Samsung Galaxy S9+, latest updates). I tried on my tablet (Samsung Tab A 8) and it works fine there, with the screen off or on.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
At the end of the countdown, phone should always vibrate.
Smartphone (please complete the following information):
Additional context
As stated above, only reproduces on my phone and not my tablet. Did not look into why that is the case yet.
The text was updated successfully, but these errors were encountered: