Okay, so I'm not a ”software developer”, I just program as a hobby. But I'm currently developing my own media player. I'm using AppGameKit by The Game Creators and I believe I'm running Android 11 for anyone that finds that information relevant. My player is designed to find, load, and play audio files in a certain given directory.
This given directory, the basic ”Music” folder that automatically appears in the internal phone's memory, will have folders inside it that contain audio files. My app is designed to delve into that Music directory and identify/count/read all subfolders/files regardless of their names. My app works as I have programmed it to.
HOWEVER: If any changes are made to any of those files or folders then my app cannot detect them and the whole app fails... ... ... for a period of time. The kind of thing I'm running into is that my app is designed to be versatile in reading that directory, but if a folder is added or taken away, or if one of the files are renamed, then the app crashes. But if I put the phone down, or better yet go to sleep for the night, then I'll pick it up in the morning and the app will run fine again with the new folders/files. Without me actually changing anything with the phone or the app.
So my question is this (assuming my choice of software isn't the issue): is anyone familiar with maybe a service or app that Android runs in the background that keeps a record of the system's directory tree that updates itself at certain intervals? Maybe my app depends on something like this that just isn't ”updating” when I need/expect it to. I've already tried clearing the media system app and restarting the phone. All it did was reset my ringtone. And I tried clearing the cache on my own app, but it doesn't seem to help. It's just so bizarre to me that everytime I introduce new files to my app it crashes only to be fine an hour or whatever later. But any ideas would be appreciated. Thanks.
This given directory, the basic ”Music” folder that automatically appears in the internal phone's memory, will have folders inside it that contain audio files. My app is designed to delve into that Music directory and identify/count/read all subfolders/files regardless of their names. My app works as I have programmed it to.
HOWEVER: If any changes are made to any of those files or folders then my app cannot detect them and the whole app fails... ... ... for a period of time. The kind of thing I'm running into is that my app is designed to be versatile in reading that directory, but if a folder is added or taken away, or if one of the files are renamed, then the app crashes. But if I put the phone down, or better yet go to sleep for the night, then I'll pick it up in the morning and the app will run fine again with the new folders/files. Without me actually changing anything with the phone or the app.
So my question is this (assuming my choice of software isn't the issue): is anyone familiar with maybe a service or app that Android runs in the background that keeps a record of the system's directory tree that updates itself at certain intervals? Maybe my app depends on something like this that just isn't ”updating” when I need/expect it to. I've already tried clearing the media system app and restarting the phone. All it did was reset my ringtone. And I tried clearing the cache on my own app, but it doesn't seem to help. It's just so bizarre to me that everytime I introduce new files to my app it crashes only to be fine an hour or whatever later. But any ideas would be appreciated. Thanks.