-
Notifications
You must be signed in to change notification settings - Fork 659
Closed
Labels
Description
I have several scripts which manipulate picture galleries and need a way to initiate a media scan once the images are modified.
When using am to send ACTION_MEDIA_MOUNTED or ACTION_MEDIA_SCANNER_SCAN_FILE I get a permission problem:
Broadcasting: Intent { act=android.intent.action.MEDIA_MOUNTED dat=file:///sdcard } java.lang.SecurityException: Permission Denial: broadcast asks to run as user -2 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL or android.permission.INTERACT_ACROSS_USERS
Either this permission should be added or some dedicated primitive to termux-api, see also http://droidyue.com/blog/2014/01/19/scan-media-files-in-android/ for some info.