1. Create a project and add references to the project. The dll file has been uploaded to the Baidu network disk. Click to download it.
2. Introduce the namespace
PushSharp.WindowsPhone;
3. initialize and write the following code
push = push.OnNotificationSent +=+=+=+=+=+=+=+= appleCert = File.ReadAllBytes(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, push.RegisterAppleService( ApplePushChannelSettings(appleCert, )); push.QueueNotification( push.RegisterGcmService( GcmPushChannelSettings( push.QueueNotification( GcmNotification().ForDeviceRegistrationId( Uri(
4. Registration Method
DeviceSubscriptionChanged( sender, oldSubscriptionId, Console.WriteLine( + oldSubscriptionId + + newSubscriptionId + + NotificationSent( + sender + + NotificationFailed( + sender + + notificationFailureException.Message + + ChannelException( + sender + + ServiceException( + sender + + DeviceSubscriptionExpired( sender, + sender + + ChannelDestroyed( + ChannelCreated( +
5. As a result, different authentication information is required for each system. The complete information is used in this example (such as the ios certificate, password, device tokenID, and so on, normal!
6, what do not understand and I contact (shixudong3@yeah.net)