Launch APP in secondary screen

We’re developing an APP that need to use front and second display of a device. The device is a POS that has a front 15.4" screen and a rear 10" one.

I’ve been searching a little bit today and found basically two interesting options :

  • Use the Presentation class in Android, this way you can display alternate content in the second screen.
  • Launch a separate APP in the secondary display.

Have anyone tried something similiar ?

I’ll dig deeper at the end of the week and post what I found, any help or advice is welcome !

Hello and welcome to the forum,

on desktop that would be no issues just use the Screen class
but on Android nope, it does not work like that

first, Android itself consider supporting different type of screens
but assume there is only 1 screen

second, the setup you have here is extremely custom, not at all the default

so I would ask how do you manage those 2 screens with native code in Java?

if there is a custom API, then you can probably adapt that to an ANE

my bet or my guess would be that even if your setup has 2x hardware screen
the underlying OS (Android) manage that as only 1x screen with “holes” in it

so then that would be using the basic Capabilities and other classes
to deduce your full virtual screen resolution (which could be nightmarish if the 2x hardware screens have different density), so some tests, to see how those “holes” work

see some basics here

or if it’s not that, yeah use 2 apps on 2 different screens
and use something like local RTMFP to communicate/sync the 2 apps

but so far you’re not giving much informations

yeah great … how about real sizes and real densities ?
Android API version could be a factor too

personally I don’t think you can manage another screen with just the Presentation class
not by default, if there is a custom API maybe …

again even if the doc of Android I see nothing that gives this kind of supports
eg. supporting multiple screens one at a time sure
but multiple screen at the same time … nope

I do hope your POS has some sample native code to manage those 2 screens
or you’re in for a world of hurt diagnosing all that by yourself

Hi Zwetan !!! Thank you very much for the answer.

Both screens has same res ( FullHD ) and different pixels density. At the moment this is what i’ve found :

The idea of having two apps and communicate them through RTMFP is perfect for me because I’m using it to communicate the APP with others in the same network, so implementing some more functionality it is easy, and having two separate APPs makes more sense to me that trying to display content in another screen with the same APP.

Will try to launch an intent from Air and combine it with the tag proposed in the second link and test a little bit to see what happens and how the device reacts, I’ve also contacted the manufacturer asking for any doc or API yesterday will see.

I’ll post the results of the testings, thanks ! :slight_smile:

You can also try also a LocalConnection

on desktop you would have used that to communicate between 2 SWF, but not sure how it can work on mobile

technically it uses shared memory to share a small (40KB) amount of data

in case you would want to keep RTMFP for the “network communication” between different devices
LC can be an alternative for the local communications
but I never really tried that on mobile

the interest would be that shared memory would be faster to sync instead of sockets
but to be tested what work best for you