2022-11-04
Register A New File In Android Gallery Using Beanshell Code

register new file to android gallery

code in beanshell:

1
2
3
4
5
6
import android.net.Uri;
Intent mediaScanIntent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);
Uri contentUri = Uri.parse("file:///storage/emulated/0/Movies/output0_higher.mp4");
mediaScanIntent.setData(contentUri);
ctx.sendBroadcast(mediaScanIntent);

Read More