using System;
using Android.App;
using Android.Content;
using Android.Gms.Common;
using Datadruid.PushNotifications.Droid.Interfaces;
using Datadruid.PushNotifications.Droid.Services;
using Datadruid.PushNotifications.Interfaces;
using Gcm.Client;

[assembly: Xamarin.Forms.Dependency(typeof(PushRegistration))]
namespace Datadruid.PushNotifications.Droid.Interfaces
{
    class PushRegistration : IPushRegistration
    {
        public void Register()
        {
            //Check to see that GCM is supported and that the manifest has the correct information
            GcmClient.CheckDevice(Xamarin.Forms.Forms.Context);
            GcmClient.CheckManifest(Xamarin.Forms.Forms.Context);

            //Call to Register the device for Push Notifications
            GcmClient.Register(Xamarin.Forms.Forms.Context, GcmBroadcastReceiver.SENDER_IDS);
        }
    }
}