bofredo
bofredo

Reputation: 2348

How can i add certain flags to my Intent.ACTION_CALL?

i built an activity that can launch itself when i hit a certain button-combination on my locked screen. I also managed to keep the activity running despite pressing the powerButton two times --> screen off and screen on --> activity is still running and keyguard still retired from duty. This is done by adding flags in the onCreate()-method of my activity.

 i.e. getWindow().addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD);

Now i want to achieve the same with the Intent.ACTION_CALL. But the problem is that i can't override any method of that intent as it seems to be exclusively run by android. Also, adding flags to the intent before i hit startActivity doesn't work as i can't use the necessary flags here.

Does anyone have an idea how i can achieve it?

Upvotes: 0

Views: 351

Answers (1)

Alexander Semenov
Alexander Semenov

Reputation: 1551

If I understood correct, you want to make another activity, you starting with Intent.ACTION_CALL action, to add some flags to it's window.

It's not possible on Android. It means another app should give everyone rights to control itself in order to do this.

You can only add flags to Intent for controlling new activity start and tasking options. See official documentation, you can use flags, that starts with FLAG_ACTIVITY

Upvotes: 1

Related Questions