blob: ab187a058845f0f8ba735cfa6a988fd66598e1b3 [file] [log] [blame]
Alexander Lucasa0257962010-11-02 21:50:45 -07001<p>This is a demo application highlighting how to make internet-based calls with
2the SIP API. The application uses a walkie-talkie style interface, allowing you
3to only be heard when the button is pushed down.</p>
4
5<p>The source code for this demo app shows how to accomplish three key things
6with SIP: Make a call, receive a call, and signal to the Android platform that
7your app wants to receive incoming SIP calls, so that they can be handled from
8within the application.</p>
9
10
11<p>The application includes:<p>
12<ul> <li><a
13 href="src/com/example/android/sip/SipSettings.html"><code>SipSettings</code></a>
14 &mdash; a <code>PreferenceActivity</code> that supplies basic settings for SIP
15 authentication.</li> <li><a
Scott Main9efea492010-12-08 09:26:56 -080016 href="src/com/example/android/sip/IncomingCallReceiver.html"><code>
Alexander Lucasa0257962010-11-02 21:50:45 -070017 IncomingCallReceiver</code></a> &mdash; a <code>BroadcastReceiver</code>
18 that listens for incoming SIP calls and passes them to
19 <code>WalkieTalkieActivity</code> for handling.</li> <li><a
20 href="src/com/example/android/sip/WalkieTalkieActivity.html"><code>WalkieTalkieActivity</code></a>
21 &mdash; a activity that login to SIP provider and registers the device to
22 receive incoming SIP, handles incoming calls and makes outgoing calls, managing
23 UI during the call.</li> </ul>
24<p>If you are developing an application that uses the SIP API, remember that the
25feature is supported only on Android 2.3 (API level 9) and higher versions of
26the platform. Also, among devices running Android 2.3 (API level 9) or higher,
27not all devices will offer SIP support. To ensure that your application can only
28be installed on devices that are capable of supporting SIP, remember to add the
Dirk Dougherty9ba4ba72012-02-13 20:44:55 -080029following to the application's manifest before publishing to Google Play:</p>
Alexander Lucasa0257962010-11-02 21:50:45 -070030<ul> <li><code>&lt;uses-sdk android:minSdkVersion="9" /&gt;</code>, which
Dirk Dougherty9ba4ba72012-02-13 20:44:55 -080031 indicates to Google Play and the platform that your application requires
Alexander Lucasa0257962010-11-02 21:50:45 -070032 Android 2.3 or higher. For more information, see <a
33 href="../../../guide/appendix/api-levels.html">API Levels</a> and the
34 documentation for the <a
35 href="../../../guide/topics/manifest/uses-sdk-element.html"><code>&lt;uses-sdk&gt;</code></a>
Dirk Dougherty9ba4ba72012-02-13 20:44:55 -080036 element.</li> </ul> <p>To control how Google Play filters your application
Alexander Lucasa0257962010-11-02 21:50:45 -070037from devices that do not support SIP, remember to add the following to the
38application's manifest <ul> <li><code>&lt;uses-feature
Dirk Dougherty9ba4ba72012-02-13 20:44:55 -080039 android:name="android.hardware.sip.voip" /&gt;</code>, which tells Google
40 Play that your application uses the SIP API. The declaration should include
Alexander Lucasa0257962010-11-02 21:50:45 -070041 an <code>android:required</code> attribute that indicates whether you want
Dirk Dougherty9ba4ba72012-02-13 20:44:55 -080042 Google Play to filter the application from devices that do not offer SIP
Alexander Lucasa0257962010-11-02 21:50:45 -070043 support. Other <code>&lt;uses-feature&gt;</code> declarations may also be
44 needed, depending on your implementation. For more information, see the
45 documentation for the <a
46 href="../../../guide/topics/manifest/uses-feature-element.html"><code>&lt;uses-feature&gt;</code></a>
47 element.</li> </ul>
48<p>For more information about using the SIP API, see the <a
49 href="../../../reference/android/net/sip/package-summary.html"><code>android.net.sip</a></code>
50documentation. </p>
51
52<img alt="" src="../images/SipDemo.png" />