How can I update the Android Gallery after a photo?

后端 未结 1 1598
遥遥无期
遥遥无期 2020-12-03 16:02

For the university i\'ve to develop an application on android with the face detections. For this i\'ve to save various photo on my gallery. The problem is that after saving

相关标签:
1条回答
  • 2020-12-03 16:49

    You can force the MediaScanner to add a specific file (or let it know it was deleted or modified)

    sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.fromFile(myNewFile)));
    
    0 讨论(0)
提交回复
热议问题