0 votes
by (1.5k points)
edited by

Please, provide an intent on how to invoke Video Capture shortcut from Pico System Menu in Unity.

1 Answer

0 votes
by (55.5k points)
selected by
 
Best answer

AndroidJavaObject context = new AndroidJavaClass("com.unity3d.player.UnityPlayer").GetStatic<AndroidJavaObject>("currentActivity");

AndroidJavaObject intent = new AndroidJavaObject("android.content.Intent");

intent.Call<AndroidJavaObject>("setAction", "pvr.intent.action.RECORD");

intent.Call<AndroidJavaObject>("setPackage", "com.pvr.shortcut");

intent.Call<AndroidJavaObject>("putExtra", "action_type", 0);

//0: starts recording screen; 1: stops recording screen

context.Call<AndroidJavaObject>("startService", intent);

Please remeber to add <AndroidJavaObject>

...