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
 
No edit summary
Line 1: Line 1:
=How to start a call from your application:=
h1. How to start a call from your application:


On iOS, there are two possibilities to start a phone call:
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>


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


# Prompt the user before making the call<br />
= How to start a FaceTime call:<br /><code>QDesktopServices::openUrl(QUrl(&quot;facetime://+123456789&amp;quot;));<code> =


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


=How to send a <span class="caps">SMS</span>:=
Setting the SMS content through this method cannot be done. This would require to use iOS API directly through Objective-C++
 
Setting the <span class="caps">SMS</span> content through this method cannot be done. This would require to use iOS <span class="caps">API</span> directly through Objective-C++
 
The number format will change from country to country

Revision as of 10:15, 24 February 2015

h1. How to start a call from your application:

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

QDesktopServices::openUrl(QUrl(&quot;tel://+123456789&amp;quot;));<code>

# Prompt the user before making the call<br />

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

How to start a FaceTime call:
QDesktopServices::openUrl(QUrl(&quot;facetime://+123456789&amp;quot;));<code> =

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

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