I want to use ActivityOptions
but When I try to run my application I am getting a security exception as
Permission Denial:starting Intent.
ActivityOptions options = ActivityOptions.makeBasic();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
options.setLaunchDisplayId(1);
}
Intent secondIntent = new Intent(HomeActivity.this, TestActivity.class);
secondIntent.addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(secondIntent, options.toBundle());
Does anyone know what can i do for this?