B4J Question MediaViewController...*without* use of B4XPages?

m4.s

Member
Licensed User
Longtime User
I'm using MediaView with success in my B4J application, using this:


but am not able to incorporate the MediaView UI controller provided in this link (generates either 'object not initialized' or ':


My code is below:
B4X:
     Private medvMP4 As MediaView
     Private mediaViewController1 As MediaViewController
     ....

     mediaViewController1.Initialize(Null, "mediaViewController")   
     mediaViewController1.SetMediaView(medvMP4)
     medvMP4.Source = File.GetUri(strFileFolder, strFile & ".mp4")
     medvMP4.play


I added the initialize line (line # 5) merely to try to eliminate a 'Class instance was not initialized (mediaviewcontroller)' error.

But then I receive an "Interval must be larger than 0" error.

Is this possible to fix without using B4XPages? Ideas or alternative solution suggestions will be appreciated!
 

agraham

Expert
Licensed User
Longtime User
Is this possible to fix without using B4XPages?
There is nothing special about B4XPages,. On Android it is just a single normal Activity with some special attributes that keep it alive and not suffer the usual lifecycle considerations. On the desktop there is almost no difference to a normal program. If you can do it with B4XPages you can do it without.

But then I receive an "Interval must be larger than 0" error.
Which line gives this error?
 
Upvote 0
Top