'Service module
Sub Process_Globals
Dim lwm As LWManager
Dim LiveEngine As LWEngine
Dim image As Bitmap
End Sub
Sub Service_Create
lwm.Initialize("lwm", True)
lwm.StartTicking(200)
End Sub
Sub Service_Start (StartingIntent As Intent)
End Sub
Sub Service_Destroy
End Sub
Sub lwm_SizeChanged (Engine As LWEngine)
DrawBackground (Engine)
End Sub
Sub DrawBackground (Engine As LWEngine)
Engine.Canvas.DrawColor(Colors.White)
Engine.RefreshAll
End Sub
Sub lwm_VisibilityChanged (Engine As LWEngine, Visible As Boolean)
If Visible Then
DrawBackground (Engine)
End If
End Sub
Sub lwm_Tick (Engine As LWEngine)
Engine.Rect.Initialize(40dip, 20dip, 300dip, 300dip)
Dim i As Int
For i = 0 To 200
Engine.Canvas.DrawColor(Colors.White)
image.Initialize(File.DirAssets, "Frame" & i &".png")
Engine.Canvas.DrawBitmap(image, Null, Engine.Rect)
Engine.RefreshAll
Next
End Sub