How to make a call or send a sms on iOS: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
(Gather iOS pages into a category)
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
h1. How to start a call from your application:
[[Category:HowTo]]
[[Category:iOS]]


On iOS, there are two possibilities to start a phone call:<br /># Start a call directly<br /><code>QDesktopServices::openUrl(QUrl(&quot;tel://+123456789&amp;quot;));<code>
== How to start a call from your application: ==


# Prompt the user before making the call<br /></code>QDesktopServices::openUrl(QUrl(&quot;telprompt://+123456789&amp;quot;));</code>


= How to start a FaceTime call:<br /><code>QDesktopServices::openUrl(QUrl(&quot;facetime://+123456789&amp;quot;));<code> =
On iOS, there are two possibilities to start a phone call:
 
1. Start a call directly
<code>QDesktopServices::openUrl(QUrl("tel://+123456789"));</code>
 
2. Prompt the user before making the call
<code>QDesktopServices::openUrl(QUrl("telprompt://+123456789"));</code>
 
== How to start a FaceTime call: ==
<code>QDesktopServices::openUrl(QUrl("facetime://+123456789"));</code>
 
== How to send a SMS: ==
<code>QDesktopServices::openUrl(QUrl("sms://+123456789"));</code>


= How to send a SMS:<br /></code>QDesktopServices::openUrl(QUrl(&quot;sms://+123456789&amp;quot;));</code> =


Setting the SMS content through this method cannot be done. This would require to use iOS API directly through Objective-C++
Setting the SMS content through this method cannot be done. This would require to use iOS API directly through Objective-C++

Latest revision as of 16:03, 25 November 2016


How to start a call from your application:

On iOS, there are two possibilities to start a phone call:

1. Start a call directly

QDesktopServices::openUrl(QUrl("tel://+123456789"));

2. Prompt the user before making the call

QDesktopServices::openUrl(QUrl("telprompt://+123456789"));

How to start a FaceTime call:

QDesktopServices::openUrl(QUrl("facetime://+123456789"));

How to send a SMS:

QDesktopServices::openUrl(QUrl("sms://+123456789"));


Setting the SMS content through this method cannot be done. This would require to use iOS API directly through Objective-C++