Categories
- News (235)
- Support (257)
- OEM & ODM (10)
- Drivers & Tools (10)
- Instructions (28)
- Troubleshooting (44)
- Knowledge (97)
- Maintainance (8)
- Blog (87)
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
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
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
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(); } |