java.lang.SecurityException: Requires CAPTURE_VIDEO_OUTPUT or CAPTURE_SECURE_VIDEO_OUTPUT permission, or an appropriate MediaProjection token in order to create a screen sharing virtual display.

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

Android SDK 23 introduced a new way to handle permissions, so as a temporary workaround you can set it to build for SDK below 23. As a permanent solution you have to ask user during runtime for permissions with checkSelfPermission() or requestPermissions()

,
Expert tip

You need the permission android.permission.READ_EXTERNAL_STORAGE. Write <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> on the Android Manifest

Solutions on the web

via Stack Overflow by Влад Новосельцев
, 1 year ago
Requires CAPTURE_VIDEO_OUTPUT or CAPTURE_SECURE_VIDEO_OUTPUT permission, or an appropriate MediaProjection token in order to create a screen sharing virtual display.
via xluat.com by Unknown author, 1 year ago
"gps" location provider requires ACCESS_FINE_LOCATION permission**.
via pr8x.com by Unknown author, 1 year ago
"gps" location provider requires ACCESS_FINE_LOCATION permission**.
via Stack Overflow by praveen_85
, 2 years ago
"gps" location provider requires ACCESS_FINE_LOCATION permission**.
via xda-developers.com by Unknown author, 1 year ago
"passive" location provider requires ACCESS_FINE_LOCATION permission.
java.lang.SecurityException: Requires CAPTURE_VIDEO_OUTPUT or CAPTURE_SECURE_VIDEO_OUTPUT permission, or an appropriate MediaProjection token in order to create a screen sharing virtual display.
at android.os.Parcel.readException(Parcel.java:1599)
at android.os.Parcel.readException(Parcel.java:1552)
at android.hardware.display.IDisplayManager$Stub$Proxy.createVirtualDisplay(IDisplayManager.java:484)
at android.hardware.display.DisplayManagerGlobal.createVirtualDisplay(DisplayManagerGlobal.java:377)
at android.hardware.display.DisplayManager.createVirtualDisplay(DisplayManager.java:537)
at android.hardware.display.DisplayManager.createVirtualDisplay(DisplayManager.java:529)
at com.example.novoseltsev.applicationpopupwindow.MainActivity.onCreate(MainActivity.java:106)
at android.app.Activity.performCreate(Activity.java:6237)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)

Users with the same issue

Once, 15 hours ago
Samebug visitor profile picture
Unknown user
Once, 20 hours ago
Samebug visitor profile picture
Unknown user
Once, 1 day ago
Samebug visitor profile picture
Unknown user
Once, 1 day ago
Once, 1 day ago
249 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.