user1687717
user1687717

Reputation: 3475

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?

Upvotes: 4

Views: 2248

Answers (2)

Anurag Bhakuni
Anurag Bhakuni

Reputation: 2439

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]]];

Upvotes: 1

Nitin Gohel
Nitin Gohel

Reputation: 49730

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]; 

Upvotes: 4

Related Questions