Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

New Developer
Posts: 12
Registered: ‎01-16-2009
My Device: Not Specified

"GUI primitive type not supported" when playing video


I am writing an app that starts playing a video upon startup.
I started with the example in the article: DB-00641

"How To - Play video within a BlackBerry smartphone application"


In this example, the user must press space to start the video.
My 8830 is running the latest available software for the device:
The example code works fine.

I would like to play the video without the pressing space, so I added a call to


after setting the video control to be visible, like this:



ms.setTitle(new LabelField("Let's play some video..."));
LabelField lf = new LabelField("Press space to start/stop/resume playback.");

//Create a new Player pointing to the video file.
//This can use any valid URL.
player = Manager.createPlayer("file:///SDCard/Blackberry/videos/1.mp4");

//Create a new VideoControl.
videoControl = (VideoControl)player.getControl("VideoControl");
//Initialize the video mode using a Field.
videoControl.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE, "net.rim.device.api.ui.Field");

//Set the video control to be visible.

// Added this line to start player now
catch (Exception ex)


It works in the Simulator 8800-, but when I run it on a 8830, I get an exception that:

GUI primitive type not supported

I assume that the problem is with:

   videoControl.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE, "net.rim.device.api.ui.Field" ) ;

The JDE is v4.6.1.23

What could be the issue ? Thanks.

New Developer
Posts: 12
Registered: ‎01-16-2009
My Device: Not Specified

Re: "GUI primitive type not supported" when playing video

Just tried the changed code on a 8330 (Curve) running v4.5.0.77, and it works !


I guess the problem is that the 8830 is running (and cannot be upgraded).

BlackBerry Development Advisor
Posts: 15,410
Registered: ‎07-09-2008
My Device: BlackBerry Passport
My Carrier: Bell

Re: "GUI primitive type not supported" when playing video

You are correct.  Displaying video in this way requires BlackBerry handheld software version 4.3.0 or higher.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker