I try to save the bitmap in a file, but i've this error :
Out = File.OpenOutput(File.DirAssets, "photo.jpg", False)
java.io.FileNotFoundException: /AssetsDir/photo.jpg (No such file or directory)
What's the problem ? OuputStream create the file if isn't exist normally.
Out = File.OpenOutput(File.DirAssets, "photo.jpg", False)
java.io.FileNotFoundException: /AssetsDir/photo.jpg (No such file or directory)
B4X:
For i = 0 To listOfContacts.Size - 1
Dim Contact As Contact
Contact = listOfContacts.Get(i)
Dim photo As Bitmap
photo = Contact.GetPhoto
If photo <> Null Then
Log(photo.Height)
Dim Out As OutputStream
Out = File.OpenOutput(File.DirAssets, "photo.jpg", False)
photo.WriteToStream(Out, 80, "JPEG")
What's the problem ? OuputStream create the file if isn't exist normally.