Latest update may be null.
This commit is contained in:
@ -280,38 +280,6 @@ namespace ZicMoove.Droid
|
||||
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()
|
||||
{
|
||||
|
@ -550,9 +550,11 @@
|
||||
</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.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>
|
||||
<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\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.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
|
@ -2,6 +2,7 @@
|
||||
<packages>
|
||||
<package id="ExifLib.PCL" version="1.0.1" targetFramework="monoandroid70" />
|
||||
<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="Plugin.CurrentActivity" version="1.0.1" targetFramework="monoandroid70" />
|
||||
<package id="Plugin.Permissions" version="1.1.7" targetFramework="monoandroid70" />
|
||||
|
@ -454,6 +454,11 @@ namespace ZicMoove
|
||||
public static IGCMDeclaration GetDeviceInfo()
|
||||
{
|
||||
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
|
||||
{
|
||||
DeviceId = devinfo.Id,
|
||||
@ -461,9 +466,7 @@ namespace ZicMoove
|
||||
Model = devinfo.Model,
|
||||
Platform = devinfo.Platform.ToString(),
|
||||
Version = devinfo.Version,
|
||||
LatestActivityUpdate = DataManager.Instance.Activities.Aggregate(
|
||||
(a,b)=> a.DateModified > b.DateModified ? a : b
|
||||
).DateModified
|
||||
LatestActivityUpdate = lupdate
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -11,8 +11,6 @@ namespace ZicMoove.Interfaces
|
||||
|
||||
// TODO Better
|
||||
string GCMStatusMessage { get; }
|
||||
|
||||
bool EnablePushNotifications (bool enable);
|
||||
|
||||
void AddAccount();
|
||||
|
||||
|
@ -15,7 +15,7 @@ namespace ZicMoove.Model.Auth
|
||||
public string GCMRegistrationId
|
||||
{ get; set; }
|
||||
|
||||
public DateTime LatestActivityUpdate
|
||||
public DateTime? LatestActivityUpdate
|
||||
{ get; set; }
|
||||
|
||||
public string Model
|
||||
|
@ -1,11 +1,11 @@
|
||||
<?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:local="clr-namespace:ZicMoove;assembly=ZicMoove"
|
||||
x:Class="ZicMoove.Pages.HomePage"
|
||||
Style="{StaticResource PageStyle}"
|
||||
Title="Accueil">
|
||||
<ContentPage.Resources>
|
||||
<CarouselPage.Resources>
|
||||
<ResourceDictionary>
|
||||
<Style TargetType="Label">
|
||||
<Setter Property="Style" Value="{StaticResource ContentLabelStyle}" />
|
||||
@ -14,12 +14,11 @@
|
||||
<Setter Property="Style" Value="{StaticResource ButtonStyle}" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</ContentPage.Resources>
|
||||
</CarouselPage.Resources>
|
||||
|
||||
<TabbedPage.Children>
|
||||
<!-- La recherche d'un pro -->
|
||||
<TabbedPage Title="{x:Static local:Strings.SearchForAPro}" >
|
||||
</TabbedPage>
|
||||
<ContentPage Title="{x:Static local:Strings.SearchForAPro}" >
|
||||
</ContentPage>
|
||||
|
||||
<!--
|
||||
les derniers sons/videos/articles postés
|
||||
@ -98,6 +97,5 @@
|
||||
<Button x:Name="btn_cli_pub" HorizontalOptions="End" VerticalOptions="Start" Text="Chercher"/>
|
||||
</StackLayout>
|
||||
</ContentPage>
|
||||
</TabbedPage.Children>
|
||||
|
||||
</TabbedPage>
|
||||
</CarouselPage>
|
Reference in New Issue
Block a user