Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
387 views
in Technique[技术] by (71.8m points)

iphone - iOS 4.2 - Return to app after phone call

I can successfully initiate a phone call within my app using the following:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel://123456789"]];

However, is it possible to automatically return back to the app once the phone call has been terminated? It seems this was not possible under iPhone OS 3.0 but I am hoping it is now possible under iOS 4.2 with multitasking (I wasn't able to find any information on this question specific to iOS 4.2).

Thanks in advance for any assistance!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I know the question is very old, but currently you can do this (at least on iOS 5) by using telprompt://, like:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"telprompt://123456789"]];

iPhone will show alert view confirmation and when call ends, your app shows again, instead of iPhone's call app.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...