Questions tagged [android-virtualdisplay]

19 questions
8
votes
1 answer

Activity displays incorrect when launched on a secondary virtualdisplay

In my scenario, I want to mirror another app in my app. I use DisplayManager to createVirtualDisplay for my SurfaceView. Then I set DisplayId as this VirtualDisplay in AcitivityOptions when I start activity. By this process, another app can be…
recnac
  • 3,744
  • 6
  • 24
  • 46
6
votes
0 answers

Android Emulator - Tiktok crashing

Am using Android Studio 4.2.1 (most current), and observed this behavior in both devices I tried: Pixel C (API 30) 13.5 Freeform (API 30) Followed these instructions to get the Play Store on my android emulators, then downloaded Tiktok, and every…
6
votes
1 answer

Android 10 injecting inputs to External Display / Virtual Display

Concept: I have an Android application written in Kotlin that simply launches an Android application on an external display. The display could be a AirServer, Miracast, Microsoft Connect, USB-OTG HDMI, USB-C HDMI, or a Simulated Secondary Display…
Tyler
  • 101
  • 2
  • 8
3
votes
0 answers

Touch on multiple ActivityViews in Android11

how can i use multiple ActivityViews correctly in Android11? I already created a working sample in P+Q. But in R touch stopped working. The activities are displayed well but only the highest view reacts on touch. All other activies do not respond.…
user13163893
3
votes
0 answers

How to display other app in surface view?

I would like to mirror e.g. Waze in my app SurfaceView: Intent intent = getPackageManager().getLaunchIntentForPackage("com.waze"); //"com.waze" Bundle opts = ActivityOptions .makeBasic() …
2
votes
1 answer

call release() did not work after creating virtual display

I used MediaProjection to create VirtualDisplay to take screenshots. Afterward, I tried to release the virtualDisplay, but it did not work: // create virtual display... mVirtualDisplay = sMediaProjection.createVirtualDisplay(DISPLAY, mWidth,…
1
vote
0 answers

flutter_webview crashes when height over 2048 on Android devices

I am trying to display articles on my flutter app from the web, so I am using flutter_webview wrapped into a container that takes the height of the page from the JavaScript onPageFinished, the height can be too big and causes the app to crash, for…
1
vote
1 answer

Android - Reading VirtualDisplay frames in real time

I am capturing my Android device's screen using the MediaProjection API by creating a VirtualDisplay and displaying it on a SurfaceView that remains always visible. I would like to perform some image processing on the frames grabbed by the…
1
vote
1 answer

Defining an area for a screen capture on android

I currently have a VirtualDisplay set up using the MediaProjection API which is being drawn on to a SurfaceView that is always visible. The VirtualDisplay is, however, capturing the entire display but I would like it do capture only the portion of…
1
vote
0 answers

Screen projection not supported on secondary displays

I have a following setup Android Device connected to 2 physical Displays Display 21442613134359552 (HWC display 0): port=0 pnpId=XXX displayName="XXXMaster" Display 21442613134359553 (HWC display 1): port=1 pnpId=XXX displayName="XXXMaster" I'm…
0
votes
1 answer

Capture android screenshots layers

I am currently capturing the screen using media projection, on the screen running another application, now I want to add elements to a floating window and still capture only the layer below. When using layoutParams.flags =…
user3698465
  • 185
  • 1
  • 10
0
votes
0 answers

How to draw a OES texture to a Surface direct without color format change in Android

I have an OES texture record from VirtualDisplay, for some reason, I need draw the texture to another Surface from somewhere else. The problem is I want keep the origin OES texture's color format, or using a NV21 color format; I can find many answer…
0
votes
0 answers

[android 12, 13]Display Content to Second Display and do simulate click and inputs on Second Display

No, sorry. External displays are display-only in standard Android. You can collect input on the primary display (e.g., your phone or tablet) and use that to affect the contents on the external display (e.g., call pageDown() or pageUp() on the…
0
votes
0 answers

Is it possible to capture Android Screen multiple times simultaneously?

Is it possible to capture Android screen multiple times with different settings on Android 13? I've tried two approaches: Create two media projections using the same Activity.RESULT_OK and intent Create one media projection and two virtual displays…
0
votes
0 answers

I'm trying to show a presentation into a virtual display on Android 12

im trying to show a presentation that contains a video inside a virtual display i added a listener on the virtual display private val mDisplayListener: DisplayManager.DisplayListener = object : DisplayManager.DisplayListener { private var…
1
2