Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim CC As ContentChooser 'Phone Library
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim mp3dir, mp3file As String
Private Label1 As Label
Private Label2 As Label
Private Label3 As Label
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("Layout1")
CC.Initialize("CC")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Button1_Click
' CC.Show("image/*", "Choose image")
'CC.Show("audio/*", "Choose audio file")
CC.Show("audio/mpeg", "Choose audio mp3 file")
Wait For CC_Result (Success As Boolean, dir As String, filename As String)
If Success Then
mp3dir = dir
mp3file = filename
Label1.Text = mp3dir
Label2.Text = mp3file
End If
End Sub
Private Sub Button2_Click
Dim ins As InputStream = File.OpenInput(mp3dir, mp3file)
Label3.Text = ins.BytesAvailable
End Sub