Professional POS Hardware Manufacturer    

Support

» Support

The API introduction of Android dual screen POS display different contents

October 10, 2019

1.Obtain the screen on the device
DisplayManager mDisplayManager;//Screen management
Display[] displays;//Screen array
mDisplayManager =(DisplayManager)context.getSystemService(Context.DISPLAY_SERVICE);
displays =mDisplayManager.getDisplays();

2.Main display and customer display distinction
Main display:displays[0]
Customer display:displays[1]

3.Display content on the secondary screen
Implemented through Presentation, Presentation inherits Dialog.Suppose we write a DifferentDislay class that inherits from the Presentation class. Code
privateclass DifferentDislayextendsPresentation{
public DifferentDislay(ContextouterContext, Display display) {
super(outerContext,display);
//TODOAuto-generated constructor stub
}
@Override
protectedvoid onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.diffrentdisplay_basket);
}
}

4.Turn on the customer display
DifferentDislay mPresentation =new DifferentDislay (context,displays[1]);//displays[1]is customer display
mPresentation.getWindow().setType(
WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
mPresentation.show();

CATEGORY AND TAGS:
Support

Maybe you like also

  • Product Categories

    Touch Screen POS
    All in One POS
    Portable POS
    Point of sale box
    Touch Screen Monitor
    Thermal Receipt Printer
    Cash Drawer

  • Main Products

    T Series height adjustable POS
    X Series Modular design POS
    J Series slim body POS
    S Series popular POS
    E Series all in one POS
    Point of sale box

  • Company

    About Sunany
    Our history
    Factory Overview
    Certification
    News
    Video
    Knowledge

  • Contact Us

    TEL: +86 755 84877890
    Mobile:+86 134 22857986
    Mail:info@sunany.com