Separate Display mode with Android 4.3 - iMX6

cancel
Showing results for 
Search instead for 
Did you mean: 

Separate Display mode with Android 4.3 - iMX6

Jump to solution
1,072 Views
joshcollins
Contributor II

I have build an Android Jelly Bean 4.3 image for my Congatec QMX6 board which is built on the iMX6 processor. I have 2 LVDS screens attached to the board, and have managed to set up the system to display on both screens by changing the bootargs (video=mxcfb0:dev=ldb,LDB-XGA,if=RGB24 video=mxcfb1:dev=ldb,LDB-XGA,if=RGB24). I seem to be operating in separate mode, as I can copy and image to the framebuffers /dev/graphics/fb0 and /dev/graphics/fb2 which will display on the the 2 screens respectively. However, Android does not seem to be aware of the two screen setup, and when interacting with the OS I get all activity duplicated on the two screens (they mirror each other). We want to have 2 apps running on the different screens concurrently. Do anyone know how this can be achieved (if it is even possible..)?

Labels (3)
1 Solution
170 Views
joshcollins
Contributor II

Hi Qiang,

Thank you for the response. I was able to use the Presentation Java class mentioned in the link to display a different view on my second display without needing to make the changes to the kernel! So I have now succeeded in displaying different content on the 2 screens from one app, which is actually ideal for our needs. I was able to achieve this like so:

DisplayManager manager = (DisplayManager) getSystemService(DISPLAY_SERVICE);

Display[] displays = manager.getDisplays(DisplayManager.DISPLAY_CATEGORY_PRESENTATION);

if (displays.length > 0)

{

  Display display = displays[0];

  Presentation presentation = new Presentation(this, display);

  TextView view = new TextView(this);

  view.setText("Hello world!");

   presentation.addContentView(view, new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));

  presentation.show();

}

Thank you for the help.

Cheers,

Josh

View solution in original post

3 Replies
170 Views
qiang_li-mpu_se
NXP Employee
NXP Employee

Hi Josh, you can reference to this link: https://community.freescale.com/docs/DOC-94354

171 Views
joshcollins
Contributor II

Hi Qiang,

Thank you for the response. I was able to use the Presentation Java class mentioned in the link to display a different view on my second display without needing to make the changes to the kernel! So I have now succeeded in displaying different content on the 2 screens from one app, which is actually ideal for our needs. I was able to achieve this like so:

DisplayManager manager = (DisplayManager) getSystemService(DISPLAY_SERVICE);

Display[] displays = manager.getDisplays(DisplayManager.DISPLAY_CATEGORY_PRESENTATION);

if (displays.length > 0)

{

  Display display = displays[0];

  Presentation presentation = new Presentation(this, display);

  TextView view = new TextView(this);

  view.setText("Hello world!");

   presentation.addContentView(view, new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));

  presentation.show();

}

Thank you for the help.

Cheers,

Josh

View solution in original post

170 Views
jamesbone
NXP TechSupport
NXP TechSupport

We are checking internally, we hope to provide a response as soon as possible.