Sub Class_Globals
Private xui As XUI
Private MediaPanel As B4XView
End Sub
'Initializes the object. You can add parameters to this method if needed.
Public Sub Initialize (SMMPanel As B4XView) As Object
MediaPanel = SMMPanel
Return Me
End Sub
Sub SMM_MediaReady (Success As Boolean, Media As SMMedia)
If Success Then
If Media.Media Is B4XBitmap Then
Dim Out As OutputStream = File.OpenOutput(xui.DefaultFolder, "Media1.png", False)
Media.Media.As(B4XBitmap).WriteToStream(Out, 100, "PNG")
Out.Close
End If
If MediaPanel.GetView(0).GetView(0).GetBitmap Is B4XBitmap Then
Dim B4XBitmap1 As B4XBitmap = MediaPanel.GetView(0).GetView(0).GetBitmap
Dim Out As OutputStream = File.OpenOutput(xui.DefaultFolder, "Media2.png", False)
B4XBitmap1.WriteToStream(Out, 100, "PNG")
Out.Close
End If
End If
End Sub