Professional POS Hardware Manufacturer    

Knowledge

» Knowledge

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:
Knowledge

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

    A200 all in one POS
    L200 all in one POS
    C200 all in one POS
    S100 touch screen POS
    S200 touch screen POS
    S300 touch screen POS
    T1 Portable POS

  • 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