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?