How to display other app in surface view?

345 Views Asked by At

I would like to mirror e.g. Waze in my app SurfaceView:

    Intent intent = getPackageManager().getLaunchIntentForPackage("com.waze"); //"com.waze"

    Bundle opts = ActivityOptions
            .makeBasic()
            .setLaunchDisplayId(virtualDisplay.getDisplay().getDisplayId())
            .toBundle();

    startActivity(intent, opts);

I'm getting a permission denied error:

java.lang.SecurityException: Permission Denial: starting Intent

Would I have a workaround for it? Would it be possible?

0

There are 0 best solutions below