Forum Discussion
EvgenyZobnin
Apr 25, 2022Copper Contributor
More control over the placement of activities on the screens
Hello again. I'm in the process of adapting my launcher app for the Surface Duo. My idea is to use the left screen as the primary screen and the right screen as the secondary screen (it will display ...
khalper
Microsoft
Apr 26, 2022
Hi Evgeny, thanks for your questions!
- Like you guessed, the Intent.FLAG_ACTIVITY_LAUNCH_ADJACENT flag produces different results depending on what is currently shown in each screen - you can read more about this in the documentation or check out our sample. In Android 12L, the behavior of the flag will be updated for large screens as described in this blog post. Unfortunately, at the moment, there is no way to always make sure an intent is launched on the second screen.
- You can use the Jetpack Window Manager library to access the window metrics for an activity and check its bounding rectangle - however, this won't tell you about where other applications/activities are located. Unfortunately, it is also not currently possible to find out information about where other applications are running.
If any new APIs are created in the future to address these issues, we will be sure to let you know!
EvgenyZobnin
Apr 26, 2022Copper Contributor
Ok. Thanks for response.