Commit 83f224a8 authored by Margaux Clerc's avatar Margaux Clerc

Fix clal ui paused by remote

parent 53f19d55
......@@ -41,17 +41,8 @@ namespace Linphone
public App()
{
this.InitializeComponent();
SettingsManager.InstallConfigFile();
//SettingsManager.InstallConfigFile();
this.Suspending += OnSuspending;
this.Resuming += App_Resuming;
}
private void App_Resuming(object sender, object e)
{
if (rootFrame.BackStack.Count > 0)
{
rootFrame.BackStack.Clear();
}
}
private void Back_requested(object sender, BackRequestedEventArgs e)
......
......@@ -21,14 +21,8 @@
x:Uid="AddressHint"
VerticalAlignment="Center"
AcceptsReturn="False"
InputScope="EmailSmtpAddress"
TextChanged="address_TextChanged">
<TextBox.InputScope>
<InputScope>
<InputScope.Names>
<InputScopeName NameValue="EmailNameOrAddress" />
</InputScope.Names>
</InputScope>
</TextBox.InputScope>
</TextBox>
<Button
......
......@@ -13,6 +13,7 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
using Linphone.Model;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media.Imaging;
......@@ -37,6 +38,8 @@ namespace Linphone.Controls
public TextBoxChatBubble()
{
InitializeComponent();
SendMessage.IsEnabled = true;
Message.Text = "./flexisip_pusher --pntype wp --appid db5.notify.windows.com --key XUKRFi6vmn0hhuESdAAvx5i --sid ms-app://s-1-15-2-1651060753-3098445494-746237450-1823971881-1920600302-2358223438-102324794 --pntok " + LinphoneManager.Instance.Core.DefaultProxyConfig.ContactUriParameters;
}
public void Reset()
......
......@@ -28,6 +28,7 @@ using Windows.System.Profile;
using Windows.Networking.PushNotifications;
using Windows.ApplicationModel.Calls;
using LinphoneTasks;
using Windows.Networking.Connectivity;
namespace Linphone.Model
{
......@@ -80,9 +81,12 @@ namespace Linphone.Model
public async void InitPushNotifications()
{
channel = await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync();
AddPushInformationsToContactParams();
var internetProfile = NetworkInformation.GetInternetConnectionProfile();
if (internetProfile != null)
{
channel = await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync();
AddPushInformationsToContactParams();
}
}
public String GetChatDatabasePath()
{
......@@ -127,18 +131,14 @@ namespace Linphone.Model
}
LinphoneManager.Instance.Core.SetUserAgent("LinphoneW10", Core.Version);
InitPushNotifications();
//server.LinphoneCore.NetworkReachable = lastNetworkState;
// DeviceNetworkInformation.NetworkAvailabilityChanged += new EventHandler<NetworkNotificationEventArgs>(OnNetworkStatusChanged);
// ConfigureTunnel();
isLinphoneRunning = true;
LinphoneManager.Instance.Core.IsIterateEnabled = true;
}
public void AddPushInformationsToContactParams()
{
if (Core.DefaultProxyConfig != null)
if (Core.DefaultProxyConfig != null && channel != null)
{
Uri pushUri = new Uri(channel.Uri);
string host = null, token = null;
......
......@@ -64,13 +64,16 @@ namespace Linphone.Model
/// <summary>
/// Install the default config file from the package to the Isolated Storage
/// </summary>
public static async void InstallConfigFile()
public static void InstallConfigFile()
{
FileInfo fInfo = new FileInfo(LinphoneManager.Instance.GetConfigPath());
if (!fInfo.Exists)
{
fInfo = new FileInfo(LinphoneManager.Instance.GetDefaultConfigPath());
fInfo.MoveTo(LinphoneManager.Instance.GetConfigPath());
if(fInfo.Exists)
{
fInfo.MoveTo(LinphoneManager.Instance.GetConfigPath());
}
}
}
......@@ -418,7 +421,16 @@ namespace Linphone.Model
if ((proxy == null) || (proxy.Length <= 0))
{
proxy = "sip:" + domain;
} else
{
if (!proxy.StartsWith("sip:") && !proxy.StartsWith("<sip:")
&& !proxy.StartsWith("sips:") && !proxy.StartsWith("<sips:"))
{
proxy = "sip:" + proxy;
}
}
cfg.ServerAddr = proxy;
if (transport != null)
......
<?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" IgnorableNamespaces="uap mp">
<Identity Name="BelledonneCommunications.Linphone" Publisher="CN=belledonne communications, O=belledonne communications, L=Grenoble, C=FR" Version="1.0.0.0" />
<Identity Name="BelledonneCommunications.Linphone" Publisher="CN=2D80E0B6-DE43-45FF-97F7-D17E115F1D12" Version="1.1.0.0" />
<mp:PhoneIdentity PhoneProductId="ed47fa26-a45b-4bda-82e1-cdc792d1d9bd" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>Linphone</DisplayName>
......
......@@ -24,6 +24,7 @@
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Image Source="/Assets/avatar2.png"
......@@ -55,6 +56,15 @@
HorizontalAlignment="Center"
Margin="12,0,12,0"
FontSize="20" />
<FontIcon
Grid.Row="4"
Margin="12"
x:Name="statusIcon"
Visibility="Collapsed"
FontFamily="Segoe MDL2 Assets"
Glyph="&#xE768;"
RenderTransformOrigin="0.5,0.5"/>
</Grid>
<controls:CallControlsP
......
......@@ -191,9 +191,12 @@ namespace Linphone.Views
oneSecondTimer.Interval = TimeSpan.FromSeconds(1);
oneSecondTimer.Tick += timerTick;
oneSecondTimer.Start();
statusIcon.Visibility = Visibility.Visible;
}
if (state == CallState.StreamsRunning)
{
statusIcon.Glyph = "\uE768";
if (!call.MediaInProgress)
{
buttons.enabledPause(true);
......@@ -202,7 +205,6 @@ namespace Linphone.Views
buttons.enabledVideo(true);
}
}
Debug.WriteLine(call.CurrentParams.IsVideoEnabled);
if (call.CurrentParams.IsVideoEnabled)
{
displayVideo(true);
......@@ -220,6 +222,7 @@ namespace Linphone.Views
displayVideo(false);
}
buttons.enabledVideo(false);
statusIcon.Glyph = "\uE769";
}
else if (state == CallState.Paused)
{
......@@ -228,10 +231,14 @@ namespace Linphone.Views
displayVideo(false);
}
buttons.enabledVideo(false);
statusIcon.Glyph = "\uE769";
}
else if (state == CallState.Error || state == CallState.End)
{
oneSecondTimer.Stop();
if(oneSecondTimer != null)
{
oneSecondTimer.Stop();
}
}
else if (state == CallState.UpdatedByRemote)
{
......
......@@ -19,30 +19,25 @@
<TextBlock x:Uid="SettingsMenu" Text="SETTINGS" Style="{StaticResource HeaderTextStyle}"/>
</StackPanel>
<!--ContentPanel - place additional content here-->
<ScrollViewer x:Name="ContentPanel" Grid.Row="1">
<Grid Margin="12,0,12,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<StackPanel Orientation="Vertical" Tapped="account_Click_1" Margin="0,12,0,0">
<TextBlock
HorizontalAlignment="Left"
Style="{StaticResource ListItemHeaderStyle}"
x:Uid="AccountMenu"/>
<TextBlock
HorizontalAlignment="Left"
Style="{StaticResource ListItemStyle}"
x:Uid="AccountMenuSubtitle"/>
</StackPanel>
<ListView Grid.Row="1">
<ListViewItem Tapped="account_Click_1" >
<StackPanel Orientation="Vertical" Margin="0,12,0,0">
<TextBlock
HorizontalAlignment="Left"
Style="{StaticResource ListItemHeaderStyle}"
x:Uid="AccountMenu"/>
<StackPanel Grid.Row="1" Orientation="Vertical" Tapped="audio_Click_1" Margin="0,12,0,0">
<TextBlock
HorizontalAlignment="Left"
Style="{StaticResource ListItemStyle}"
x:Uid="AccountMenuSubtitle"/>
</StackPanel>
</ListViewItem>
<ListViewItem Tapped="audio_Click_1" >
<StackPanel Orientation="Vertical" Margin="0,12,0,0">
<TextBlock
HorizontalAlignment="Left"
Style="{ThemeResource ListItemHeaderStyle}"
......@@ -53,20 +48,24 @@
Style="{ThemeResource ListItemStyle}"
x:Uid="AudioSettingsMenuSubtitle"/>
</StackPanel>
</ListViewItem>
<StackPanel Grid.Row="2" x:Name="Video" Orientation="Vertical" Tapped="video_Click_1" Margin="0,12,0,0">
<TextBlock
<ListViewItem Tapped="video_Click_1" >
<StackPanel Orientation="Vertical" Margin="0,12,0,0">
<TextBlock
Style="{ThemeResource ListItemHeaderStyle}"
HorizontalAlignment="Left"
x:Uid="VideoSettingsMenu"/>
<TextBlock
<TextBlock
Style="{ThemeResource ListItemStyle}"
HorizontalAlignment="Left"
x:Uid="VideoSettingsMenuSubtitle"/>
</StackPanel>
</StackPanel>
</ListViewItem>
<StackPanel Grid.Row="3" Orientation="Vertical" Tapped="advanced_Click_1" Margin="0,12,0,0">
<ListViewItem Tapped="advanced_Click_1" >
<StackPanel Orientation="Vertical" Margin="0,12,0,0">
<TextBlock
HorizontalAlignment="Left"
Style="{ThemeResource ListItemHeaderStyle}"
......@@ -77,8 +76,10 @@
Style="{ThemeResource ListItemStyle}"
x:Uid="AdvancedSettingsMenuSubtitle"/>
</StackPanel>
</ListViewItem>
<StackPanel Visibility="Collapsed" Grid.Row="4" Orientation="Vertical" Tapped="LockScreenSettings_Click_1" Margin="0,12,0,0">
<ListViewItem Tapped="LockScreenSettings_Click_1" Visibility="Collapsed">
<StackPanel Orientation="Vertical" Margin="0,12,0,0">
<TextBlock
Style="{ThemeResource ListItemHeaderStyle}"
HorizontalAlignment="Left"
......@@ -89,7 +90,7 @@
HorizontalAlignment="Left"
x:Uid="LockScreenSettingsSubtitle"/>
</StackPanel>
</Grid>
</ScrollViewer>
</ListViewItem>
</ListView>
</Grid>
</Page>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment