Added READMEs

merge-requests/10/head
Sylvain Berfini 3 years ago
parent 072de79c61
commit f004b5c107

@ -0,0 +1,43 @@
Linphone SDK tutorials
====================
This repository holds tutorials explaining how to set up [Linphone-SDK](https://gitlab.linphone.org/BC/public/linphone-sdk/)
in a Android / iOS / desktop projects and use it to implement some simple features.
## License
Copyright © Belledonne Communications
Tutorials are published under [GNU/GPLv3 license](https://www.gnu.org/licenses/gpl-3.0.en.html), for free (open source).
Please make sure that you understand and agree with the terms of this license before using it (see LICENSE.txt file for details).
## Android
Even though Linphone's APIs are available in Java, Android tutorials have been created in Kotlin as it is the current standard for Android apps.
Linphone-SDK will be downloaded automatically by gradle from our [Maven repository](https://linphone.org/maven_repository/org/linphone/linphone-sdk-android/).
## iOS
In the same way, iOS tutorials are written in Swift but the same can be achieved through Objective-C.
Linphone-SDK binaries are fetched from our [Cocoapods repository](https://gitlab.linphone.org/BC/public/podspec.git) for iOS.
## Desktop
Desktop tutorials are in C#, leveraging on our Nuget packaging.
## Additional resources
All tutorials require a SIP account to function, and if you don't have one you can create as many as you want and for free using our [free SIP service](https://subscribe.linphone.org/).
You can check our [website](https://linphone.org/) for news, supported RFCs, licensing services, etc...
Full API documentation is available for all of our supported languages:
* [C++](http://linphone.org/snapshots/docs/liblinphone/latest/c++)
* [C#](http://linphone.org/snapshots/docs/liblinphone/latest/cs)
* [Java](http://linphone.org/snapshots/docs/liblinphone/latest/java)
* [Swift](http://linphone.org/snapshots/docs/liblinphone/latest/swift)
* [C](http://linphone.org/snapshots/docs/liblinphone/latest/c)
Finally we also have a [wiki](https://wiki.linphone.org/xwiki/wiki/public/view/Main/) with articles on various subjects.

@ -0,0 +1,13 @@
Android tutorials
====================
Tutorials are written in Kotlin, but the same features can be achieved in Java.
Tutorials are numbered 0 to 6, and we recommend you to read them in that order as features from previous tutorials are used in the next ones, such as account login.
Each tutorial is a full project, so you can import it in Android Studio, build it and deploy it on a real device or an emulator.
Code is being kept as short and simple as possible, and comments explain how and why things are being done.
You can focus on the Activity and build.gradle files, the rest being projects / UI files.
Full Java API is available [here](http://linphone.org/snapshots/docs/liblinphone/latest/java).

@ -0,0 +1,8 @@
Hello World tutorial
====================
The purpose of this tutorial is to explain how to add our SDK as a dependency of an Android project and how to create the `Core` object that all our APIs depends on.
Start by taking a look at the `app/build.gradle` file to see how our Maven repository is being set up and how to add the gradle dependency on our SDK.
The user interface will only display the `Core`'s version, but in the next tutorial you will learn how to use it to login your SIP account.

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="1.8" />
<bytecodeTargetLevel target="11" />
</component>
</project>

@ -4,7 +4,7 @@
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="PLATFORM" />
<option name="testRunner" value="GRADLE" />
<option name="disableWrapperSourceDistributionNotification" value="true" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
@ -16,7 +16,6 @@
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
<option name="useQualifiedModuleNames" value="true" />
</GradleProjectSettings>
</option>
</component>

@ -1,6 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="JDK" project-jdk-type="JavaSDK">
<component name="DesignSurface">
<option name="filePathToZoomLevelMap">
<map>
<entry key="app/src/main/res/layout/account_login_activity.xml" value="0.3223958333333333" />
</map>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="JDK" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">

@ -0,0 +1,10 @@
Account login tutorial
====================
Now that you have set up Linphone-SDK in an Android project, let's start using it.
We will see how to login on a SIP server using the `Core` object instanciated in the previous tutorial.
If you don't have a SIP server yet, you can create an account for free using our [free SIP service](https://subscribe.linphone.org/).
Once you'll be logged-in, you'll be able to continue to the next tutorials to make calls and send messages.

@ -0,0 +1,8 @@
Push notifications tutorial
====================
On mobile devices (Android & iOS), you probably want your app to be reachable even if it's not in the foreground.
To do that you need it to be able to receive push notifications from your SIP proxy, and in this tutorial, using [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging), you'll learn how to simply send the device push information to your server.
Compared to the previous tutorials, some changes are required in `app/build.gradle` and `AndroidManifest.xml` files, and you'll need to replace the `app/google-services.json` file by yours if you're not using a `sip.linphone.org` account.

@ -0,0 +1,10 @@
Incoming call tutorial
====================
This tutorial will focus on how the app will be notified when a call is being received and how to either accept it or terminate it.
We'll also cover how to toggle the microphone and the speakerphone during an active call.
If you want to test it on either a device or an emulator, you'll need another SIP client to make the call. If you don't, you can use the [outgoing call tutorial](https://gitlab.linphone.org/BC/public/tutorials/-/tree/master/android/kotlin/4-OutgoingCall) to do it.
Note that once again changes to `app/build.gradle` and `AndroidManifest.xml` files were made to enable some features in our SDK.

@ -0,0 +1,6 @@
Outgoing call tutorial
====================
In the previous tutorial we saw how to handle an incoming call, now let's start one.
We'll also see how to enable video during a call, switch between the front and back cameras if available and display our own preview.

@ -0,0 +1,8 @@
Basic chat tutorial
====================
This tutorial will demonstrate how to send and display a simple SIP message containing either text or an image (but it works the same for any kind of file).
Note that for file transfer, a file transfer server is required. In this tutorial we'll use the one at `https://www.linphone.org:444/lft.php` that we use in our own linphone-android and linphone-iphone apps, but you can get it's [source code](https://gitlab.linphone.org/BC/public/flexisip-http-file-transfer-server) and deploy your own.
Messages sent in this tutorial are standard SIP messages, so no matter the SIP proxy server you are using it should work, unlike the next [advanced chat tutorial](https://gitlab.linphone.org/BC/public/tutorials/-/tree/master/android/kotlin/6-AdvancedChat).

@ -0,0 +1,6 @@
Advanced chat tutorial
====================
This tutorial will demonstrate how to leverage on our own SIP server named [Flexisip](https://gitlab.linphone.org/BC/public/flexisip) and it's conference server to create group chats, use end-to-end encryption and send ephemeral messages.
If you don't have deployed a flexisip server yet, you can create & use a free SIP account using our [free SIP service](https://subscribe.linphone.org/).
Loading…
Cancel
Save