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

Download audio not set check error. #77

Closed dev-chetan closed 1 year ago

dev-chetan commented 1 year ago

Error: PlatformException(NATIVE_ERR, [Alarm] Error loading given local asset path: /Users/dev/Library/Developer/CoreSimulator/Devices/773208AB-83CA-48B4-9150-DE7D46ADB1FC/data/Containers/Data/Application/7F4FBE5A-AD72-4068-8CC0-401BE25475A4/Documents/audio/5e06342ad00acb4894a3a919.mp3, null, null)

Not Working download the audio play please check.

gdelataillade commented 1 year ago

Hi @dev-chetan,

Thanks for opening the issue.

Could you try with a real device ? Not simulator.

dev-chetan commented 1 year ago

I use a simulator. i will check real device

dev-chetan commented 1 year ago

Hello, Not working in real device

flutter: │ 🐛 Error: PlatformException(NATIVE_ERR, [Alarm] Error loading given local asset path: /var/mobile/Containers/Data/Application/56DCFF1D-DE87-4C71-B968-A9630C53CC98/Documents/audio/1646725181394_photo-1646725181348.mp3, null, nul

dev-chetan commented 1 year ago

@gdelataillade

please set new param like a "customPath"

DOCUMENT PATH : /var/mobile/Containers/Data/Application/56DCFF1D-DE87-4C71-B968-A9630C53CC98/Documents Extra Path : audio

let assetAudioURL = documentsDirectory.appendingPathComponent( extraPath.isEmpty? filename : "(extraPath)/(filename)")

if you set "extraPath" param, this is a permanent solution

Above solution is worked

gdelataillade commented 1 year ago

Hi @dev-chetan

Thanks for the suggestion. I'll fix this as soon as possible and I'll let you know.

dev-chetan commented 1 year ago

Working fine but add extraPath.