Android Question Dual monitors

Theera

Well-Known Member
Licensed User
Longtime User
Hi all,
Is there example about coding manage dual monitors which displays different contents?
Best Regards,
Theera
 

Attachments

  • Screenshot_20230818_192304.jpg
    Screenshot_20230818_192304.jpg
    115.2 KB · Views: 125

MicroDrie

Well-Known Member
Licensed User
What exactly do you mean by dual monitor (are two physical monitors as possible in Windows) or do you mean the split screen display in Android where the screen is divided into two halves?
 
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
What exactly do you mean by dual monitor (are two physical monitors as possible in Windows) or do you mean the split screen display in Android where the screen is divided into two halves?
I asked about the experience from the experts. Is there the example for me study.
 
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
คุณยังไม่ได้ตอบคำถาม ดังนั้นเราจึงไม่ทราบว่าคุณถามเกี่ยวกับอะไร
The first monitor displays all of list ,but the second monitor displays only total of price. They are different. I sorry that my English is badly.
 

Attachments

  • Screenshot_20230821_002839.jpg
    Screenshot_20230821_002839.jpg
    29.7 KB · Views: 90
  • Screenshot_20230821_002855.jpg
    Screenshot_20230821_002855.jpg
    30.8 KB · Views: 96
Upvote 0

agraham

Expert
Licensed User
Longtime User
So one monitor is facing the customer and the other the shopkeeper? Programming them will depend on how the hardware is presented to the Android system. Standard Android only knows about one screen so you need to find out from the manufacturer how they have integrated a second display and if they have their own API for it.
 
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
I think this code might be helped to get displayid() which monitors to be selected displayment.
 
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
I have tried to contact Sunmi who is manufacturer. Perhaps,we could know how to code for study.
 
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
This is the document about machine from another manufacturer
 
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
The lastest I have just requested from the group of VB6.0 member who has the experience about coding dual monitors. But I have the question ,how to extend monitor in android?
 

Attachments

  • Screenshot_20230823_105453.jpg
    Screenshot_20230823_105453.jpg
    84.9 KB · Views: 72
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Without knowing what Manufacturer and what Device Model exactly you are using it is hard to find any Information.

This is maybe the java-sdk for this Printer (Link in #14). I found the link in the description. https://github.com/iminsoftware/IminPrinterLibrary
Probably best is to write a wrapper for this or use it using JavaObject.
 
Last edited:
Upvote 0

aeric

Expert
Licensed User
Longtime User
You need to be more specific. Target one model first. What is the actual model from brand/manufacturer?
Different manufacturers may have different method supported. The documentation for Imin may not work for Sunmi. Maybe they use different Android SDK.
Also, please be more specific which platform you are asking. Is it for Windows or Android?
Asking generic question doesn't guide you anywhere.
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
For example, this is a sample java code from Sunmi Developer page:

#Obtain a real secondary screen:

Java:
public Display getPresentationDisplays() {
    DisplayManager mDisplayManager = (DisplayManager) getSystemService(Context.DISPLAY_SERVICE);
    displays = mDisplayManager.getDisplays();
    for (int i = 0; i < displays.length; i++) {
        Log.e(TAG, “屏幕” + displays[i]);
        if ((displays[i].getFlags() & Display.FLAG_SECURE) != 0
            && (displays[i].getFlags() & Display.FLAG_SUPPORTS_PROTECTED_BUFFERS) != 0
            && (displays[i].getFlags() & Display.FLAG_PRESENTATION) != 0) {
            Log.e(TAG, “第一个真实存在的副屏屏幕” + displays[i]);
            return displays[i];
        }
    }
    return null;
}

For iMin:
Java:
DisplayManager displayManager =(DisplayManager) context.getSystemService(Context.DISPLAY_SERVICE);
Display[] presentationDisplays = displayManager.getDisplays(DisplayManager.DISPLAY_CATEGORY_PRESENTATION);
if(presentationDisplays.length >0){
    // If there is more than one suitable presentation display, then we could consider
    // giving the user a choice. For this example, we simply choose the first display
    // which is the one the system recommends as the preferred presentation display.
    Display display = presentationDisplays[0];
    Presentation presentation =new MyPresentation(context, presentationDisplay);
    presentation.show();
            }
 
Last edited:
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
You need to be more specific. Target one model first. What is the actual model from brand/manufacturer?
Different manufacturers may have different method supported. The documentation for Imin may not work for Sunmi. Maybe they use different Android SDK.
Also, please be more specific which platform you are asking. Is it for Windows or Android?
Asking generic question doesn't guide you anywhere.
I need only to study B4A. I'm poor to buy it,so I can't point to specific.
 
Last edited:
Upvote 0

aeric

Expert
Licensed User
Longtime User
I need only to study B4A. I'm poor to buy it,so I can't point to specific.
Why you need to buy it?
Do you have customer yet? If no, i think better don't waste your time on it.
Try what you can afford.

Maybe the more economically way is to develop a second app to install to second tablet (normally cheaper) and the main app in first tablet send the price to the second app through some kind of protocol (eg. Bluetooth, WiFi, MQTT or use timer to pull data from a first tablet database).
I think apps like Loyverse has another "Customer Display" app. No need fancy integration SDK.
 
Upvote 0
Top