Google Calendar to FEZ Spider

Hi,

my last project cheked a pop3 account for new mails.
Now i want to do soemthing new…

Is it possible to fetch the entries from the google calendar?

I found these tow libraries:

Can i use them for my FEZ Spider Projects?
I think i didnt understand yet, if i am able to use .net libraries for my FEZ Spider.
Maybe someone here can help me with this …

kind regards

The essential .Net functionality is implemented in NETMF. In theory you should be able to adopt codeproject code with some changes to do what you want.

Hi,

i just tried to make it work but soon get some errors after just adding Google.GData.Client to the reference list:

Fehler	1	Die Datei "C:\Program Files (x86)\Google\Google Data API SDK\Redist\LE\Google.GData.Client.pe" kann nicht in "bin\Debug\LE\Google.GData.Client.pe" kopiert werden. Ein Teil des Pfades "C:\Program Files (x86)\Google\Google Data API SDK\Redist\LE\Google.GData.Client.pe" konnte nicht gefunden werden.	GoogleCalendar
Fehler	2	Die Datei "C:\Program Files (x86)\Google\Google Data API SDK\Redist\LE\Newtonsoft.Json.pe" kann nicht in "bin\Debug\LE\Newtonsoft.Json.pe" kopiert werden. Ein Teil des Pfades "C:\Program Files (x86)\Google\Google Data API SDK\Redist\LE\Newtonsoft.Json.pe" konnte nicht gefunden werden.	GoogleCalendar
Fehler	3	Die Datei "C:\Windows\assembly\GAC_64\System.Data\2.0.0.0__b77a5c561934e089\LE\System.Data.pe" kann nicht in "bin\Debug\LE\System.Data.pe" kopiert werden. Ein Teil des Pfades "C:\Windows\assembly\GAC_64\System.Data\2.0.0.0__b77a5c561934e089\LE\System.Data.pe" konnte nicht gefunden werden.	GoogleCalendar
Fehler	4	Die Datei "C:\Windows\assembly\GAC_64\System.Transactions\2.0.0.0__b77a5c561934e089\LE\System.Transactions.pe" kann nicht in "bin\Debug\LE\System.Transactions.pe" kopiert werden. Ein Teil des Pfades "C:\Windows\assembly\GAC_64\System.Transactions\2.0.0.0__b77a5c561934e089\LE\System.Transactions.pe" konnte nicht gefunden werden.	GoogleCalendar
Fehler	5	Die Datei "C:\Windows\assembly\GAC_64\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\LE\System.EnterpriseServices.pe" kann nicht in "bin\Debug\LE\System.EnterpriseServices.pe" kopiert werden. Ein Teil des Pfades "C:\Windows\assembly\GAC_64\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\LE\System.EnterpriseServices.pe" konnte nicht gefunden werden.	GoogleCalendar
Fehler	6	Die Datei "C:\Windows\assembly\GAC_64\System.Web\2.0.0.0__b03f5f7f11d50a3a\LE\System.Web.pe" kann nicht in "bin\Debug\LE\System.Web.pe" kopiert werden. Ein Teil des Pfades "C:\Windows\assembly\GAC_64\System.Web\2.0.0.0__b03f5f7f11d50a3a\LE\System.Web.pe" konnte nicht gefunden werden.	GoogleCalendar
Fehler	7	Die Datei "C:\Windows\assembly\GAC_64\System.Data.OracleClient\2.0.0.0__b77a5c561934e089\LE\System.Data.OracleClient.pe" kann nicht in "bin\Debug\LE\System.Data.OracleClient.pe" kopiert werden. Ein Teil des Pfades "C:\Windows\assembly\GAC_64\System.Data.OracleClient\2.0.0.0__b77a5c561934e089\LE\System.Data.OracleClient.pe" konnte nicht gefunden werden.	GoogleCalendar
Fehler	8	Die Datei "C:\Windows\assembly\GAC_64\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\LE\System.EnterpriseServices.Wrapper.pe" kann nicht in "bin\Debug\LE\System.EnterpriseServices.Wrapper.pe" kopiert werden. Ein Teil des Pfades "C:\Windows\assembly\GAC_64\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\LE\System.EnterpriseServices.Wrapper.pe" konnte nicht gefunden werden.	GoogleCalendar

It always tells, that the soruces cannot be found.
Thats my program.c, which works fine, until i add the reference to the google api.

using System;
using System.Collections;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Presentation;
using Microsoft.SPOT.Presentation.Controls;
using Microsoft.SPOT.Presentation.Media;
using Microsoft.SPOT.Touch;

using Gadgeteer.Networking;
using GT = Gadgeteer;
using GTM = Gadgeteer.Modules;
using Gadgeteer.Modules.GHIElectronics;
using GHI.Premium.Net;

using Google.GData.Client;

namespace GoogleCalendar
{
    public partial class Program
    {
         // This method is run when the mainboard is powered up or reset.
        void ProgramStarted()
        {   
            display_TE35.SimpleGraphics.AutoRedraw = true;
            InitEthernet();
            // Use Debug.Print to show messages in Visual Studio's "Output" window during debugging.
            Debug.Print("Program Started");
            //display_T35.SimpleGraphics.DisplayText("Program Started", Resources.GetFont(Resources.FontResources.NinaB), Colors.White, 5, 10);
        }

        void InitEthernet()
        {
            if (!ethernet_J11D.Interface.IsOpen)
                ethernet_J11D.Interface.Open();

            ethernet_J11D.Interface.NetworkInterface.EnableDhcp();
            NetworkInterfaceExtension.AssignNetworkingStackTo(ethernet_J11D.Interface);

            ethernet_J11D.Interface.CableConnectivityChanged +=
                new EthernetBuiltIn.CableConnectivityChangedEventHandler(Interface_CableConnectivityChanged);

            ethernet_J11D.Interface.NetworkAddressChanged +=
                new NetworkInterfaceExtension.NetworkAddressChangedEventHandler(Interface_NetworkAddressChanged);
        }


        void Interface_NetworkAddressChanged(object sender, EventArgs e)
        {
            Debug.Print("IP Address: " + ethernet_J11D.Interface.NetworkInterface.IPAddress);
            display_TE35.SimpleGraphics.DisplayText("IP:" + ethernet_J11D.Interface.NetworkInterface.IPAddress, Resources.GetFont(Resources.FontResources.NinaB), Colors.White, 40, 40);

            if (ethernet_J11D.Interface.NetworkInterface.IPAddress != "0.0.0.0")
            {
                // You have an IP address! Let the fun begin...
            }
        }

        void Interface_CableConnectivityChanged(object sender, EthernetBuiltIn.CableConnectivityEventArgs e)
        {
            Debug.Print(ethernet_J11D.Interface.IsCableConnected ? "Cable connected" : "Cable removed");
        }
    }
}

I tried a sample project and added the references and everything in the sample worked fine.

Maybe you have an idea, what will fix this issue?

kind regards

It looks like the client code you are trying to use was not targeted for NETMF framework, but the full desktop .NET framework.

(don’t have the NETMF handy)

For example, it’s referencing System.Transactions, System.EnterpriseService, System.Data.Oracle and Newtonsoft.JSON.

You would need to port the code to the MF framework. My guess is that it’s opening a http connection, sending credentials (like a token), performing a query, retrieving data in a JSON format and then parsing the results.

@ loco -

This link may help… I hope!

I do not use Google API so I’m no help to you.

http://www.codeproject.com/Articles/36819/Using-Google-Maps-in-NET-Micro-Framework

Or maybe use Windows SlideShow