Resume your application after call ended - iPhone:
By using openURL we can make phone call from our app. But it has one disadvantage…rather than bringing the users back to the application, it takes the users to the default Phone application after they end the call. So the user need to reopen the app. To avoid this issue you can use UIWebView to open your tel URL . This is a sample code for resume user to application after phone call ended.
Code
By using openURL we can make phone call from our app. But it has one disadvantage…rather than bringing the users back to the application, it takes the users to the default Phone application after they end the call. So the user need to reopen the app. To avoid this issue you can use UIWebView to open your tel URL . This is a sample code for resume user to application after phone call ended.
Code
NSString *strPhoneNo = @"123-345-5678";
UIWebView *phoneCallWebview = [[UIWebView alloc] init];
NSURL *callURL = [NSURL URLWithString:[NSString stringWithFormat:@"tel:%@", strPhoneNo]];
[phoneCallWebview loadRequest:[NSURLRequest requestWithURL:callURL ]];
That's all. If this post is useful for you , please share this knowledge to your friends. Thanks!
UIWebView *phoneCallWebview = [[UIWebView alloc] init];
NSURL *callURL = [NSURL URLWithString:[NSString stringWithFormat:@"tel:%@", strPhoneNo]];
[phoneCallWebview loadRequest:[NSURLRequest requestWithURL:callURL ]];
0 comments:
Post a Comment
Share your thoughts here...