Android Question b4a trial version - play video

Atob4a

Member
Hello to all.
I am a new user.
I downloaded the trial version of B4A.
I can not find the VideoView object.
Please could you help me to make a small application that initiates an mp4 video (or other format).
My phone is a Hisense D2-F with Android 5.1 Lollipop
PS
B4A is really useful.
Thank you and sorry for my English.
Hello
 

Atob4a

Member
Ok Erel :) Thank You!!!
I solved
I added Audio Library (Windows->Libraries Manager)

Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.

Private BtnPlay As Button
Dim vv As VideoView
Dim copiato As Boolean
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("Pippo")
vv.Initialize("vv")
End Sub

Sub BtnPlay_Click

If copiato=False Then
copiato=True
Activity.AddView(vv, 10dip, 10dip, 250dip, 250dip)
File.Copy(File.DirAssets, "VID-20160524-WA0004.mp4", File.DirInternal, "VID-20160524-WA0004.mp4")
End If
vv.LoadVideo(File.DirInternal,"VID-20160524-WA0004.mp4")
vv.Play
End Sub

Ciao :)
 
Upvote 0
Top