From f004b5c107b7642b62f66df21cd344682bb6bbf8 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Wed, 8 Sep 2021 12:35:38 +0200 Subject: [PATCH] Added READMEs --- README | 0 README.md | 43 +++++++++++++++++++ android/README.md | 13 ++++++ android/kotlin/0-HelloWorld/README.md | 8 ++++ .../kotlin/1-AccountLogin/.idea/compiler.xml | 2 +- .../kotlin/1-AccountLogin/.idea/gradle.xml | 3 +- android/kotlin/1-AccountLogin/.idea/misc.xml | 9 +++- android/kotlin/1-AccountLogin/README.md | 10 +++++ android/kotlin/2-PushNotifications/README.md | 8 ++++ android/kotlin/3-IncomingCall/README.md | 10 +++++ android/kotlin/4-OutgoingCall/README.md | 6 +++ android/kotlin/5-BasicChat/README.md | 8 ++++ android/kotlin/6-AdvancedChat/README.md | 6 +++ 13 files changed, 122 insertions(+), 4 deletions(-) delete mode 100644 README create mode 100644 README.md create mode 100644 android/README.md create mode 100644 android/kotlin/0-HelloWorld/README.md create mode 100644 android/kotlin/1-AccountLogin/README.md create mode 100644 android/kotlin/2-PushNotifications/README.md create mode 100644 android/kotlin/3-IncomingCall/README.md create mode 100644 android/kotlin/4-OutgoingCall/README.md create mode 100644 android/kotlin/5-BasicChat/README.md create mode 100644 android/kotlin/6-AdvancedChat/README.md diff --git a/README b/README deleted file mode 100644 index e69de29..0000000 diff --git a/README.md b/README.md new file mode 100644 index 0000000..8ab5af7 --- /dev/null +++ b/README.md @@ -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. \ No newline at end of file diff --git a/android/README.md b/android/README.md new file mode 100644 index 0000000..4234e99 --- /dev/null +++ b/android/README.md @@ -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). \ No newline at end of file diff --git a/android/kotlin/0-HelloWorld/README.md b/android/kotlin/0-HelloWorld/README.md new file mode 100644 index 0000000..49ac25f --- /dev/null +++ b/android/kotlin/0-HelloWorld/README.md @@ -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. \ No newline at end of file diff --git a/android/kotlin/1-AccountLogin/.idea/compiler.xml b/android/kotlin/1-AccountLogin/.idea/compiler.xml index 61a9130..fb7f4a8 100644 --- a/android/kotlin/1-AccountLogin/.idea/compiler.xml +++ b/android/kotlin/1-AccountLogin/.idea/compiler.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/android/kotlin/1-AccountLogin/.idea/gradle.xml b/android/kotlin/1-AccountLogin/.idea/gradle.xml index cd8ea57..7ef35fd 100644 --- a/android/kotlin/1-AccountLogin/.idea/gradle.xml +++ b/android/kotlin/1-AccountLogin/.idea/gradle.xml @@ -4,7 +4,7 @@ diff --git a/android/kotlin/1-AccountLogin/.idea/misc.xml b/android/kotlin/1-AccountLogin/.idea/misc.xml index 19aa6a5..8c9291e 100644 --- a/android/kotlin/1-AccountLogin/.idea/misc.xml +++ b/android/kotlin/1-AccountLogin/.idea/misc.xml @@ -1,6 +1,13 @@ - + + + + diff --git a/android/kotlin/1-AccountLogin/README.md b/android/kotlin/1-AccountLogin/README.md new file mode 100644 index 0000000..c2fa48f --- /dev/null +++ b/android/kotlin/1-AccountLogin/README.md @@ -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. \ No newline at end of file diff --git a/android/kotlin/2-PushNotifications/README.md b/android/kotlin/2-PushNotifications/README.md new file mode 100644 index 0000000..1086bc7 --- /dev/null +++ b/android/kotlin/2-PushNotifications/README.md @@ -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. \ No newline at end of file diff --git a/android/kotlin/3-IncomingCall/README.md b/android/kotlin/3-IncomingCall/README.md new file mode 100644 index 0000000..3bf93b8 --- /dev/null +++ b/android/kotlin/3-IncomingCall/README.md @@ -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. \ No newline at end of file diff --git a/android/kotlin/4-OutgoingCall/README.md b/android/kotlin/4-OutgoingCall/README.md new file mode 100644 index 0000000..b294a0b --- /dev/null +++ b/android/kotlin/4-OutgoingCall/README.md @@ -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. \ No newline at end of file diff --git a/android/kotlin/5-BasicChat/README.md b/android/kotlin/5-BasicChat/README.md new file mode 100644 index 0000000..dda78b8 --- /dev/null +++ b/android/kotlin/5-BasicChat/README.md @@ -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). \ No newline at end of file diff --git a/android/kotlin/6-AdvancedChat/README.md b/android/kotlin/6-AdvancedChat/README.md new file mode 100644 index 0000000..b81396f --- /dev/null +++ b/android/kotlin/6-AdvancedChat/README.md @@ -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/). \ No newline at end of file