0

I am working with Presentation Class to show different screen to the customers, but interact together.

But I have no idea how to test this out because my devices and emulators only show one screen.

Is there any way to accomplish this?

c-an
  • 3,543
  • 5
  • 35
  • 82

1 Answers1

1

For hardware, you may be able to connect an external display. For example, many modern Samsung devices support USB-C to HDMI adapters.

For the emulator and hardware that does not support external displays, you can simulate an external display. In Developer Options, scroll down to "Simulate secondary displays", and from there choose a resolution for the secondary display. This will appear as a floating layer over the main device UI, and it will work with Presentation.

c-an
  • 3,543
  • 5
  • 35
  • 82
CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • I think the `Simulate secondary displays` is supported from API 28(I guess for Foldable phones). But my device will be API 24. I need to connect two tablets. And also need to display them in landscape mode. – c-an Jul 03 '20 at 02:46
  • 1
    @c-an: "I think the Simulate secondary displays is supported from API 28" -- it has been supported on hardware since Android 4.2. I forget when they enabled it on emulators, but I am fairly certain it was before Android 9. "I need to connect two tablets" -- you will need to talk to your device manufacturer to see if its tablet also supports being a external display. Alternatively, you will need to seek solutions that do not involve `Presentation`, which is for working with external displays. – CommonsWare Jul 03 '20 at 11:08
  • I figured it out. But Is 'Presentation' touchable? I think it is possible because it inherits dialog class. – c-an Jul 03 '20 at 15:19
  • 1
    @c-an: "But Is 'Presentation' touchable?" -- not normally, because normally it is used with a regular monitor/TV/projector. TVs, for example, are not touchscreens, except in the presence of small children. :-) I have never tried hooking up an Android device to a touchscreen monitor to see if `Presentation` supports touch input. – CommonsWare Jul 03 '20 at 16:01