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

The alarm can't stop the audio file that was copied to the getApplicationSupportDirectory() path automatically. #233

Open
pyjserv opened this issue Aug 23, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@pyjserv
Copy link

pyjserv commented Aug 23, 2024

Hi @gdelataillade,

Alarm plugin version
3.1.5

Describe the bug
Because I don't know how to play a ringtone with alarm by the uri, I duplicated the built-in ringtone file to my app's directory with uri_to_file. Even if I set the loop to 'false', when the alarm plays the '.ogg' audio file that was copied to the 'getApplicationSupportDirectory()' path, the line 'onAudioComplete?.invoke()' in 'AudioService.kt' is never invoked.

The 'getApplicationSupportDirectory()' method is from path_provider package. On my Android device, the actual path is '/data/user/0/com.claberi.consillia/files/'.

@pyjserv pyjserv added the bug Something isn't working label Aug 23, 2024
@pyjserv pyjserv changed the title I can't stop the audio file that was copied to the getApplicationSupportDirectory() path. The alarm can't stop the audio file that was copied to the getApplicationSupportDirectory() path automatically. Aug 24, 2024
@gdelataillade
Copy link
Owner

Hi @pyjserv

I just released version 4.0.0-dev.1 which is a testing version before releasing definitive 4.0.0. I made big refactoring in the native android code so I hope it will fix your issue.

@pyjserv
Copy link
Author

pyjserv commented Aug 26, 2024

Hi @gdelataillade

I tested version 4.0.0-dev.1, but the issue still persists—the music continues to loop.

Edit: This is really strange. On my Samsung phone and tablet, only the built-in ringtones keep looping (even if I’ve copied them to another location). If I use custom music ringtones, the alarm works normally and only plays once.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants