简体   繁体   中英

Can we limit user to show app screen instead of Dialer Screen when making a call

I have a scenario in which I have to make a call on press of a button, that I am able to do using below code after checking the permissions.

Intent intent = new Intent(Intent.ACTION_CALL);
intent.setData(Uri.parse("tel:0123456789"));
startActivity(intent);

It is successfully able to make a call directly without user's intervention but the problem for me is It is redirecting to call screen. Is it possible that the call is happening on background and user stays on the app page?

Any help would be appreciated.

AFAIK the only way you could do that is having implemented your own service for making a call. If you intend to use Implicit Intent to do so, you will be redirected to that calling Activity. You will return to you Applications activity after the call is ended though.

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