cancel
Showing results for 
Search instead for 
Did you mean: 

Bug in latest Quest 2 Os Version, createScreenCaptureIntent not working

vit.hlavacek
Protege

Last version of Oculus 2 software
Version: 32.0.0.58.353.311069636
OS Version: user-18371800151900000

Edit: Latest version still not working
Version: 33.0.0.46.367.328965050
OS Version: user-19130100108500000

 

Edit2: Latest version still not working
Version: 34.0.0.91.366.316373824
OS Version: user-20169900217500000

 

Edit3: Latest version now working
Version: 42.....

But not working with handtracking. Confirm screen has it disabled and cannot do anything untill user picks up a controller and confirms/denies it.

 

has a new bug (was working in previous version 31.1....) and is working fine on other devices with android 10

The new bug is with asking for screen capture permission, If an app asks for it, exception is thrown.

This should be working, there is no other way to get the required permission for screenCapture / recording

 

 

 

 

 

 

 

private final ActivityResultLauncher<Intent> resultLauncher = registerForActivityResult
....
....

MediaProjectionManager mediaProjectionManager = (MediaProjectionManager) getSystemService(MEDIA_PROJECTION_SERVICE);
resultLauncher.launch(mediaProjectionManager.createScreenCaptureIntent());

 

 

 

 

 

 

 

 throws

 

 

 

 

 

 

 

    android.content.ActivityNotFoundException: Unable to find explicit activity class {com.android.systemui/com.android.systemui.media.MediaProjectionPermissionActivity}; have you declared this activity in your AndroidManifest.xml?
        at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2056)
        at android.app.Instrumentation.execStartActivity(Instrumentation.java:1716)
        at android.app.Activity.startActivityForResult(Activity.java:5211)
        at androidx.activity.ComponentActivity.startActivityForResult(ComponentActivity.java:574)
        at androidx.core.app.ActivityCompat.startActivityForResult(ActivityCompat.java:234)
        at androidx.activity.ComponentActivity$2.onLaunch(ComponentActivity.java:208)
        at androidx.activity.result.ActivityResultRegistry$2.launch(ActivityResultRegistry.java:166)
        at androidx.activity.result.ActivityResultLauncher.launch(ActivityResultLauncher.java:47)

 

 

 

 

 

 

 

 

Any suggestions? Or is my only option to hope they fix it in another version?

1 ACCEPTED SOLUTION

Accepted Solutions

michellaneous
Oculus Staff

Hey all! Good news - this issue should be resolved and released after v40. Our engineering team worked on restoring this feature so you can access the permission to cast again. Thank you for your patience. When v40 releases, please update your devices and try again. 

View solution in original post

45 REPLIES 45

CarpetFace
Expert Protege

I'm also interested in figuring out how to get createScreenCaptureIntent to work.  I saw your other post and haven't fully tried that approach yet (I replied there). 

 

If I use the FJavaWrapper::GameActivityThis I can call createScreenCaptureIntent without an exception being thrown but no UX is shown (I'm on 4.26 Oculus branch testing on Quest 1 (haven't test Quest 2 yet)).  That probably doesn't help much, but just in case that does I thought to share.  

 

Note, the lack of exception doesn't seem to help me much.  I don't know how to get the callback from that activity so I can't get the Intent that I'm supposed to get from that callback to pass to getMediaProjection.  I tried passing the Intent which I got from createScreenCaptureIntent to getMediaProjection but it just returns null.

ynkfish
Protege

Hi,

 

Have you gotten any reply from oculus support about this bug?
We're in a serious pickle as well due to this issue...

 

Kind regards,
Yannick

vit.hlavacek
Protege

Ye but it was not helpfull (suggested to add the permission for screen capture to manifest 😕 ). I think i did not get though to anybody with technical background... Tried again with better explanation, hopefully this time they will forward it to someone who actually knows something.

Send them bug too, hopefully more tickets will move it up the queue.


Yeah, this needs to go straight to the Quest Android OS developers.
I've sent a bug report to oculus developer support and my boss added a post on the Oculus ISV Program as well (via workplace)

I'll keep you posted if I get any news.

 

I also faced this problem.

Although I tried another way(such as using DisplayManager), the result was that mediaprojection is needed to capture the screen because of the high Android version.

I'm still trying to find how to capture the screen without mediaprojection, but it looks not easy...

ynkfish
Protege

As far as I know, it is not possible to do it without a mediaprojection.

You could try embedding streaming in your unity project, but this will seriously affect the performance

CarpetFace
Expert Protege

The exception message I get when I do this call:

resultLauncher.launch(mediaProjectionManager.createScreenCaptureIntent());

is:

"unable to find explicit activity class com.android.systemui/com.android.systemui.media.MediaProjectionPermissionActivity"

Is that the same exception you are getting vit?

vit.hlavacek
Protege

ye its the same, the full exception is in my first comment

limatemple
Explorer

Has anyone heard back from Oculus on this point? Streaming is also a crucial feature for our product experience, and we're trying to figure out whether or not this is a policy change or just a technical error.