xref: /aosp_15_r20/development/samples/SipDemo/_index.html (revision 90c8c64db3049935a07c6143d7fd006e26f8ecca)
1*90c8c64dSAndroid Build Coastguard Worker<p>This is a demo application highlighting how to make internet-based calls with
2*90c8c64dSAndroid Build Coastguard Workerthe SIP API.  The application uses a walkie-talkie style interface, allowing you
3*90c8c64dSAndroid Build Coastguard Workerto only be heard when the button is pushed down.</p>
4*90c8c64dSAndroid Build Coastguard Worker
5*90c8c64dSAndroid Build Coastguard Worker<p>The source code for this demo app shows how to accomplish three key things
6*90c8c64dSAndroid Build Coastguard Workerwith SIP:  Make a call, receive a call, and signal to the Android platform that
7*90c8c64dSAndroid Build Coastguard Workeryour app wants to receive incoming SIP calls, so that they can be handled from
8*90c8c64dSAndroid Build Coastguard Workerwithin the application.</p>
9*90c8c64dSAndroid Build Coastguard Worker
10*90c8c64dSAndroid Build Coastguard Worker
11*90c8c64dSAndroid Build Coastguard Worker<p>The application includes:<p>
12*90c8c64dSAndroid Build Coastguard Worker<ul> <li><a
13*90c8c64dSAndroid Build Coastguard Worker    href="src/com/example/android/sip/SipSettings.html"><code>SipSettings</code></a>
14*90c8c64dSAndroid Build Coastguard Worker  &mdash; a <code>PreferenceActivity</code> that supplies basic settings for SIP
15*90c8c64dSAndroid Build Coastguard Worker  authentication.</li> <li><a
16*90c8c64dSAndroid Build Coastguard Worker    href="src/com/example/android/sip/IncomingCallReceiver.html"><code>
17*90c8c64dSAndroid Build Coastguard Worker      IncomingCallReceiver</code></a> &mdash; a <code>BroadcastReceiver</code>
18*90c8c64dSAndroid Build Coastguard Worker  that listens for incoming SIP calls and passes them to
19*90c8c64dSAndroid Build Coastguard Worker  <code>WalkieTalkieActivity</code> for handling.</li> <li><a
20*90c8c64dSAndroid Build Coastguard Worker    href="src/com/example/android/sip/WalkieTalkieActivity.html"><code>WalkieTalkieActivity</code></a>
21*90c8c64dSAndroid Build Coastguard Worker  &mdash; a activity that login to SIP provider and registers the device to
22*90c8c64dSAndroid Build Coastguard Worker  receive incoming SIP, handles incoming calls and makes outgoing calls, managing
23*90c8c64dSAndroid Build Coastguard Worker  UI during the call.</li> </ul>
24*90c8c64dSAndroid Build Coastguard Worker<p>If you are developing an application that uses the SIP API, remember that the
25*90c8c64dSAndroid Build Coastguard Workerfeature is supported only on Android 2.3 (API level 9) and higher versions of
26*90c8c64dSAndroid Build Coastguard Workerthe platform. Also, among devices running Android 2.3 (API level 9) or higher,
27*90c8c64dSAndroid Build Coastguard Workernot all devices will offer SIP support. To ensure that your application can only
28*90c8c64dSAndroid Build Coastguard Workerbe installed on devices that are capable of supporting SIP, remember to add the
29*90c8c64dSAndroid Build Coastguard Workerfollowing to the application's manifest before publishing to Google Play:</p>
30*90c8c64dSAndroid Build Coastguard Worker<ul> <li><code>&lt;uses-sdk android:minSdkVersion="9" /&gt;</code>, which
31*90c8c64dSAndroid Build Coastguard Worker  indicates to Google Play and the platform that your application requires
32*90c8c64dSAndroid Build Coastguard Worker  Android 2.3 or higher. For more information, see <a
33*90c8c64dSAndroid Build Coastguard Worker    href="../../../guide/appendix/api-levels.html">API Levels</a> and the
34*90c8c64dSAndroid Build Coastguard Worker  documentation for the <a
35*90c8c64dSAndroid Build Coastguard Worker    href="../../../guide/topics/manifest/uses-sdk-element.html"><code>&lt;uses-sdk&gt;</code></a>
36*90c8c64dSAndroid Build Coastguard Worker  element.</li> </ul> <p>To control how Google Play filters your application
37*90c8c64dSAndroid Build Coastguard Workerfrom devices that do not support SIP, remember to add the following to the
38*90c8c64dSAndroid Build Coastguard Workerapplication's manifest <ul> <li><code>&lt;uses-feature
39*90c8c64dSAndroid Build Coastguard Worker    android:name="android.hardware.sip.voip" /&gt;</code>, which tells Google
40*90c8c64dSAndroid Build Coastguard Worker  Play that your application uses the SIP API. The declaration should include
41*90c8c64dSAndroid Build Coastguard Worker  an <code>android:required</code> attribute that indicates whether you want
42*90c8c64dSAndroid Build Coastguard Worker  Google Play to filter the application from devices that do not offer SIP
43*90c8c64dSAndroid Build Coastguard Worker  support. Other <code>&lt;uses-feature&gt;</code> declarations may also be
44*90c8c64dSAndroid Build Coastguard Worker  needed, depending on your implementation. For more information, see the
45*90c8c64dSAndroid Build Coastguard Worker  documentation for the <a
46*90c8c64dSAndroid Build Coastguard Worker    href="../../../guide/topics/manifest/uses-feature-element.html"><code>&lt;uses-feature&gt;</code></a>
47*90c8c64dSAndroid Build Coastguard Worker  element.</li> </ul>
48*90c8c64dSAndroid Build Coastguard Worker<p>For more information about using the SIP API, see the <a
49*90c8c64dSAndroid Build Coastguard Worker  href="../../../reference/android/net/sip/package-summary.html"><code>android.net.sip</a></code>
50*90c8c64dSAndroid Build Coastguard Workerdocumentation. </p>
51*90c8c64dSAndroid Build Coastguard Worker
52*90c8c64dSAndroid Build Coastguard Worker<img alt="" src="../images/SipDemo.png" />
53