javaandroidpermissionsrecorderandroid-mediaprojection

Start screen recording permission android java


I want to Record a screen automatically, without any permissions like in the image below.

Is there any solution for it or any examples?

if not then, I want to check that the user clicked on don't show again check box.

Or is there any other way to record the screen using Media Projection automatically?

Screen capture permission approval popup


Solution

  • I want to Record a screen automatically, without any permission

    Simply not possible. This is a violation of privacy. That is why you have to receive permission from a user in the first place.

    In Android 9 and lower, the screen buffer capture permissions (READ_FRAME_BUFFER, CAPTURE_VIDEO_OUTPUT, and CAPTURE_SECURE_VIDEO_OUTPUT) were granted to apps that had either signature or privileged permissions. This enabled seamless screen-buffer capturing activities, such as taking screenshots, or recording a device’s screen contents.

    Starting in Android 10, to prevent silent access to a device’s screen contents, video capture permissions aren't granted to privileged apps. Access without user consent is restricted, and granted only to apps that have signature permissions. Device manufacturers that run privileged apps relying on this silent capture functionality are affected by this requirement.

    Source