prathima
prathima

Reputation: 113

how to enable Multi display feature on Android O

Did anyone tried Android multiple display feature which is new in Android O

Following steps which is not working for me

1.connect hdmi cable to mobile(not sure can use USB as well)

2.make device in root and give following command (expect app is installed) and not seen that app is launching on secondary(Multiple display feature ) it's just reflecting mobile display as it is because connected hdmi cable

adb shell am start com.Chrome.Canary --display 1 

Please suggest any other way or any command to make it work?

Upvotes: 1

Views: 10408

Answers (2)

prathima
prathima

Reputation: 113

Ran using below procedure passed with dell monitor: ADB shell can be used to call Activity Manager(am) for starting any system actions (or an activity).

The syntax: adb shell am start [-n (component)] [-a (action)] [-t (mime type)] [-d (data_URL)]

examples: 1. For starting ‘Settings app’: adb shell am start -n com.android.settings/.Settings
In the above-mentioned command, we set component(-n) to be settings in a specific format.

  1. For starting ‘Gallery app’: adb shell am start -t image/* -a android.intent.action.VIEW In the above-mentioned command, we are setting action(-a) for opening the default app for gallery with mime type(-t) to be image/*

In general, for external display the ‘display_id’ starts from ‘1’ in an increasing order, final command to do multi display operation is

adb shell am start -n com.android.settings/.Settings --display 1

The above command will display ‘Settings’ app only in external display with display_id = 1. The primary display will be in the same mode as before executing the command.

Upvotes: 2

user1648014
user1648014

Reputation: 21

Android in general do mirroring when two displays are connected. Right now google has not enabled support for touch and display mapping on the two displays. But if you want to launch any activity on any of the two displays then the command adb shell am start "your_activity" --display display_id will launch your activity on that particular display id. If the above command doesn't launch your activity then you can use adb shell am stack start display_id "your activity". This will also work. But regarding touch, it will be mapped to the primary display (display id 0). As per google you can enable the mapping of touch in EventHub.cpp of Android source code but till now I haven't found it useful. Hope my answer helps you.

Upvotes: 2

Related Questions