Sub Activity_Create(FirstTime As Boolean)
'create image
Dim b As Bitmap
b.InitializeMutable(200, 200)
Dim c As Canvas
c.Initialize2(b)
c.DrawCircle(100, 100, 50, Colors.Red, True, 0)
'save image to file
Dim out As OutputStream
out = File.OpenOutput(File.DirRootExternal, "pictures/1.jpg", False)
b.WriteToStream(out, 100, "JPEG")
out.Close
'send the intent that asks the media scanner to scan the file
Dim i As Intent
i.Initialize("android.intent.action.MEDIA_SCANNER_SCAN_FILE", _
"file://" & File.Combine(File.DirRootExternal, "pictures/1.jpg"))
Dim p As Phone
p.SendBroadcastIntent(i)
End Sub