2019-01-25 10:46:02 +00:00
[](https://gitlab.linphone.org/BC/public/linphone-android/commits/feature/release-4.1)
2018-06-06 07:24:22 +00:00
2016-11-30 14:02:24 +00:00
Linphone is a free VoIP and video softphone based on the SIP protocol.
2018-11-16 10:18:12 +00:00
# What's new
2016-11-30 14:02:24 +00:00
2018-11-15 14:06:20 +00:00
Now the default way of building linphone-android is to download the AAR SDK in our maven repository.
2018-11-16 10:18:12 +00:00
Compared to previous versions, this project no longer uses submodules developper has to build in order to get a working app.
However, if you wish to use a locally compiled SDK see below how to proceed.
The repository structure has also been cleaned and updated, and changing the package name can now be done in a single step.
This allows developpers to keep a stable version as well as a developpment one on the same device easily.
2016-11-30 14:02:24 +00:00
2019-02-14 11:10:28 +00:00
# Building the app
If you have Android Studio, simply open the project, wait for the gradle synchronization and then build/install the app.
It will download the linphone library from our Maven repository so you don't have to build anything yourself.
If you don't have Android Studio, you can build and install the app using gradle directly:
```
./gradlew assemble
```
will compile the apk file (both debug and release, use assembleDebug or assembleRelease to only build one), and then
```
./gradlew installDebug
```
to install the generated apk in the previous step (use installRelease instead if you built a release package).
APK files are stored within ```app/build/outputs/apk/debug/``` and ```app/build/outputs/apk/release```.
2018-11-15 14:06:20 +00:00
## Building a local SDK
2016-11-30 14:02:24 +00:00
2018-11-16 09:57:01 +00:00
1. Clone the linphone-sdk repository from out gitlab:
2016-11-30 14:02:24 +00:00
```
2018-11-20 09:48:23 +00:00
git clone https://gitlab.linphone.org/BC/public/linphone-sdk.git --recursive
2016-11-30 14:02:24 +00:00
```
2018-11-15 14:06:20 +00:00
2. Follow the instructions in the linphone-sdk/README file to build the SDK.
2016-11-30 14:02:24 +00:00
2018-11-16 09:57:01 +00:00
3. Edit in the linphone-sdk-android folder of this project the symbolic link (debug or release) to the generated aar:
```
ln -s < path to linphone-sdk > /linphone-sdk/build/linphone-sdk/bin/outputs/aar/linphone-sdk-android-< debug or release > .aar linphone-sdk-android/linphone-sdk-android-< debug or release > .aar
```
4. Rebuild the app in Android Studio.
2016-11-30 14:02:24 +00:00
2018-11-26 13:13:07 +00:00
## Native debugging
1. Install LLDB from SDK Tools in Android-studio.
2. In Android-studio go to Run->Edit Configurations->Debugger.
3. Select 'Dual' or 'Native' and add the path to linphone-sdk libraries.
4. Open native file and put your breakpoint on it.
5. Debug app.
2018-11-15 14:06:20 +00:00
## Create an apk with a different package name
2016-11-30 14:02:24 +00:00
2018-11-15 14:06:20 +00:00
Before the 4.1 release, there were a lot of files to edit to change the package name.
Now, simply edit the app/build.gradle file and change the value returned by method ```getPackageName()```
The next build will automatically use this value everywhere thanks to ```manifestPlaceholders``` feature of gradle and Android.
2016-11-30 14:02:24 +00:00
2018-11-15 14:06:20 +00:00
You may have already noticed that the app installed by Android Studio has ```org.linphone.debug``` package name.
If you build the app as release, the package name will be ```org.linphone```.
2016-11-30 14:02:24 +00:00
2018-11-15 14:06:20 +00:00
## Firebase push notifications
2016-11-30 14:02:24 +00:00
2018-11-15 14:06:20 +00:00
Now that Google Cloud Messaging has been deprecated and will be completely removed on April 11th 2019, the only official way of using push notifications is through Firebase.
2018-11-15 14:10:00 +00:00
2018-11-15 14:06:20 +00:00
However to make Firebase push notifications work, the project needs to have a file named app/google-services.json that contains some confidential informations, so you won't find it (it has been added to the .gitignore file).
This means that if you compile this project, you won't have push notification feature working in the app!
2016-11-30 14:02:24 +00:00
2018-11-15 14:10:00 +00:00
To enable them, just add your own ```google-services.json``` in the app folder, edit the ```res/values/non_localizable_custom.xml``` file set your key in ```push_sender_id```. Also ensure ```push_type``` is set to ```firebase```.
2017-02-14 15:42:10 +00:00
2019-01-18 10:46:07 +00:00
## Translations
We use transifex so the community can translate the strings of the app in their own language.
Note for developpers: here's how to push and pull transifex files:
tx pull -af / tx push -s -f --no-interactive
2017-02-14 15:42:10 +00:00
# CONTRIBUTIONS
In order to submit a patch for inclusion in linphone's source code:
2018-11-15 14:06:20 +00:00
1. First make sure your patch applies to latest git sources before submitting: patches made to old versions can't and won't be merged.
2. Fill out and send us an email with the link of pullrequest and the [Contributor Agreement ](http://www.belledonne-communications.com/downloads/Belledonne_communications_CA.pdf ) for your patch to be included in the git tree.
2018-11-15 14:10:00 +00:00
2018-11-20 09:48:23 +00:00
The goal of this agreement to grant us peaceful exercise of our rights on the linphone source code, while not losing your rights on your contribution.