Aktion Media Scanner Scan -Datei Android 30 veraltet

File file = new File(filePath);
MediaScannerConnection.scanFile(context,
                    new String[]{file.toString()},
                    new String[]{file.getName()},null);
Wrong Wryneck