Alexander Lucas | a025796 | 2010-11-02 21:50:45 -0700 | [diff] [blame] | 1 | <p>This is a demo application highlighting how to make internet-based calls with |
| 2 | the SIP API. The application uses a walkie-talkie style interface, allowing you |
| 3 | to 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 |
| 6 | with SIP: Make a call, receive a call, and signal to the Android platform that |
| 7 | your app wants to receive incoming SIP calls, so that they can be handled from |
| 8 | within 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 | — a <code>PreferenceActivity</code> that supplies basic settings for SIP |
| 15 | authentication.</li> <li><a |
Scott Main | 9efea49 | 2010-12-08 09:26:56 -0800 | [diff] [blame] | 16 | href="src/com/example/android/sip/IncomingCallReceiver.html"><code> |
Alexander Lucas | a025796 | 2010-11-02 21:50:45 -0700 | [diff] [blame] | 17 | IncomingCallReceiver</code></a> — 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 | — 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 |
| 25 | feature is supported only on Android 2.3 (API level 9) and higher versions of |
| 26 | the platform. Also, among devices running Android 2.3 (API level 9) or higher, |
| 27 | not all devices will offer SIP support. To ensure that your application can only |
| 28 | be installed on devices that are capable of supporting SIP, remember to add the |
Dirk Dougherty | 9ba4ba7 | 2012-02-13 20:44:55 -0800 | [diff] [blame] | 29 | following to the application's manifest before publishing to Google Play:</p> |
Alexander Lucas | a025796 | 2010-11-02 21:50:45 -0700 | [diff] [blame] | 30 | <ul> <li><code><uses-sdk android:minSdkVersion="9" /></code>, which |
Dirk Dougherty | 9ba4ba7 | 2012-02-13 20:44:55 -0800 | [diff] [blame] | 31 | indicates to Google Play and the platform that your application requires |
Alexander Lucas | a025796 | 2010-11-02 21:50:45 -0700 | [diff] [blame] | 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><uses-sdk></code></a> |
Dirk Dougherty | 9ba4ba7 | 2012-02-13 20:44:55 -0800 | [diff] [blame] | 36 | element.</li> </ul> <p>To control how Google Play filters your application |
Alexander Lucas | a025796 | 2010-11-02 21:50:45 -0700 | [diff] [blame] | 37 | from devices that do not support SIP, remember to add the following to the |
| 38 | application's manifest <ul> <li><code><uses-feature |
Dirk Dougherty | 9ba4ba7 | 2012-02-13 20:44:55 -0800 | [diff] [blame] | 39 | android:name="android.hardware.sip.voip" /></code>, which tells Google |
| 40 | Play that your application uses the SIP API. The declaration should include |
Alexander Lucas | a025796 | 2010-11-02 21:50:45 -0700 | [diff] [blame] | 41 | an <code>android:required</code> attribute that indicates whether you want |
Dirk Dougherty | 9ba4ba7 | 2012-02-13 20:44:55 -0800 | [diff] [blame] | 42 | Google Play to filter the application from devices that do not offer SIP |
Alexander Lucas | a025796 | 2010-11-02 21:50:45 -0700 | [diff] [blame] | 43 | support. Other <code><uses-feature></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><uses-feature></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> |
| 50 | documentation. </p> |
| 51 | |
| 52 | <img alt="" src="../images/SipDemo.png" /> |