Categories
- News (154)
- Support (149)
- OEM & ODM (9)
- Drivers (7)
- Instructions (18)
- SDKs & Tools (5)
- Knowledge (54)
- Solutions (14)
- Blog (25)
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(); } |