Professional POS Hardware Manufacturer    

Support

» Support

How to display different contents in Android dual screens POS terminal

July 24, 2019

Android dual screens is clone mode, it would need to do a user-defined presentation if you want to display different things in the customer display

  1. Set permissions first
1

2

3

4

<!– Display system window permissions –>

<uses-permission android:name=”android.permission.SYSTEM_ALERT_WINDOW”/>

<!– Display at the top of the screen addview–>

<uses-permission android:name=”android.permission.SYSTEM_OVERLAY_WINDOW” />

  1. User-defined
1

2

3

4

5

6

7

8

9

10

11

12

public class DifferentDislay extends Presentation{

public DifferentDislay(Context outerContext, Display display) {

super(outerContext,display);

 

}

@Override

protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.test);

 

}

}

  1. Paste this code, then the second screen can display different content
1

2

3

4

5

6

7

8

9

10

11

DisplayManager mDisplayManager;//

mDisplayManager = (DisplayManager) this

.getSystemService(Context.DISPLAY_SERVICE);

Display[] displays = mDisplayManager.getDisplays();

 

if (mPresentation == null) {

mPresentation = new DifferentDislay(this, displays[displays.length – 1]);// displays[1]

 

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