Sub Globals
'These global variables will be redeclared each time the activity is created.
Private note1 As Beeper
Private ScreenWidth As Long
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout")
Dim lv As LayoutValues
lv = GetDeviceLayoutValues
ScreenWidth = lv.Width
End Sub
Sub Activity_Touch (Action As Int, X As Float, Y As Float)
Select Action
Case Activity.ACTION_DOWN
If x < 0.5 * ScreenWidth Then
note1.Initialize(60000, 440)
note1.beep
Else
note1.Initialize(60000, 880)
note1.beep
End If
Case Activity.ACTION_UP
Try
note1.Release
Catch
Log(LastException)
End Try
End Select
End Sub