I'm writing an application that makes screenshots of display from time to time. I'd like an idea to show for users MediaProjection permission window on the first start app (like normal permissions), save MediaProjectionManager instance in some persistence storage and use it later for making screenshots. Let's assume users will confirm and mark checkbox. Is it possible?

How I'm asking permission:

mMediaProjectionManager =
            (MediaProjectionManager) getSystemService(Context.MEDIA_PROJECTION_SERVICE);
startActivityForResult(mMediaProjectionManager.createScreenCaptureIntent(),
            REQUEST_MEDIA_PROJECTION);
1

There are 1 answers

0
CommonsWare On

save MediaProjectionManager instance in some persistence storage

If by "persistence storage" you mean a file or database, then no, this is not possible.