I want upload the ZIP file,but can't,so i Paste the code!
------------------
'Activity module
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
Dim ph As PhoneWakeState
Dim ph1 As Phone
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim Timer1 As Timer
Dim Button1,Button2 As Button
Dim Br As Int 'brightness
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")
Activity.LoadLayout("1.bal")
ph.KeepAlive(True)
If FirstTime Then
End If
Timer1.Initialize("Timer1",10*1000)
Timer1.Enabled=False
Button1.Initialize("Button1")
Button2.Initialize("Button2")
Br=ph1.GetSettings("screen_brightness")
Log("The current brightness:"&ph1.GetSettings("screen_brightness"))
End Sub
Sub Timer1_tick
ph.KeepAlive(True)
Timer1.Enabled=False
End Sub
Sub Activity_Resume
ph1.SetScreenBrightness(0.3)
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Button1_Click
ph.ReleaseKeepAlive
End Sub
Sub Button2_Click
Timer1.Enabled=True
End Sub