• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<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
16    href="src/com/example/android/sip/IncomingCallReceiver.html"><code>
17      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
29following to the application's manifest before publishing to Google Play:</p>
30<ul> <li><code>&lt;uses-sdk android:minSdkVersion="9" /&gt;</code>, which
31  indicates to Google Play and the platform that your application requires
32  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>
36  element.</li> </ul> <p>To control how Google Play filters your application
37from devices that do not support SIP, remember to add the following to the
38application's manifest <ul> <li><code>&lt;uses-feature
39    android:name="android.hardware.sip.voip" /&gt;</code>, which tells Google
40  Play that your application uses the SIP API. The declaration should include
41  an <code>android:required</code> attribute that indicates whether you want
42  Google Play to filter the application from devices that do not offer SIP
43  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" />
53