Skip to content
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

Vibration while turned off for Nothing phone #50

Open
ojppe opened this issue Jun 3, 2024 · 21 comments
Open

Vibration while turned off for Nothing phone #50

ojppe opened this issue Jun 3, 2024 · 21 comments
Labels
bug Something isn't working specific device Not all devices are affected by the issue waiting for info Further information is requested

Comments

@ojppe
Copy link

ojppe commented Jun 3, 2024

Alarm and timer vibrate even when vibration is turned off

Version 2.4
Android 14

@ojppe ojppe added the bug Something isn't working label Jun 3, 2024
@BlackyHawky
Copy link
Owner

BlackyHawky commented Jun 3, 2024

@qw123wh, @odmfl: it seems to me that one of you has a device with Android 14.
Can you please tell me if it's the same for you? (My Android 14 device has no vibrator.)

@ojppe: Have you used other versions of this app, or is 2.4 the 1st? If so, can you tell me if you've seen this bug in other versions?

@odmfl
Copy link
Contributor

odmfl commented Jun 8, 2024

I haven't encountered this issue on my A14 devices, it works fine for me

@BlackyHawky
Copy link
Owner

@odmfl thank you for your feedback.

@ojppe Could you please specify the model of your device as requested in the template? Do you use a custom ROM?

@ojppe
Copy link
Author

ojppe commented Jun 8, 2024

Sorry, should have done initially.

Nothing OS 2.5.5 (phone 1)

@BlackyHawky
Copy link
Owner

@ojppe I think it's unfortunately due to your device 😬
See here; it seems that many users complain about the vibration mode.

I believe I have a workaround and I think I'll need your help because I think I need the exact model of your device. I'll keep you informed later.

@BlackyHawky
Copy link
Owner

@ojppe Quick question: does the "Activate vibrations" setting work on your device?

I've provided an apk below to test if my workaround works.
If that doesn't work, I'm sorry but I wouldn't know what else to do. 😬

This workaround only concerns the timer.

Clock_2.4-debug.zip

@BlackyHawky BlackyHawky changed the title Vibration while turned off Vibration while turned off for Nothing phone Jun 9, 2024
@ojppe
Copy link
Author

ojppe commented Jun 9, 2024

Thanks for looking into it.
Tested the timer in debug with different system settings but it still vibrates.

Vibration seems to works fine for calls, notifications and the google clock app. Altough in some apps (including this one) interface buttons don't vibrate. Which I don't mind.

If you're sure it's a Nothing problem feel free to close this issue.

@BlackyHawky
Copy link
Owner

@ojppe
Can you please do one last test with a fresh installation?

Like the other test, this modification only concerns the timer vibration.

Clock_2.4-debug.zip


If you're sure it's a Nothing problem feel free to close this issue.

As I'm not an expert, I prefer to leave this issue open in the hope that someone with the same device will be able to resolve it.

@ojppe
Copy link
Author

ojppe commented Jun 22, 2024

Tested timer in latest debug but didn't work.

@BlackyHawky
Copy link
Owner

Tested timer in latest debug but didn't work.

Thank you for your feedback.
The only thing to do is wait and see if anyone else has a Nothing device; if it has the same bug, it's because of the device model.

@BlackyHawky BlackyHawky added the specific device Not all devices are affected by the issue label Sep 20, 2024
@BlackyHawky
Copy link
Owner

@ojppe
Is the bug still present when using version 2.10.1 or after reinstalling the application?

@ojppe
Copy link
Author

ojppe commented Nov 30, 2024

Yes. Still present in latest version and after reinstall.
Fossify clock doesn't have this issue. Maybe you could compare?

@BlackyHawky
Copy link
Owner

@ojppe

Yes. Still present in latest version and after reinstall.
Fossify clock doesn't have this issue. Maybe you could compare?

Thanks for your feedback. I'll take a look at it soon and give you a new version to test if I can find out where this bug specific to your device might be coming from.

@BlackyHawky
Copy link
Owner

BlackyHawky commented Dec 1, 2024

@ojppe
When I reread the code, the vibrations are started with an AudioAttributes specified as indicated here.
Maybe that's what's causing the problem.

Also, you should check the logs when you enable/disable vibrations on the extended alarm view; indeed, as indicated here, there is the possibility to see if the setAlarmVibrationEnabled() function is correctly called.

Can you test the apk attached below please?

Clock_2.11_beta-debug.zip


Finally, if this doesn't work, I will certainly have to adapt the Kotlin code of the "Fossify clock" app which seems to be like this:

if (doVibrate && isOreoPlus()) {
    val pattern = LongArray(2) { 500 }
    vibrationHandler.postDelayed({
        vibrator = getSystemService(Context.VIBRATOR_SERVICE) as Vibrator
        vibrator?.vibrate(VibrationEffect.createWaveform(pattern, 0))
    }, 500)
}

Edit: Below, a version whose code is inspired by the "Fossify Clock" app.
I'm waiting for your feedback to tell me which of the two versions works.

Clock_2.11_beta-debug.zip

@ojppe
Copy link
Author

ojppe commented Dec 1, 2024

Both didn't work.
Even with all permissions denied, still vibrating.

@BlackyHawky
Copy link
Owner

Both didn't work. Even with all permissions denied, still vibrating.

I'm sorry but I really don't know what's wrong with your phone... 😢
It's really strange that it works on my 3 different brand devices (as well as other users' devices) but not on yours!

@ojppe
Copy link
Author

ojppe commented Dec 2, 2024

Haha, no worries. "Nothing" is wrong with my phone. 😁
Thanks for testing though.

@BlackyHawky
Copy link
Owner

@ojppe
Can you please try again?
I've moved the code for the vibrations directly into the AsyncRingtonePlayer file, hoping it will finally work...

Clock_2.11_beta-debug.zip

@ojppe
Copy link
Author

ojppe commented Dec 2, 2024

Also didn't work

@BlackyHawky
Copy link
Owner

I really don't understand...
Is there a haptic feedback setting enabled on your device?
Or a setting in the accessibility parameters?
Or a setting in the developer settings?

Finally, as I mentioned above, having a log file would have been great to check that settings are correctly called up when you select them.

@ojppe
Copy link
Author

ojppe commented Dec 4, 2024

No haptic feedback enabled and no haptic related accessibility or developer setting.

Maybe this will help: 04_12-15-08-09_938.log (tested on latest debug just before alarm fires)

Let me know if you need something

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working specific device Not all devices are affected by the issue waiting for info Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants