nicorac / bcr-gui

BCR-GUI is a companion app for the great BCR (Basic Call Recorder) Android application and other supported ROMs with embedded call recorders.
https://coolsoft.altervista.org
GNU General Public License v3.0
146 stars 7 forks source link

[Feature Request] refresh recording list once during Activity.onResume() #16

Closed Palatis closed 8 months ago

Palatis commented 11 months ago

I myself almost always have to refresh the list manually, I guess majority of the user have to do this, too. Why not just make it automated?

May also check directory mtime (modification time) to determine if refresh is required or not.

nicorac commented 11 months ago

That's a good idea, I just need to check if Android SAF provides this info and if it's reliable (some SAF implementations are very bad...). Anyway, even if it's not, user could fallback to manual refresh as currently does.

Uj947nXmRqV2nRaWshKtHzTvckUUpD commented 9 months ago

yes i also refresh every time i open it. btw thanks for developing this great app

nicorac commented 9 months ago

That's a good idea, I just need to check if Android SAF provides this info and if it's reliable

It seems to work and it's sufficiently fast, at least on my side.

I've just released v0.0.21 with this feature. When the app is resumed (i.e. getting back from another app or a call) it chacks recordings directory last modified time and, if newer than last update time, it automatically refreshes.

PS: I only wonder if it works correctly when getting back after a call, since BCR could require some time to close the recording and copy the audio file to recordings dir. BCR always records in a local app file then move it to final dir...

Uj947nXmRqV2nRaWshKtHzTvckUUpD commented 8 months ago

on last version, the list is still not refreshed on app open

nicorac commented 8 months ago

I think it's due to this:

BCR could require some time to close the recording and copy the audio file to recordings dir

I'd like to confirm that's the cause, so these are my questions:

NOTE: this issue could be harder to fix because, if the cause is a "timing issue", then I should "delay" the current update that happens at application resume, but... how long should the delay be? Too short could be useless, while too long could update the list while user interacts with it 🤔

Uj947nXmRqV2nRaWshKtHzTvckUUpD commented 8 months ago

for example today when i opened the app i had last recording since 20th dec when i last pulled down to refresh. afterwards i refreshed manually and got the latest calls with the last one being from 3 hours ago (not opened immediately after call)

nicorac commented 8 months ago

Just published version 0.0.25 with an improved change detection. It should now work correctly and update the list (only) when needed.

Feel free to reopen this if any other issue arise 😉