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

Random ringtone playing #126

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Random ringtone playing #126

wants to merge 6 commits into from

Conversation

Nilsu11
Copy link
Contributor

@Nilsu11 Nilsu11 commented Nov 9, 2024

This pull request should resolve #98

@BlackyHawky
Copy link
Owner

I'll take a look soon.
In the meantime, please only modify what's necessary: changing the gradle version has nothing to do with it.

@Nilsu11
Copy link
Contributor Author

Nilsu11 commented Nov 9, 2024

Sorry about that, I'm still using an old version of android studio, which doesn't support the current one.

@BlackyHawky
Copy link
Owner

I suspected as much; don't worry, if necessary, I'll do it myself.

@BlackyHawky
Copy link
Owner

@Nilsu11
I'll try to take the time today to test your PR.

Can you tell me if the ringtone random playback also takes into account ringtones added by the user?

@Nilsu11
Copy link
Contributor Author

Nilsu11 commented Nov 11, 2024

Can you tell me if the ringtone random playback also takes into account ringtones added by the user?

Currently not. Only the defauly system ringtones

@BlackyHawky
Copy link
Owner

@Nilsu11
I tested your modification and it only works if the "Silence after" setting is not set to "The end of the ringtone".
The same thing happens if we check it in the expanded alarm view.

Finally, I cannot make any changes to your PR certainly because your "main" branch is protected.
Can you recreate it in a specific branch please?

@BlackyHawky BlackyHawky marked this pull request as draft November 13, 2024 16:33
@BlackyHawky BlackyHawky added the invalid This doesn't seem right label Nov 13, 2024
-the ability to "silance after" ALL random alarms
@Nilsu11
Copy link
Contributor Author

Nilsu11 commented Nov 13, 2024

@BlackyHawky This change should fix the issue, but it is still untested. the thing with random alarms, sadly, is, that I can't predict the ringtone without providing a seed (which I don't want to generate), so I currently only can offer this solution

@BlackyHawky
Copy link
Owner

@Nilsu11
I was able to test it: the alarm goes off, but unfortunately the ringing time is only about 2/3 seconds.

@BlackyHawky
Copy link
Owner

@Nilsu11
I've tried for several hours to get the duration of these random alarms in different ways and each time it doesn't work properly only when the "At the end of the ringtone" setting is activated. ☹️
(By the way, your code can be greatly simplified to get random alarms).

I've also tried it with custom ringtones and the problem is the same.
I deduce that the problem lies elsewhere, but where? 🤔

@Nilsu11
Copy link
Contributor Author

Nilsu11 commented Dec 29, 2024

sorry for the very late reply :( , I finally found time to look at this issue again and found a mayor oversight on my part. I am now trying to fix this now somehow.

@BlackyHawky do you know somebody with few (something like 3) alarm ringtones on their phone to check if it works?
On my tests right now it played at least 2 to 3 ringtones after which i stopped testing.

@Nilsu11 Nilsu11 marked this pull request as ready for review December 29, 2024 16:13
@BlackyHawky
Copy link
Owner

@Nilsu11
No worries for taking so long to reply; anyway, my free time is limited and I needed a break.

I'll be testing your changes very soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Play alarm sounds randomly.
2 participants