1 Intent intent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE); 2 Uri uri = Uri.fromFile(new File("/sdcard/image.jpg")); 3 intent.setData(uri); 4 mContext.sendBroadcast(intent);
时间: 2024-11-13 06:51:40
1 Intent intent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE); 2 Uri uri = Uri.fromFile(new File("/sdcard/image.jpg")); 3 intent.setData(uri); 4 mContext.sendBroadcast(intent);