public static interface AudioScanner.OnProgressUpdateListener<T>
void onStart()
该方法会在主线程调用,你可以在该方法中显示进度条。
void onProgressUpdate(int progress)
该方法会在主线程调用,你可以在该方法中更新进度条的扫描进度。
progress
- 当前扫描进度,范围:[0, 100]void onEnd(@NonNull java.util.List<T> audioList, boolean cancelled)
该方法会在主线程中调用,你可以在该方法中隐藏进度条。
audioList
- 扫描到的音频文件。如果扫描被取消,则该列表中仅会包含取消前已扫描到的音频文件。cancelled
- 扫描是否被取消,如果扫描过程是正常完成的,该参数为 false;如果扫描过程被取消,则该参数为 true。