简体   繁体   中英

remove the alert that pops up when calling from iOS app using telprompt://

I need to make a call from my iOS app, and after the user is done calling, i need him to come back on the same app screen from where he made the call. if i use the following code

NSString *phoneNumber = [@"telprompt://" stringByAppendingString:@"999999999"];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:phoneNumber]];

i achieve what i want, but get an unwanted alert confirming if the user wants to make a call or not. I don't want this.

If i use the code

NSString *phoneNumber = [@"tel://" stringByAppendingString:@"999999999"];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:phoneNumber]];

i do not get the alert, but i do not get back to my app screen too..!!

Is there a way where i do not get the alert while making the call and get back to the app screen after making the call?? please help..

You cannot do otherwise, those are the two possibilities. telprompt with alert and callback or tel with not coming back and no alert.

If the users leaves the app to make a phone call, there's no way you can return to your app after it. Your app is backgrounded, and the phone app is foregrounded.

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