简体   繁体   中英

telprompt without alert

My app need to dial a number and I know that telprompt return back to app after dial. But it will alert user every time want to call a number, is there any way to direct call number without show a alert view?

you can make a call using bellow code:-

NSString *value =@"9999999999";//your telnumber
NSURL *url = [[ NSURL alloc ] initWithString:[NSString stringWithFormat:@"tel://%@",value]];

NSLog(@"currunt number%@",url);
[[UIApplication sharedApplication] openURL:url]; 

hope this will help little more

tel directly call the given number without confirmation and did not return to application after call finishes so instead of it , you may use telprompt .

     PhoneNumber=@"999999999";
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"telprompt://%@", PhoneNumber]]];

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