From 6d52fdd71d0b512f5fa0d7905845e1762b44d730 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Tue, 7 Feb 2017 12:44:51 +0100 Subject: [PATCH] Latest update may be null. --- YavscLib/IGoogleCloudMobileDeclaration.cs | 2 +- ZicMoove/ZicMoove.Droid/MainActivity.cs | 32 ------------------- ZicMoove/ZicMoove.Droid/ZicMoove.Droid.csproj | 2 ++ ZicMoove/ZicMoove.Droid/packages.config | 1 + ZicMoove/ZicMoove/App.xaml.cs | 9 ++++-- ZicMoove/ZicMoove/Interfaces/IPlatform.cs | 2 -- .../ZicMoove/Model/Auth/GCRegIdDeclaration.cs | 2 +- ZicMoove/ZicMoove/Pages/HomePage.xaml | 14 ++++---- 8 files changed, 17 insertions(+), 47 deletions(-) diff --git a/YavscLib/IGoogleCloudMobileDeclaration.cs b/YavscLib/IGoogleCloudMobileDeclaration.cs index b8b006b5..24ca24e0 100644 --- a/YavscLib/IGoogleCloudMobileDeclaration.cs +++ b/YavscLib/IGoogleCloudMobileDeclaration.cs @@ -27,7 +27,7 @@ namespace Yavsc.Models.Identity string Model { get; set; } string Platform { get; set; } string Version { get; set; } - DateTime LatestActivityUpdate { get; set; } + DateTime? LatestActivityUpdate { get; set; } } public interface IGoogleCloudMobileDeclaration: IGCMDeclaration diff --git a/ZicMoove/ZicMoove.Droid/MainActivity.cs b/ZicMoove/ZicMoove.Droid/MainActivity.cs index a47ae3ee..d0b4f766 100644 --- a/ZicMoove/ZicMoove.Droid/MainActivity.cs +++ b/ZicMoove/ZicMoove.Droid/MainActivity.cs @@ -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> GetAndroidAccounts() { diff --git a/ZicMoove/ZicMoove.Droid/ZicMoove.Droid.csproj b/ZicMoove/ZicMoove.Droid/ZicMoove.Droid.csproj index 1c08e1df..bf6109ec 100644 --- a/ZicMoove/ZicMoove.Droid/ZicMoove.Droid.csproj +++ b/ZicMoove/ZicMoove.Droid/ZicMoove.Droid.csproj @@ -550,9 +550,11 @@ + + - - + +