-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ronald Krueger
committed
Feb 14, 2013
1 parent
9cbd720
commit ffd18e9
Showing
386 changed files
with
14,398 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
Copyright © 2004-2012, Tivi LTD,www.tiviphone.com. All rights reserved. | ||
Copyright © 2012-2013, Silent Circle, LLC. All rights reserved. | ||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
* Any redistribution, use, or modification is done solely for personal | ||
benefit and not for any commercial purpose or for monetary gain | ||
* Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above copyright | ||
notice, this list of conditions and the following disclaimer in the | ||
documentation and/or other materials provided with the distribution. | ||
* Neither the name Silent Circle nor the | ||
names of its contributors may be used to endorse or promote products | ||
derived from this software without specific prior written permission. | ||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL SILENT CIRCLE, LLC BE LIABLE FOR ANY | ||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
--> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.silentcircle.silentphone" | ||
android:versionCode="20" | ||
android:versionName="1.2.2" > | ||
|
||
<uses-sdk | ||
android:minSdkVersion="10" | ||
android:targetSdkVersion="17" /> | ||
|
||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | ||
<uses-permission android:name="android.permission.INTERNET" /> | ||
<uses-permission android:name="android.permission.RECORD_AUDIO" /> | ||
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> | ||
<uses-permission android:name="android.permission.VIBRATE" /> | ||
<uses-permission android:name="android.permission.WAKE_LOCK" /> | ||
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" /> | ||
<uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS" /> | ||
<uses-permission android:name="android.permission.READ_CONTACTS" /> | ||
<uses-permission android:name="android.permission.WRITE_CONTACTS" /> | ||
<uses-permission android:name="android.permission.READ_PHONE_STATE" /> | ||
<uses-permission android:name="android.permission.CAMERA" /> | ||
<uses-permission android:name="android.permission.WRITE_CALL_LOG" /> | ||
<uses-permission android:name="android.permission.READ_CALL_LOG" /> | ||
<uses-permission android:name="android.permission.BLUETOOTH" /> | ||
|
||
|
||
|
||
<!-- <uses-permission android:name="android.permission.DEVICE_POWER" /> requires system app rights --> | ||
|
||
|
||
<!-- <uses-feature android:name="android.hardware.sip.voip" android:required="true" /> --> | ||
<uses-feature android:name="android.hardware.camera" android:required="false"/> | ||
<uses-feature | ||
android:name="android.hardware.camera.autofocus" | ||
android:required="false" /> | ||
<uses-feature | ||
android:name="android.hardware.telephony" | ||
android:required="false" /> | ||
<!-- android:hardwareAccelerated="true" --> | ||
<application | ||
android:icon="@drawable/sc_app_logo_57px" | ||
android:theme="@style/Theme" | ||
android:label="@string/app_name" > | ||
<service android:name="com.silentcircle.silentphone.TiviPhoneService" /> | ||
|
||
<receiver | ||
android:name="com.silentcircle.silentphone.receivers.OCT" | ||
android:enabled="true" > | ||
<intent-filter android:priority="100" > <!-- Higher number - higher prio: shall have better prio than system phone --> | ||
<action android:name="android.intent.action.NEW_OUTGOING_CALL" /> | ||
|
||
<category android:name="android.intent.category.DEFAULT" /> | ||
</intent-filter> | ||
</receiver> | ||
|
||
<activity | ||
android:name="com.silentcircle.silentphone.activities.TAdvCfg" | ||
android:label="@string/app_name" | ||
android:screenOrientation="portrait" /> | ||
<activity | ||
android:name="com.silentcircle.silentphone.activities.TMActivity" | ||
android:label="@string/app_name" | ||
android:launchMode="singleTop" | ||
android:screenOrientation="portrait" > | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
<activity | ||
android:name="com.silentcircle.silentphone.activities.TCallWindow" | ||
android:label="@string/app_name" | ||
android:screenOrientation="portrait" /> | ||
<activity | ||
android:name="com.silentcircle.silentphone.activities.CallManager" | ||
android:label="@string/app_name" | ||
android:launchMode="singleTop" | ||
android:screenOrientation="portrait" > | ||
<intent-filter android:label="@string/app_name" > | ||
<action android:name="com.silentcircle.silentphone.CALLMGR_START" /> | ||
|
||
<category android:name="android.intent.category.DEFAULT" /> | ||
|
||
<data android:mimeType="text/plain" /> | ||
</intent-filter> | ||
<intent-filter android:label="@string/app_name" > | ||
<action android:name="com.silentcircle.silentphone.CALLMGR_STOP" /> | ||
|
||
<category android:name="android.intent.category.DEFAULT" /> | ||
|
||
<data android:mimeType="text/plain" /> | ||
</intent-filter> | ||
</activity> | ||
<activity | ||
android:name="com.silentcircle.silentphone.activities.Provisioning" | ||
android:label="@string/app_name" | ||
android:windowSoftInputMode="adjustPan" | ||
android:screenOrientation="portrait" /> | ||
<activity | ||
android:name="com.silentcircle.silentphone.activities.KeyGeneration" | ||
android:label="@string/app_name" > | ||
</activity> | ||
</application> | ||
|
||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,139 @@ | ||
silent-phone-android | ||
==================== | ||
## How to compile and build SilentPhone | ||
|
||
SilentPhone consists of two major parts: the Android Java modules and their | ||
associated layout files, resources files, and generated source and resource | ||
files. The second part is C/C++ based the phone engine which includes the SIP, | ||
RTP, ZRTP, TLS, and codec handling among some other functions. The Java part | ||
uses standard JNI techniques to communicate with the C/C++ parts. | ||
|
||
|
||
### Prerequisites | ||
|
||
This short description assumes that you have a good understanding of the | ||
Android SDK, the Android NDK, and their build procedures. | ||
|
||
To compile and build SilentPhone you require a full Android development | ||
environment that includes the Android Java SDK and the Android NDK (Native | ||
Development Kit). Because SilentPhone shall support Android API 10 | ||
(Gingerbread 2.3.x) make sure you also download and install the necessary SDK | ||
modules. Furthermore I recommend to use the Eclipse Android SDK extensions. | ||
|
||
|
||
### Directory structure | ||
|
||
SilentPhone uses a set of sources that must be compiled and linked | ||
together. To simplify development we have set up a specific directory | ||
structure that contains the sources and build files. In the following figure | ||
_$SRC\_ROOT_ denotes the root directory of this specific directory layout. The | ||
figure does not show every directory, only the top level and relevant | ||
directories. | ||
|
||
$SRC_ROOT | ||
| | ||
|-- tivi # Root for SilentPhone, Tivi C/C++ sources | ||
| |-- libs | ||
| | |-- polarssl-1.1.1 # PolarSSL 1.1.1 sources | ||
| | `-- libzrtptivi-3.0.0 # ZRTP lib sources (see remark below) | ||
| |-- scandroid # SilentPhone Android main directory | ||
| | |-- assets | ||
| | |-- bin | ||
| | |-- gen | ||
| | |-- jni | ||
| | |-- libs | ||
| | |-- obj | ||
| | |-- res | ||
| | |-- src | ||
| |-- sources # Main directory for C/C++ sources | ||
| | |-- android | ||
| | |-- apple | ||
| | |-- audio | ||
| | |-- baseclasses | ||
| | |-- codecs | ||
| | |-- encrypt | ||
| | |-- gui | ||
| | |-- ios | ||
| | |-- os | ||
| | |-- rtp | ||
| | |-- sdp | ||
| | |-- sipparser | ||
| | |-- stun | ||
| | |-- tiviandroid | ||
| | |-- tiviengine | ||
| | |-- tools | ||
| | |-- uml | ||
| | |-- utils | ||
| | |-- video | ||
| | |-- winpc | ||
| | `-- xml | ||
| `-- tina | ||
`-- zrtpcpp # Development directory for ZRTP | ||
|-- bnlib | ||
|-- clients | ||
| |-- ccrtp | ||
| `-- tivi # Tivi (iOS, Android) extensions | ||
|-- cmake | ||
|-- common | ||
|-- cryptcommon | ||
|-- demo | ||
|-- doc | ||
|-- srtp | ||
`-- zrtp | ||
|
||
**NOTES:** | ||
|
||
- Depending on the development environment you may either use the | ||
`libs/libzrtptivi-3.0.0` directory or the main `zrtpcpp` directory. The `libs` | ||
subdirectory shall contain a stable version of the ZRTP/SRTP sources and the | ||
`zrtpcpp` directory may contain a development version. In any case the ZRTP | ||
directories must contain the non-public extensions for the Tivi client. | ||
- The directory name `scandroid` is not fixed and you may choose a different | ||
name. However, this directory shall be at this position in the directory | ||
structure. | ||
- The directory names _tivi_, _zrtpcpp_, and _libzrtptivi-3.0.0_ are not | ||
fixed. If you use different names you must adapt the names in the Android | ||
NDK build files. | ||
|
||
|
||
### Building the SilentPhone client from exising Git repository | ||
|
||
SilentPhone's Git repository contains all necessary shared libraries to build | ||
the required shared library and to install it. After cloning the repository | ||
you should perform a build for the shared libraries to make sure all libraries | ||
are installed in their correct places. | ||
|
||
After that step you can build SilentPhone. Either setup an Eclipse Android | ||
project or use the `ant` command line tools to generate the application | ||
package. | ||
|
||
**NOTE:** After the SilentPhone code basis becomes more stable we may put the | ||
libraries also into the Git repository. This saves the extra build step. | ||
|
||
|
||
### Building the shared libraries | ||
|
||
After you built the library once it's usually not necessary to re-build it, | ||
except you need to fix a problem inside the library code. | ||
|
||
The directory `scandroid/jni` contains the build files to compile and link the | ||
shared libraries for SilentPhone. Depending on your directory setup and naming | ||
you need to adapt some lines in `jni/Android.mk`. The build files assumes the | ||
shown directory structure. | ||
|
||
The `Android.mk` file contains two `ifeq` sections that show how to define the | ||
path names for different environments. Use this as a template to setup your | ||
own path names. | ||
|
||
If required you may also adapt the line that defines `ZRTP_SRC_PATH` to point | ||
to the correct ZRTP source directory. Some comments in `Android.mk` already | ||
show two different configurations. | ||
|
||
After you adapted the build files you may just run `ndk-build` from the | ||
command line. The NDK build script copies the shared libraries to their | ||
correct places inside the Android project. Now you can build the SilentPhone | ||
client with either the Eclipse Android extensions and with the `ant` command | ||
line tool. | ||
|
||
|
||
|
||
|
Oops, something went wrong.