Hello Guys,
Why this code is not working??? I searched on google but :(:(:(
I am really tired
private static String error;
public static String SetScreenCapture()
{
try
{
UnityPlayer.currentActivity.runOnUiThread(new Runnable() {
@Override
public void run() {
Toast.makeText(UnityPlayer.currentActivity, "Screen capture OFF", Toast.LENGTH_LONG).show();
UnityPlayer.currentActivity.getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE);
error = "Called";
}
});
}
catch (Exception e) {
error = e.toString();
}
return error;
}
This is my java plugin code. When I called SetScreenCapture method…
- Toast is visible properly
- Then returning empty string
Please help me