简体   繁体   中英

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM