175 |
FileOutputStream fos = new FileOutputStream(file); |
FileOutputStream fos = new FileOutputStream(file); |
176 |
fos.write(imageData); |
fos.write(imageData); |
177 |
fos.close(); |
fos.close(); |
178 |
|
|
179 |
|
File infoFile = new File( file.toString().replace(".jpg", ".txt")); |
180 |
|
if (infoFile.exists()) { |
181 |
|
infoFile.delete(); |
182 |
|
} |
183 |
|
fos = new FileOutputStream(infoFile); |
184 |
|
fos.write(data.caption.getBytes()); |
185 |
|
fos.close(); |
186 |
|
|
187 |
Intent rescan = new Intent(Intent.ACTION_MEDIA_MOUNTED, Uri.parse("file://" + Environment.getExternalStorageDirectory()) ); |
Intent rescan = new Intent(Intent.ACTION_MEDIA_MOUNTED, Uri.parse("file://" + Environment.getExternalStorageDirectory()) ); |
188 |
rescan.putExtra("read-only", false); |
rescan.putExtra("read-only", false); |