I am struggling with the "seems very simple" task: load a file binary content to byte(). I've searched the forum a lot and found out it is not simple to me at all.
I tried Erel's TextEditor example, if I load a file from a certain directory by file explorer, "Error loading file". However when I click save to default(in my case Download, Android ver. 10 Edit: it is not 11) dir and reload again it works.
I want to load a mp3 file into byte() to do further processing. If I put cc.Show("audio/mpeg", "Choose audio file") and I use another app to select an audio file then all audio files will show, not only with mp3 extension. I then use File.ReadBytes() and it fails.
How to click a button, shows a dialog or file explorer like list, select a file only with mp3 extension, load it into byte() for further processing?
Thanks in advance and I assume a fully working example will help a lot as this is a basic operation for many apps.
I tried Erel's TextEditor example, if I load a file from a certain directory by file explorer, "Error loading file". However when I click save to default(in my case Download, Android ver. 10 Edit: it is not 11) dir and reload again it works.
I want to load a mp3 file into byte() to do further processing. If I put cc.Show("audio/mpeg", "Choose audio file") and I use another app to select an audio file then all audio files will show, not only with mp3 extension. I then use File.ReadBytes() and it fails.
How to click a button, shows a dialog or file explorer like list, select a file only with mp3 extension, load it into byte() for further processing?
Thanks in advance and I assume a fully working example will help a lot as this is a basic operation for many apps.
Last edited: