Latest update may be null.
This commit is contained in:
@ -27,7 +27,7 @@ namespace Yavsc.Models.Identity
|
|||||||
string Model { get; set; }
|
string Model { get; set; }
|
||||||
string Platform { get; set; }
|
string Platform { get; set; }
|
||||||
string Version { get; set; }
|
string Version { get; set; }
|
||||||
DateTime LatestActivityUpdate { get; set; }
|
DateTime? LatestActivityUpdate { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IGoogleCloudMobileDeclaration: IGCMDeclaration
|
public interface IGoogleCloudMobileDeclaration: IGCMDeclaration
|
||||||
|
@ -280,38 +280,6 @@ namespace ZicMoove.Droid
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void UploadJson(string data)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
string url = "http://lua.pschneider.fr/api/BackOffice/SetRegistrationId";
|
|
||||||
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
|
|
||||||
request.Method = "POST";
|
|
||||||
//using GET - request.Headers.Add ("Authorization","Authorizaation value");
|
|
||||||
request.ContentType = "application/json";
|
|
||||||
HttpWebResponse myResp = (HttpWebResponse)request.GetResponse();
|
|
||||||
string responseText;
|
|
||||||
|
|
||||||
using (var response = request.GetResponse())
|
|
||||||
{
|
|
||||||
using (var reader = new StreamReader(response.GetResponseStream()))
|
|
||||||
{
|
|
||||||
responseText = reader.ReadToEnd();
|
|
||||||
Log.Debug(Constants.ApplicationName, responseText);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
catch (WebException exception)
|
|
||||||
{
|
|
||||||
string responseText;
|
|
||||||
using (var reader = new StreamReader(exception.Response.GetResponseStream()))
|
|
||||||
{
|
|
||||||
responseText = reader.ReadToEnd();
|
|
||||||
Log.Debug("ZicMoove", responseText);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<IEnumerable<Account>> GetAndroidAccounts()
|
public async Task<IEnumerable<Account>> GetAndroidAccounts()
|
||||||
{
|
{
|
||||||
|
@ -550,9 +550,11 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Error Condition="!Exists('..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets'))" />
|
<Error Condition="!Exists('..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets'))" />
|
||||||
<Error Condition="!Exists('..\..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets'))" />
|
<Error Condition="!Exists('..\..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets'))" />
|
||||||
|
<Error Condition="!Exists('..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" />
|
||||||
</Target>
|
</Target>
|
||||||
<Import Project="..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets" Condition="Exists('..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets')" />
|
<Import Project="..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets" Condition="Exists('..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets')" />
|
||||||
<Import Project="..\..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets" Condition="Exists('..\..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" />
|
<Import Project="..\..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets" Condition="Exists('..\..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" />
|
||||||
|
<Import Project="..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
<packages>
|
<packages>
|
||||||
<package id="ExifLib.PCL" version="1.0.1" targetFramework="monoandroid70" />
|
<package id="ExifLib.PCL" version="1.0.1" targetFramework="monoandroid70" />
|
||||||
<package id="MarkdownDeep-av.NET" version="1.5.2" targetFramework="monoandroid60" />
|
<package id="MarkdownDeep-av.NET" version="1.5.2" targetFramework="monoandroid60" />
|
||||||
|
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="monoandroid70" />
|
||||||
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="monoandroid60" />
|
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="monoandroid60" />
|
||||||
<package id="Plugin.CurrentActivity" version="1.0.1" targetFramework="monoandroid70" />
|
<package id="Plugin.CurrentActivity" version="1.0.1" targetFramework="monoandroid70" />
|
||||||
<package id="Plugin.Permissions" version="1.1.7" targetFramework="monoandroid70" />
|
<package id="Plugin.Permissions" version="1.1.7" targetFramework="monoandroid70" />
|
||||||
|
@ -454,6 +454,11 @@ namespace ZicMoove
|
|||||||
public static IGCMDeclaration GetDeviceInfo()
|
public static IGCMDeclaration GetDeviceInfo()
|
||||||
{
|
{
|
||||||
var devinfo = CrossDeviceInfo.Current;
|
var devinfo = CrossDeviceInfo.Current;
|
||||||
|
DateTime? lupdate = DataManager.Instance.Activities.Count > 0 ?
|
||||||
|
DataManager.Instance.Activities.Aggregate(
|
||||||
|
(a, b) => a.DateModified > b.DateModified ? a : b
|
||||||
|
).DateModified : (DateTime ?) null;
|
||||||
|
|
||||||
return new GCMRegIdDeclaration
|
return new GCMRegIdDeclaration
|
||||||
{
|
{
|
||||||
DeviceId = devinfo.Id,
|
DeviceId = devinfo.Id,
|
||||||
@ -461,9 +466,7 @@ namespace ZicMoove
|
|||||||
Model = devinfo.Model,
|
Model = devinfo.Model,
|
||||||
Platform = devinfo.Platform.ToString(),
|
Platform = devinfo.Platform.ToString(),
|
||||||
Version = devinfo.Version,
|
Version = devinfo.Version,
|
||||||
LatestActivityUpdate = DataManager.Instance.Activities.Aggregate(
|
LatestActivityUpdate = lupdate
|
||||||
(a,b)=> a.DateModified > b.DateModified ? a : b
|
|
||||||
).DateModified
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,8 +11,6 @@ namespace ZicMoove.Interfaces
|
|||||||
|
|
||||||
// TODO Better
|
// TODO Better
|
||||||
string GCMStatusMessage { get; }
|
string GCMStatusMessage { get; }
|
||||||
|
|
||||||
bool EnablePushNotifications (bool enable);
|
|
||||||
|
|
||||||
void AddAccount();
|
void AddAccount();
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ namespace ZicMoove.Model.Auth
|
|||||||
public string GCMRegistrationId
|
public string GCMRegistrationId
|
||||||
{ get; set; }
|
{ get; set; }
|
||||||
|
|
||||||
public DateTime LatestActivityUpdate
|
public DateTime? LatestActivityUpdate
|
||||||
{ get; set; }
|
{ get; set; }
|
||||||
|
|
||||||
public string Model
|
public string Model
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
|
<CarouselPage xmlns="http://xamarin.com/schemas/2014/forms"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
xmlns:local="clr-namespace:ZicMoove;assembly=ZicMoove"
|
xmlns:local="clr-namespace:ZicMoove;assembly=ZicMoove"
|
||||||
x:Class="ZicMoove.Pages.HomePage"
|
x:Class="ZicMoove.Pages.HomePage"
|
||||||
Style="{StaticResource PageStyle}"
|
Style="{StaticResource PageStyle}"
|
||||||
Title="Accueil">
|
Title="Accueil">
|
||||||
<ContentPage.Resources>
|
<CarouselPage.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<Style TargetType="Label">
|
<Style TargetType="Label">
|
||||||
<Setter Property="Style" Value="{StaticResource ContentLabelStyle}" />
|
<Setter Property="Style" Value="{StaticResource ContentLabelStyle}" />
|
||||||
@ -14,12 +14,11 @@
|
|||||||
<Setter Property="Style" Value="{StaticResource ButtonStyle}" />
|
<Setter Property="Style" Value="{StaticResource ButtonStyle}" />
|
||||||
</Style>
|
</Style>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
</ContentPage.Resources>
|
</CarouselPage.Resources>
|
||||||
|
|
||||||
<TabbedPage.Children>
|
|
||||||
<!-- La recherche d'un pro -->
|
<!-- La recherche d'un pro -->
|
||||||
<TabbedPage Title="{x:Static local:Strings.SearchForAPro}" >
|
<ContentPage Title="{x:Static local:Strings.SearchForAPro}" >
|
||||||
</TabbedPage>
|
</ContentPage>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
les derniers sons/videos/articles postés
|
les derniers sons/videos/articles postés
|
||||||
@ -98,6 +97,5 @@
|
|||||||
<Button x:Name="btn_cli_pub" HorizontalOptions="End" VerticalOptions="Start" Text="Chercher"/>
|
<Button x:Name="btn_cli_pub" HorizontalOptions="End" VerticalOptions="Start" Text="Chercher"/>
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
</ContentPage>
|
</ContentPage>
|
||||||
</TabbedPage.Children>
|
|
||||||
|
|
||||||
</TabbedPage>
|
</CarouselPage>
|
Reference in New Issue
Block a user