@ -0,0 +1,13 @@
|
||||
job-windows:
|
||||
|
||||
stage: build
|
||||
tags: [ "windows" ]
|
||||
script:
|
||||
# Build VS project
|
||||
#Remove MinGW of MSYS from PATH and add MINGW_TYPE for MSYS2
|
||||
- echo %PATH%
|
||||
- cd uwp\cs
|
||||
- |
|
||||
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\msbuild.exe" -t:restore -verbosity:minimal
|
||||
- |
|
||||
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\msbuild.exe" TutorialsCS.sln /m /property:Configuration=Release /property:Platform=x64 -verbosity:quiet
|
@ -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,4 @@
|
||||
<Application
|
||||
x:Class="_00_HelloWorld.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" />
|
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 7.5 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 3.1 KiB |
@ -0,0 +1,10 @@
|
||||
<Page
|
||||
x:Class="_00_HelloWorld.MainPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
|
||||
<Grid>
|
||||
<TextBlock Text="{x:Bind HelloText}" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
</Grid>
|
||||
</Page>
|
@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<Package
|
||||
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
|
||||
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
|
||||
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
|
||||
xmlns:uap7="http://schemas.microsoft.com/appx/manifest/uap/windows10/7"
|
||||
xmlns:uap8="http://schemas.microsoft.com/appx/manifest/uap/windows10/8"
|
||||
IgnorableNamespaces="uap mp uap7 uap8">
|
||||
|
||||
<Identity
|
||||
Name="d6678921-9c3b-4627-987b-93115e4243a2"
|
||||
Publisher="CN=Anthony"
|
||||
Version="1.0.0.0" />
|
||||
|
||||
<mp:PhoneIdentity PhoneProductId="d6678921-9c3b-4627-987b-93115e4243a2" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
|
||||
|
||||
<Properties>
|
||||
<DisplayName>00_HelloWorld</DisplayName>
|
||||
<PublisherDisplayName>Anthony</PublisherDisplayName>
|
||||
<Logo>Assets\StoreLogo.png</Logo>
|
||||
</Properties>
|
||||
|
||||
<Dependencies>
|
||||
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
|
||||
</Dependencies>
|
||||
|
||||
<Resources>
|
||||
<Resource Language="x-generate"/>
|
||||
</Resources>
|
||||
|
||||
<Applications>
|
||||
<Application Id="App"
|
||||
Executable="$targetnametoken$.exe"
|
||||
EntryPoint="_00_HelloWorld.App">
|
||||
<uap:VisualElements
|
||||
DisplayName="00_HelloWorld"
|
||||
Square150x150Logo="Assets\Square150x150Logo.png"
|
||||
Square44x44Logo="Assets\Square44x44Logo.png"
|
||||
Description="00_HelloWorld"
|
||||
BackgroundColor="transparent">
|
||||
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"/>
|
||||
<uap:SplashScreen Image="Assets\SplashScreen.png" />
|
||||
</uap:VisualElements>
|
||||
<uap7:Properties>
|
||||
<uap8:ActiveCodePage>UTF-8</uap8:ActiveCodePage>
|
||||
</uap7:Properties>
|
||||
</Application>
|
||||
</Applications>
|
||||
|
||||
<Capabilities>
|
||||
<Capability Name="internetClient" />
|
||||
</Capabilities>
|
||||
</Package>
|
@ -0,0 +1,28 @@
|
||||
<!--
|
||||
This file contains Runtime Directives used by .NET Native. The defaults here are suitable for most
|
||||
developers. However, you can modify these parameters to modify the behavior of the .NET Native
|
||||
optimizer.
|
||||
|
||||
Runtime Directives are documented at https://go.microsoft.com/fwlink/?LinkID=391919
|
||||
|
||||
To fully enable reflection for App1.MyClass and all of its public/private members
|
||||
<Type Name="App1.MyClass" Dynamic="Required All" />
|
||||
|
||||
To enable dynamic creation of the specific instantiation of AppClass<T> over System.Int32
|
||||
<TypeInstantiation Name="App1.AppClass" Arguments="System.Int32" Activate="Required Public" />
|
||||
|
||||
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
|
||||
<Namespace Name="DataClasses.ViewModels" Serialize="All" />
|
||||
-->
|
||||
|
||||
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
|
||||
<Application>
|
||||
<!--
|
||||
An Assembly element with Name="*Application*" applies to all assemblies in
|
||||
the application package. The asterisks are not wildcards.
|
||||
-->
|
||||
<Assembly Name="*Application*" Dynamic="Required All" />
|
||||
|
||||
<!-- Add your application specific runtime directives here. -->
|
||||
</Application>
|
||||
</Directives>
|
@ -0,0 +1,21 @@
|
||||
Linphone X UWP tutorial 00_HelloWorld
|
||||
======================================
|
||||
|
||||
The first tutorial is just here to display a hello world app with the current Linphone's version number.
|
||||
|
||||
Don't forget to install those NuGet packages :
|
||||
- LinphoneSDK (can be found here : https://www.linphone.org/snapshots/windows/sdk/)
|
||||
- Microsoft.NETCore.UniversalWindowsPlatform (version 6.2.12 recommended)
|
||||
|
||||
Main files :
|
||||
```
|
||||
00_HelloWorld
|
||||
│ README.md : you are here
|
||||
│ App.xaml(.cs) : Default Windows Application file, nothing special here
|
||||
│ MainPage.xaml(.cs) : This is were the magic happen,
|
||||
│ jump into this file to learn about Linphone core creation and how to display a hello world.
|
||||
│
|
||||
└───Assets : default UWP app assets
|
||||
│ LockScreenLogo.scale-200.png
|
||||
│ ...
|
||||
```
|
@ -0,0 +1,4 @@
|
||||
<Application
|
||||
x:Class="_01_AccountLogin.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" />
|
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 7.5 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 3.1 KiB |
@ -0,0 +1,37 @@
|
||||
<Page
|
||||
x:Class="_01_AccountLogin.MainPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<Grid KeyUp="GridKeyUp">
|
||||
<StackPanel Grid.Row="0" VerticalAlignment="Center">
|
||||
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<TextBlock Text="Identity :" />
|
||||
<TextBox x:Name="Identity" Width="350" MinWidth="350" MaxWidth="350"></TextBox>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<TextBlock Text="Password :" />
|
||||
<PasswordBox x:Name="Password" Width="350" MinWidth="350" MaxWidth="350" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<RadioButton x:Name="TlsRadio" Margin="5" GroupName="TransportGroup" Content="TLS" IsChecked="True" />
|
||||
<RadioButton x:Name="TcpRadio" Margin="5" GroupName="TransportGroup" Content="TCP" />
|
||||
<RadioButton x:Name="UdpRadio" Margin="5" GroupName="TransportGroup" Content="UDP" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<Button x:Name="LogIn" Content="Login" Click="LogInClick" />
|
||||
<Button x:Name="LogOut" Content="Logout" Click="LogOutClick" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBlock x:Name="LoginText" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBlock x:Name="RegistrationText" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Page>
|
@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<Package
|
||||
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
|
||||
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
|
||||
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
|
||||
xmlns:uap7="http://schemas.microsoft.com/appx/manifest/uap/windows10/7"
|
||||
xmlns:uap8="http://schemas.microsoft.com/appx/manifest/uap/windows10/8"
|
||||
IgnorableNamespaces="uap mp uap7 uap8">
|
||||
|
||||
<Identity
|
||||
Name="d6678921-9c3b-4627-987b-93115e4243a2"
|
||||
Publisher="CN=Anthony"
|
||||
Version="1.0.0.0" />
|
||||
|
||||
<mp:PhoneIdentity PhoneProductId="d6678921-9c3b-4627-987b-93115e4243a2" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
|
||||
|
||||
<Properties>
|
||||
<DisplayName>01_AccountLogin</DisplayName>
|
||||
<PublisherDisplayName>Anthony</PublisherDisplayName>
|
||||
<Logo>Assets\StoreLogo.png</Logo>
|
||||
</Properties>
|
||||
|
||||
<Dependencies>
|
||||
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
|
||||
</Dependencies>
|
||||
|
||||
<Resources>
|
||||
<Resource Language="x-generate"/>
|
||||
</Resources>
|
||||
|
||||
<Applications>
|
||||
<Application Id="App"
|
||||
Executable="$targetnametoken$.exe"
|
||||
EntryPoint="_01_AccountLogin.App">
|
||||
<uap:VisualElements
|
||||
DisplayName="01_AccountLogin"
|
||||
Square150x150Logo="Assets\Square150x150Logo.png"
|
||||
Square44x44Logo="Assets\Square44x44Logo.png"
|
||||
Description="01_AccountLogin"
|
||||
BackgroundColor="transparent">
|
||||
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"/>
|
||||
<uap:SplashScreen Image="Assets\SplashScreen.png" />
|
||||
</uap:VisualElements>
|
||||
<uap7:Properties>
|
||||
<uap8:ActiveCodePage>UTF-8</uap8:ActiveCodePage>
|
||||
</uap7:Properties>
|
||||
</Application>
|
||||
</Applications>
|
||||
|
||||
<Capabilities>
|
||||
<Capability Name="internetClient" />
|
||||
</Capabilities>
|
||||
</Package>
|
@ -0,0 +1,28 @@
|
||||
<!--
|
||||
This file contains Runtime Directives used by .NET Native. The defaults here are suitable for most
|
||||
developers. However, you can modify these parameters to modify the behavior of the .NET Native
|
||||
optimizer.
|
||||
|
||||
Runtime Directives are documented at https://go.microsoft.com/fwlink/?LinkID=391919
|
||||
|
||||
To fully enable reflection for App1.MyClass and all of its public/private members
|
||||
<Type Name="App1.MyClass" Dynamic="Required All" />
|
||||
|
||||
To enable dynamic creation of the specific instantiation of AppClass<T> over System.Int32
|
||||
<TypeInstantiation Name="App1.AppClass" Arguments="System.Int32" Activate="Required Public" />
|
||||
|
||||
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
|
||||
<Namespace Name="DataClasses.ViewModels" Serialize="All" />
|
||||
-->
|
||||
|
||||
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
|
||||
<Application>
|
||||
<!--
|
||||
An Assembly element with Name="*Application*" applies to all assemblies in
|
||||
the application package. The asterisks are not wildcards.
|
||||
-->
|
||||
<Assembly Name="*Application*" Dynamic="Required All" />
|
||||
|
||||
<!-- Add your application specific runtime directives here. -->
|
||||
</Application>
|
||||
</Directives>
|
@ -0,0 +1,17 @@
|
||||
Linphone X UWP tutorial 01_AccountLogin
|
||||
================================
|
||||
|
||||
In this tutorial we present you the different steps to login and logout a SIP account.
|
||||
|
||||
To first register an account go here : https://www.linphone.org/freesip/home
|
||||
|
||||
Don't forget to install those NuGet packages :
|
||||
- LinphoneSDK (can be found here : https://www.linphone.org/snapshots/windows/sdk/)
|
||||
- Microsoft.NETCore.UniversalWindowsPlatform (version 6.2.12 recommended)
|
||||
|
||||
New/updated files to watch :
|
||||
```
|
||||
01_AccountLogin
|
||||
│ MainPage.xaml(.cs) : This time this page is a minimalist login page and it display your login status.
|
||||
│ Watch its code to understand how to login/out with LinphoneSDK.
|
||||
```
|
@ -0,0 +1,5 @@
|
||||
<Application
|
||||
x:Class="_02_IncomingCall.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
</Application>
|
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 7.5 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 3.1 KiB |
@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<Package
|
||||
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
|
||||
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
|
||||
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
|
||||
xmlns:uap7="http://schemas.microsoft.com/appx/manifest/uap/windows10/7"
|
||||
xmlns:uap8="http://schemas.microsoft.com/appx/manifest/uap/windows10/8"
|
||||
IgnorableNamespaces="uap mp uap7 uap8">
|
||||
|
||||
<Identity
|
||||
Name="754c9d43-0820-475a-b433-8a1be86b241c"
|
||||
Publisher="CN=Anthony"
|
||||
Version="1.0.0.0" />
|
||||
|
||||
<mp:PhoneIdentity PhoneProductId="754c9d43-0820-475a-b433-8a1be86b241c" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
|
||||
|
||||
<Properties>
|
||||
<DisplayName>02_IncomingCall</DisplayName>
|
||||
<PublisherDisplayName>Anthony</PublisherDisplayName>
|
||||
<Logo>Assets\StoreLogo.png</Logo>
|
||||
</Properties>
|
||||
|
||||
<Dependencies>
|
||||
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
|
||||
</Dependencies>
|
||||
|
||||
<Resources>
|
||||
<Resource Language="x-generate"/>
|
||||
</Resources>
|
||||
|
||||
<Applications>
|
||||
<Application Id="App"
|
||||
Executable="$targetnametoken$.exe"
|
||||
EntryPoint="_02_IncomingCall.App">
|
||||
<uap:VisualElements
|
||||
DisplayName="02_IncomingCall"
|
||||
Square150x150Logo="Assets\Square150x150Logo.png"
|
||||
Square44x44Logo="Assets\Square44x44Logo.png"
|
||||
Description="02_IncomingCall"
|
||||
BackgroundColor="transparent">
|
||||
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"/>
|
||||
<uap:SplashScreen Image="Assets\SplashScreen.png" />
|
||||
</uap:VisualElements>
|
||||
<uap7:Properties>
|
||||
<uap8:ActiveCodePage>UTF-8</uap8:ActiveCodePage>
|
||||
</uap7:Properties>
|
||||
</Application>
|
||||
</Applications>
|
||||
|
||||
<Capabilities>
|
||||
<Capability Name="internetClient" />
|
||||
<uap:Capability Name="voipCall"/>
|
||||
<Capability Name="codeGeneration"/>
|
||||
<uap:Capability Name="picturesLibrary"/>
|
||||
<uap:Capability Name="removableStorage"/>
|
||||
<DeviceCapability Name="microphone"/>
|
||||
</Capabilities>
|
||||
</Package>
|
@ -0,0 +1,28 @@
|
||||
<!--
|
||||
This file contains Runtime Directives used by .NET Native. The defaults here are suitable for most
|
||||
developers. However, you can modify these parameters to modify the behavior of the .NET Native
|
||||
optimizer.
|
||||
|
||||
Runtime Directives are documented at https://go.microsoft.com/fwlink/?LinkID=391919
|
||||
|
||||
To fully enable reflection for App1.MyClass and all of its public/private members
|
||||
<Type Name="App1.MyClass" Dynamic="Required All" />
|
||||
|
||||
To enable dynamic creation of the specific instantiation of AppClass<T> over System.Int32
|
||||
<TypeInstantiation Name="App1.AppClass" Arguments="System.Int32" Activate="Required Public" />
|
||||
|
||||
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
|
||||
<Namespace Name="DataClasses.ViewModels" Serialize="All" />
|
||||
-->
|
||||
|
||||
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
|
||||
<Application>
|
||||
<!--
|
||||
An Assembly element with Name="*Application*" applies to all assemblies in
|
||||
the application package. The asterisks are not wildcards.
|
||||
-->
|
||||
<Assembly Name="*Application*" Dynamic="Required All" />
|
||||
|
||||
<!-- Add your application specific runtime directives here. -->
|
||||
</Application>
|
||||
</Directives>
|
@ -0,0 +1,43 @@
|
||||
Linphone X UWP tutorial 02_IncomingCall
|
||||
========================================
|
||||
|
||||
This time we are going to receive our first calls !
|
||||
|
||||
Because the architecture of the first two tutorials were a bit too simple for a larger app we moved things a bit.
|
||||
All the code about the core (creation, iterate, log in...) is now in the class Service/CoreService.
|
||||
|
||||
The page LoginPage is updated and now redirects to a new page (NavigationRoot) this page only contains a NavigationView.
|
||||
If you are note familiar with NavigationView you can take a look at [the NavigationView doc](https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/navigationview),
|
||||
but this is not mandatory since it contains no Linphone code and is only here for navigation.
|
||||
|
||||
By default the NavigationView load the new page CallsPage (the only one for now), on this page you can answer or decline incoming calls.
|
||||
|
||||
If you don't have SIP friends to make tests we recommend you to install Linphone on your mobile device (Android or iOS) and to make calls to yourself.
|
||||
|
||||
Don't forget to install those NuGet packages :
|
||||
- LinphoneSDK (can be found here : https://www.linphone.org/snapshots/windows/sdk/)
|
||||
- Microsoft.NETCore.UniversalWindowsPlatform (version 6.2.12 recommended)
|
||||
|
||||
New/updated files :
|
||||
|
||||
```
|
||||
02_outgoing_call
|
||||
│
|
||||
│ Package.appxmanifest : For this step we added new capabilities : Microphone, VOIP calling
|
||||
│
|
||||
└───Service :
|
||||
│ │ CoreService.cs : A singleton service which contains the Linphone.Core.
|
||||
│ │ You can find here all the previous tutorial code and the new code
|
||||
│ │ for calls !
|
||||
│ │
|
||||
│
|
||||
│
|
||||
└───Views :
|
||||
│ │ CallsPage.xaml(.cs) : This is the new page where you can make calls.
|
||||
│ │ This is where you will find the new Linphone's uses.
|
||||
│ │
|
||||
│ │ LoginPage.xaml(.cs) : The same login page as the previous step, now in his own file.
|
||||
│ │
|
||||
│ │ NavigationRoot.xaml(.cs) : The new page containing the NavigationView and the main app Frame.
|
||||
│
|
||||
```
|
@ -0,0 +1,46 @@
|
||||
<Page
|
||||
x:Class="_02_IncomingCall.Views.CallsPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Border Grid.Row="0" Background="{ThemeResource SystemAccentColorLight3}" Padding="10">
|
||||
<TextBlock x:Name="HelloText" HorizontalAlignment="Center" VerticalAlignment="Center" Style="{ThemeResource HeaderTextBlockStyle}" Text="Hello " />
|
||||
</Border>
|
||||
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Grid.Row="0" VerticalAlignment="Center" Margin="20">
|
||||
|
||||
<TextBlock x:Name="CallText" Text="Your call state is : Idle" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10" />
|
||||
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10">
|
||||
<Button x:Name="HangOut" Content="Hang out" Click="HangOutClick" IsEnabled="False" />
|
||||
<Button x:Name="Sound" Content="Switch off Sound" Click="SoundClick" IsEnabled="False" />
|
||||
<Button x:Name="Mic" Content="Mute" Click="MicClick" IsEnabled="False" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Row="1" x:Name="IncomingCallStackPanel" Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed" Margin="10">
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<TextBlock Text="You have a call from :" />
|
||||
<TextBlock x:Name="IncommingCallText" Text="" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<Button x:Name="Answer" Content="Answer" Click="AnswerClick" />
|
||||
<Button x:Name="Decline" Content="Decline" Click="DeclineClick" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Page>
|
@ -0,0 +1,34 @@
|
||||
<Page
|
||||
x:Class="_02_IncomingCall.Views.LoginPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<Grid KeyUp="GridKeyUp">
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.15*" />
|
||||
<RowDefinition Height="0.85*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Border Grid.Row="0" Background="{ThemeResource SystemAccentColorLight3}">
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Style="{ThemeResource HeaderTextBlockStyle}" Text="Login Form" />
|
||||
</Border>
|
||||
|
||||
<StackPanel Grid.Row="1" VerticalAlignment="Center">
|
||||
|
||||
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Vertical">
|
||||
<TextBlock Text="Identity :" />
|
||||
<TextBox x:Name="Identity" Width="350" MinWidth="350" MaxWidth="350" Text="sip:" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Margin="0,10,0,0" HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Vertical">
|
||||
<TextBlock Text="Password :" />
|
||||
<PasswordBox x:Name="Password" Width="350" MinWidth="350" MaxWidth="350" PlaceholderText="myPasswd" />
|
||||
</StackPanel>
|
||||
|
||||
<Button x:Name="LogIn" Click="LogInClick" Content="Login" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,10,0,0" />
|
||||
|
||||
<TextBlock x:Name="RegistrationText" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,10,0,0" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Page>
|
@ -0,0 +1,32 @@
|
||||
<Page
|
||||
x:Class="_02_IncomingCall.Views.NavigationRoot"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Loaded="Page_Loaded">
|
||||
|
||||
<Grid x:Name="NavRootGrid" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
|
||||
<NavigationView
|
||||
x:Name="navview"
|
||||
AlwaysShowHeader="False"
|
||||
ItemInvoked="Navview_ItemInvoked"
|
||||
PaneDisplayMode="Top"
|
||||
IsBackButtonVisible="Collapsed">
|
||||
<NavigationView.MenuItems>
|
||||
<NavigationViewItem Content="Calls" IsSelected="True">
|
||||
<NavigationViewItem.Icon>
|
||||
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="" />
|
||||
</NavigationViewItem.Icon>
|
||||
</NavigationViewItem>
|
||||
</NavigationView.MenuItems>
|
||||
<NavigationView.PaneFooter>
|
||||
<NavigationViewItem Content="Sign out" Tapped="SignOut_Tapped">
|
||||
<NavigationViewItem.Icon>
|
||||
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="" />
|
||||
</NavigationViewItem.Icon>
|
||||
</NavigationViewItem>
|
||||
</NavigationView.PaneFooter>
|
||||
<Frame x:Name="AppNavFrame" Navigated="AppNavFrame_Navigated" />
|
||||
</NavigationView>
|
||||
</Grid>
|
||||
</Page>
|
@ -0,0 +1,5 @@
|
||||
<Application
|
||||
x:Class="_03_OutgoingCall.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
</Application>
|
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 7.5 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 3.1 KiB |
@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<Package
|
||||
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
|
||||
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
|
||||
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
|
||||
xmlns:uap7="http://schemas.microsoft.com/appx/manifest/uap/windows10/7"
|
||||
xmlns:uap8="http://schemas.microsoft.com/appx/manifest/uap/windows10/8"
|
||||
IgnorableNamespaces="uap mp uap7 uap8">
|
||||
|
||||
<Identity
|
||||
Name="754c9d43-0820-475a-b433-8a1be86b241c"
|
||||
Publisher="CN=Anthony"
|
||||
Version="1.0.0.0" />
|
||||
|
||||
<mp:PhoneIdentity PhoneProductId="754c9d43-0820-475a-b433-8a1be86b241c" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
|
||||
|
||||
<Properties>
|
||||
<DisplayName>03_OutgoingCall</DisplayName>
|
||||
<PublisherDisplayName>Anthony</PublisherDisplayName>
|
||||
<Logo>Assets\StoreLogo.png</Logo>
|
||||
</Properties>
|
||||
|
||||
<Dependencies>
|
||||
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
|
||||
</Dependencies>
|
||||
|
||||
<Resources>
|
||||
<Resource Language="x-generate"/>
|
||||
</Resources>
|
||||
|
||||
<Applications>
|
||||
<Application Id="App"
|
||||
Executable="$targetnametoken$.exe"
|
||||
EntryPoint="_03_OutgoingCall.App">
|
||||
<uap:VisualElements
|
||||
DisplayName="03_OutgoingCall"
|
||||
Square150x150Logo="Assets\Square150x150Logo.png"
|
||||
Square44x44Logo="Assets\Square44x44Logo.png"
|
||||
Description="03_OutgoingCall"
|
||||
BackgroundColor="transparent">
|
||||
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"/>
|
||||
<uap:SplashScreen Image="Assets\SplashScreen.png" />
|
||||
</uap:VisualElements>
|
||||
<uap7:Properties>
|
||||
<uap8:ActiveCodePage>UTF-8</uap8:ActiveCodePage>
|
||||
</uap7:Properties>
|
||||
</Application>
|
||||
</Applications>
|
||||
|
||||
<Capabilities>
|
||||
<Capability Name="internetClient" />
|
||||
<uap:Capability Name="voipCall"/>
|
||||
<Capability Name="codeGeneration"/>
|
||||
<uap:Capability Name="picturesLibrary"/>
|
||||
<uap:Capability Name="removableStorage"/>
|
||||
<DeviceCapability Name="microphone"/>
|
||||
<DeviceCapability Name="webcam"/>
|
||||
</Capabilities>
|
||||
</Package>
|
@ -0,0 +1,28 @@
|
||||
<!--
|
||||
This file contains Runtime Directives used by .NET Native. The defaults here are suitable for most
|
||||
developers. However, you can modify these parameters to modify the behavior of the .NET Native
|
||||
optimizer.
|
||||
|
||||
Runtime Directives are documented at https://go.microsoft.com/fwlink/?LinkID=391919
|
||||
|
||||
To fully enable reflection for App1.MyClass and all of its public/private members
|
||||
<Type Name="App1.MyClass" Dynamic="Required All" />
|
||||
|
||||
To enable dynamic creation of the specific instantiation of AppClass<T> over System.Int32
|
||||
<TypeInstantiation Name="App1.AppClass" Arguments="System.Int32" Activate="Required Public" />
|
||||
|
||||
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
|
||||
<Namespace Name="DataClasses.ViewModels" Serialize="All" />
|
||||
-->
|
||||
|
||||
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
|
||||
<Application>
|
||||
<!--
|
||||
An Assembly element with Name="*Application*" applies to all assemblies in
|
||||
the application package. The asterisks are not wildcards.
|
||||
-->
|
||||
<Assembly Name="*Application*" Dynamic="Required All" />
|
||||
|
||||
<!-- Add your application specific runtime directives here. -->
|
||||
</Application>
|
||||
</Directives>
|
@ -0,0 +1,23 @@
|
||||
Linphone X UWP tutorial 03_OutgoingCall
|
||||
========================================
|
||||
|
||||
This time we are going to make our first video calls.
|
||||
|
||||
New/updated files :
|
||||
|
||||
```
|
||||
03_OutgoingCall
|
||||
│ Package.appxmanifest : For this step we added a new capability : Webcam.
|
||||
│
|
||||
└───Service :
|
||||
│ │ CoreService.cs : A singleton service which contains the Linphone.Core.
|
||||
│ │ Now updated with the ability to make video calls.
|
||||
│ │
|
||||
│ │ VideoService.cs : A singleton service which contains the code to render the video call
|
||||
│ │ on SwapChainPanel, using OpenGL.
|
||||
│
|
||||
│
|
||||
└───Views :
|
||||
│ │ CallsPage.xaml(.cs) : This is the page where you can make calls.
|
||||
│ │ This is where you will find the new Linphone's uses.
|
||||
```
|
@ -0,0 +1,72 @@
|
||||
<Page
|
||||
x:Class="_03_OutgoingCall.Views.CallsPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Border Grid.Row="0" Background="{ThemeResource SystemAccentColorLight3}" Padding="10">
|
||||
<TextBlock x:Name="HelloText" HorizontalAlignment="Center" VerticalAlignment="Center" Style="{ThemeResource HeaderTextBlockStyle}" Text="Hello " />
|
||||
</Border>
|
||||
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Grid.Row="0" VerticalAlignment="Center" Margin="20">
|
||||
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<TextBlock Text="URI to call : " />
|
||||
<TextBox x:Name="UriToCall" Width="350" MinWidth="350" MaxWidth="350" Text="sip:" />
|
||||
</StackPanel>
|
||||
|
||||
<Button x:Name="CallButton" Content="Call" Click="CallClick" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="5" />
|
||||
|
||||
<TextBlock x:Name="CallText" Text="Your call state is : Idle" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10" />
|
||||
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10">
|
||||
<Button x:Name="HangOut" Content="Hang out" Click="HangOutClick" IsEnabled="False" />
|
||||
<Button x:Name="Sound" Content="Switch off Sound" Click="SoundClick" IsEnabled="False" />
|
||||
<Button x:Name="Camera" Content="Switch on Camera" Click="CameraClick" IsEnabled="False" />
|
||||
<Button x:Name="Mic" Content="Mute" Click="MicClick" IsEnabled="False" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<Grid Grid.Row="1" x:Name="VideoGrid" Canvas.ZIndex="-1" Background="Black" Visibility="Collapsed">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<SwapChainPanel x:Name="VideoSwapChainPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Grid.RowSpan="3" />
|
||||
|
||||
<SwapChainPanel x:Name="PreviewSwapChainPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="2" Grid.Row="0" Grid.RowSpan="3">
|
||||
</SwapChainPanel>
|
||||
</Grid>
|
||||
|
||||
<StackPanel Grid.Row="2" x:Name="IncomingCallStackPanel" Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed" Margin="10">
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<TextBlock Text="You have a call from :" />
|
||||
<TextBlock x:Name="IncommingCallText" Text="" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<Button x:Name="Answer" Content="Answer" Click="AnswerClick" />
|
||||
<Button x:Name="Decline" Content="Decline" Click="DeclineClick" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Page>
|
@ -0,0 +1,34 @@
|
||||
<Page
|
||||
x:Class="_03_OutgoingCall.Views.LoginPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<Grid KeyUp="GridKeyUp">
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.15*" />
|
||||
<RowDefinition Height="0.85*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Border Grid.Row="0" Background="{ThemeResource SystemAccentColorLight3}">
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Style="{ThemeResource HeaderTextBlockStyle}" Text="Login Form" />
|
||||
</Border>
|
||||
|
||||
<StackPanel Grid.Row="1" VerticalAlignment="Center">
|
||||
|
||||
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Vertical">
|
||||
<TextBlock Text="Identity :" />
|
||||
<TextBox x:Name="Identity" Width="350" MinWidth="350" MaxWidth="350" Text="sip:" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Margin="0,10,0,0" HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Vertical">
|
||||
<TextBlock Text="Password :" />
|
||||
<PasswordBox x:Name="Password" Width="350" MinWidth="350" MaxWidth="350" PlaceholderText="myPasswd" />
|
||||
</StackPanel>
|
||||
|
||||
<Button x:Name="LogIn" Click="LogInClick" Content="Login" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,10,0,0" />
|
||||
|
||||
<TextBlock x:Name="RegistrationText" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,10,0,0" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Page>
|
@ -0,0 +1,32 @@
|
||||
<Page
|
||||
x:Class="_03_OutgoingCall.Views.NavigationRoot"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Loaded="Page_Loaded">
|
||||
|
||||
<Grid x:Name="NavRootGrid" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
|
||||
<NavigationView
|
||||
x:Name="navview"
|
||||
AlwaysShowHeader="False"
|
||||
ItemInvoked="Navview_ItemInvoked"
|
||||
PaneDisplayMode="Top"
|
||||
IsBackButtonVisible="Collapsed">
|
||||
<NavigationView.MenuItems>
|
||||
<NavigationViewItem Content="Calls" IsSelected="True">
|
||||
<NavigationViewItem.Icon>
|
||||
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="" />
|
||||
</NavigationViewItem.Icon>
|
||||
</NavigationViewItem>
|
||||
</NavigationView.MenuItems>
|
||||
<NavigationView.PaneFooter>
|
||||
<NavigationViewItem Content="Sign out" Tapped="SignOut_Tapped">
|
||||
<NavigationViewItem.Icon>
|
||||
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="" />
|
||||
</NavigationViewItem.Icon>
|
||||
</NavigationViewItem>
|
||||
</NavigationView.PaneFooter>
|
||||
<Frame x:Name="AppNavFrame" Navigated="AppNavFrame_Navigated" />
|
||||
</NavigationView>
|
||||
</Grid>
|
||||
</Page>
|
@ -0,0 +1,4 @@
|
||||
<Application
|
||||
x:Class="_04_BasicChat.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" />
|
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 7.5 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 3.1 KiB |
@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<Package
|
||||
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
|
||||
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
|
||||
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
|
||||
xmlns:uap7="http://schemas.microsoft.com/appx/manifest/uap/windows10/7"
|
||||
xmlns:uap8="http://schemas.microsoft.com/appx/manifest/uap/windows10/8"
|
||||
IgnorableNamespaces="uap mp uap7 uap8">
|
||||
|
||||
<Identity
|
||||
Name="754c9d43-0820-475a-b433-8a1be86b241c"
|
||||
Publisher="CN=Anthony"
|
||||
Version="1.0.0.0" />
|
||||
|
||||
<mp:PhoneIdentity PhoneProductId="754c9d43-0820-475a-b433-8a1be86b241c" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
|
||||
|
||||
<Properties>
|
||||
<DisplayName>04_BasicChat</DisplayName>
|
||||
<PublisherDisplayName>Anthony</PublisherDisplayName>
|
||||
<Logo>Assets\StoreLogo.png</Logo>
|
||||
</Properties>
|
||||
|
||||
<Dependencies>
|
||||
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
|
||||
</Dependencies>
|
||||
|
||||
<Resources>
|
||||
<Resource Language="x-generate"/>
|
||||
</Resources>
|
||||
|
||||
<Applications>
|
||||
<Application Id="App"
|
||||
Executable="$targetnametoken$.exe"
|
||||
EntryPoint="_04_BasicChat.App">
|
||||
<uap:VisualElements
|
||||
DisplayName="04_BasicChat"
|
||||
Square150x150Logo="Assets\Square150x150Logo.png"
|
||||
Square44x44Logo="Assets\Square44x44Logo.png"
|
||||
Description="04_BasicChat"
|
||||
BackgroundColor="transparent">
|
||||
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"/>
|
||||
<uap:SplashScreen Image="Assets\SplashScreen.png" />
|
||||
</uap:VisualElements>
|
||||
<uap7:Properties>
|
||||
<uap8:ActiveCodePage>UTF-8</uap8:ActiveCodePage>
|
||||
</uap7:Properties>
|
||||
</Application>
|
||||
</Applications>
|
||||
|
||||
<Capabilities>
|
||||
<Capability Name="internetClient" />
|
||||
<uap:Capability Name="voipCall"/>
|
||||
<Capability Name="codeGeneration"/>
|
||||
<uap:Capability Name="picturesLibrary"/>
|
||||
<uap:Capability Name="removableStorage"/>
|
||||
<DeviceCapability Name="microphone"/>
|
||||
<DeviceCapability Name="webcam"/>
|
||||
</Capabilities>
|
||||
</Package>
|
@ -0,0 +1,28 @@
|
||||
<!--
|
||||
This file contains Runtime Directives used by .NET Native. The defaults here are suitable for most
|
||||
developers. However, you can modify these parameters to modify the behavior of the .NET Native
|
||||
optimizer.
|
||||
|
||||
Runtime Directives are documented at https://go.microsoft.com/fwlink/?LinkID=391919
|
||||
|
||||
To fully enable reflection for App1.MyClass and all of its public/private members
|
||||
<Type Name="App1.MyClass" Dynamic="Required All" />
|
||||
|
||||
To enable dynamic creation of the specific instantiation of AppClass<T> over System.Int32
|
||||
<TypeInstantiation Name="App1.AppClass" Arguments="System.Int32" Activate="Required Public" />
|
||||
|
||||
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
|
||||
<Namespace Name="DataClasses.ViewModels" Serialize="All" />
|
||||
-->
|
||||
|
||||
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
|
||||
<Application>
|
||||
<!--
|
||||
An Assembly element with Name="*Application*" applies to all assemblies in
|
||||
the application package. The asterisks are not wildcards.
|
||||
-->
|
||||
<Assembly Name="*Application*" Dynamic="Required All" />
|
||||
|
||||
<!-- Add your application specific runtime directives here. -->
|
||||
</Application>
|
||||
</Directives>
|
@ -0,0 +1,35 @@
|
||||
Linphone X UWP tutorial 04_BasicChat
|
||||
========================================
|
||||
|
||||
Second big step in this tutorial, we can now communicate in basic chat rooms.
|
||||
|
||||
In this part you are going to learn how to send and receive text messages over SIP using LinphoneSDK.
|
||||
For our first step with ChatRoom we are going to create only one to one basic ChatRoom (no encryption, no ephemeral),
|
||||
and for now the tutorial app will only support text message.
|
||||
|
||||
Don't forget to install those NuGet packages :
|
||||
- LinphoneSDK (can be found here : https://www.linphone.org/snapshots/windows/sdk/)
|
||||
- Microsoft.NETCore.UniversalWindowsPlatform (version 6.2.12 recommended)
|
||||
- ANGLE.WindowsStore (for video rendering, version 2.1.13 recommended)
|
||||
|
||||
New/Updated files :
|
||||
|
||||
```
|
||||
04_BasicChat
|
||||
└───Service :
|
||||
│ │ CoreService.cs : A singleton service which contains the Linphone.Core.
|
||||
│ │ We added some code to create new chat rooms here.
|
||||
│ │
|
||||
│ │ NavigationService.cs : A small service used to keeps reference to current pages displayed.
|
||||
│
|
||||
└───Views :
|
||||
│ │
|
||||
│ │ ChatPage.xaml(.cs) : This is the frame displayed when you select a chat room.
|
||||
│ │ For now it's a simple page where you can send message and see your
|
||||
│ │ conversation history.
|
||||
│ │
|
||||
│ │ ChatsPage.xaml(.cs) : In this page we list all the existing chat rooms. If you select
|
||||
│ │ one of them a ChatPage is render. You can also create new ChatRoom here.
|
||||
│ │
|
||||
│ │ NavigationRoot.xaml(.cs) : The navigation page, you can now navigate the ChatsPage !
|
||||
```
|
@ -0,0 +1,72 @@
|
||||
<Page
|
||||
x:Class="_04_BasicChat.Views.CallsPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Border Grid.Row="0" Background="{ThemeResource SystemAccentColorLight3}" Padding="10">
|
||||
<TextBlock x:Name="HelloText" HorizontalAlignment="Center" VerticalAlignment="Center" Style="{ThemeResource HeaderTextBlockStyle}" Text="Hello " />
|
||||
</Border>
|
||||
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Grid.Row="0" VerticalAlignment="Center" Margin="20">
|
||||
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<TextBlock Text="URI to call : " />
|
||||
<TextBox x:Name="UriToCall" Width="350" MinWidth="350" MaxWidth="350" Text="sip:" />
|
||||
</StackPanel>
|
||||
|
||||
<Button x:Name="CallButton" Content="Call" Click="CallClick" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="5" />
|
||||
|
||||
<TextBlock x:Name="CallText" Text="Your call state is : Idle" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10" />
|
||||
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10">
|
||||
<Button x:Name="HangOut" Content="Hang out" Click="HangOutClick" IsEnabled="False" />
|
||||
<Button x:Name="Sound" Content="Switch off Sound" Click="SoundClick" IsEnabled="False" />
|
||||
<Button x:Name="Camera" Content="Switch on Camera" Click="CameraClick" IsEnabled="False" />
|
||||
<Button x:Name="Mic" Content="Mute" Click="MicClick" IsEnabled="False" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<Grid Grid.Row="1" x:Name="VideoGrid" Canvas.ZIndex="-1" Background="Black" Visibility="Collapsed">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<SwapChainPanel x:Name="VideoSwapChainPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Grid.RowSpan="3" />
|
||||
|
||||
<SwapChainPanel x:Name="PreviewSwapChainPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="2" Grid.Row="0" Grid.RowSpan="3">
|
||||
</SwapChainPanel>
|
||||
</Grid>
|
||||
|
||||
<StackPanel Grid.Row="2" x:Name="IncomingCallStackPanel" Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed" Margin="10">
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<TextBlock Text="You have a call from :" />
|
||||
<TextBlock x:Name="IncommingCallText" Text="" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<Button x:Name="Answer" Content="Answer" Click="AnswerClick" />
|
||||
<Button x:Name="Decline" Content="Decline" Click="DeclineClick" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Page>
|
@ -0,0 +1,41 @@
|
||||
<Page
|
||||
x:Class="_04_BasicChat.Views.ChatPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.1*" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="0.75*" />
|
||||
<RowDefinition Height="0.15*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Grid.Row="0">
|
||||
<TextBlock x:Name="ChatHeaderText" Text="Your conversation with : " Style="{ThemeResource HeaderTextBlockStyle}" />
|
||||
</StackPanel>
|
||||
|
||||
<Grid Grid.Row="1" Padding="10,0,10,0">
|
||||
<TextBlock x:Name="PeerUsername" Text="Peer user-name : " />
|
||||
<TextBlock x:Name="YourUsername" Text="Your user-name : " HorizontalAlignment="Right" />
|
||||
</Grid>
|
||||
|
||||
<ScrollViewer Grid.Row="2" x:Name="MessagesScroll">
|
||||
<StackPanel Padding="10"
|
||||
x:Name="MessagesList"
|
||||
Orientation="Vertical"
|
||||
VerticalAlignment="Bottom">
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
|
||||
<Grid Grid.Row="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.80*" />
|
||||
<ColumnDefinition Width="0.20*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBox Grid.Column="0" x:Name="OutgoingMessageText" Text="" AcceptsReturn="True" TextWrapping="Wrap" />
|
||||
<Button Grid.Column="1" x:Name="OutgoingMessageButton" Click="OutgoingMessageButton_Click" Content="Send" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Page>
|