Dim filename As String = DateTime.Now&".jpg"
Dim dir As String = File.DirRootExternal
camEx.SavePictureToFile(Data, dir, filename)
''camEx.StartPreview 'restart preview
'send a broadcast intent to the media scanner to force it to scan the saved file.
Dim Phone As Phone
Dim i As Intent
i.Initialize("android.intent.action.MEDIA_SCANNER_SCAN_FILE", _
"file://" & File.Combine(dir, filename))
Phone.SendBroadcastIntent(i)
ToastMessageShow("Picture saved." & CRLF & "File size: " & File.Size(dir, filename), True)
camEx.Release
CallSubDelayed2(Starter,"SendPhoto",Data)