I am working on MediaProjection API to capture the screen.
I have used the below code to call the android System Activity to capture the screen,
MediaProjectionManager mProjectionManager = (MediaProjectionManager)getSystemService(Context.MEDIA_PROJECTION_SERVICE);
startActivityForResult(mProjectionManager.createScreenCaptureIntent(),REQUEST_CODE);
The above code will start the system activity called com.android.systemui.media.MediaProjectionPermissionActivity. This will show the dialog to start the screen capture.
I need to change that dialog text and I have to use my custom text.
I have checked that MediaProjectionPermissionActivity class code which as below,
mDialog = new AlertDialog.Builder(this)
.setIcon(aInfo.loadIcon(packageManager))
.setMessage(getString(R.string.media_projection_dialog_text, appName))
.setPositiveButton(R.string.media_projection_action_text, this)
.setNegativeButton(android.R.string.cancel, this)
.setView(R.layout.remember_permission_checkbox)
.setOnCancelListener(this)
.create();
How to change the dialog text which is shown inside system activity?
Please help me on this. Thanks in advance.