Hi Margret,
The Video playing is from Youtube, So when the video is streaming and the phone locks, the streaming should continue . when the user again unlocks the phone the video should play from the where it stopped.
i tried your suggested approach and it did not work,
I have pasted the code below, kindly give ur suggestions, thank u
'Activity module
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim actname As String
Dim index As Int
Dim url As String
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 vv As VideoView
Dim p As Phone
Dim tt As Timer : tt.Initialize("tt", 250)
Dim videopositon As Int
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("Videoplay")
vv.Initialize("VV")
loadtheVideo
End Sub
Sub loadtheVideo
Activity.Title = actname&" Subhashita "&index
p.SetScreenOrientation(0)
Activity.AddView(vv, 0, 0, 100%x, 100%y)
Log(url)
vv.LoadVideo("http",url)
vv.Play
ProgressDialogShow("Please wait...")
tt.Enabled = True
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub tt_Tick
If vv.IsPlaying = True Then
ProgressDialogHide
tt.Enabled = False
End If
End Sub
Sub VV_Complete
vv.Stop
Log("Video Completed")
End Sub