简体   繁体   中英

How to update Android MediaStore in time by lua script?

The lua script will download pictures and videos on your Android phone, you need to restart your phone to find it. After searching for related information, I found that it is related to MediaStore, but the lua script code does not know how to write it. can you help me? Thank you

Everything depends on you:

path = userPath().."/res/1.mp4"
os.execute("am broadcast -a android.intent.action.MEDIA_SCANNER_SCAN_FILE -d file://"..path)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM