Not able to receive notifications on device
-
Hi,
We are using Push Sharp library in VB .Net for sending notifications to iOS device but we arent able to receive notifications on our device.
Code is included below. We have checked the handshake using openSSL and thats also working properly. Please let us know whats wrong in the code.------- Imports System.Data.SqlClient Imports System.Data Imports System.Linq Imports System.Web Imports System.Net.Security Imports PushSharp Imports PushSharp.Apple Imports System.Security.Authentication Imports System.Net.Sockets Imports System.Security.Cryptography.X509Certificates Imports System.Configuration Imports Newtonsoft.Json Imports System.IO Imports System.Collections.Generic Imports System.Net Imports PushSharp.Core Partial Class mobile_app_notification_list Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Try Dim push As New PushBroker() push = New PushBroker() Dim cert As New ApplePushChannelSettings(True, File.ReadAllBytes(String.Format("C:\Websites\mobileapp.sanjeevkapoor.com\PushAppSanjeev.p12")), "pass@123") Dim settings As New PushServiceSettings() settings.AutoScaleChannels = False settings.Channels = 3 settings.MaxAutoScaleChannels = 3 push.RegisterAppleService(cert, settings) push.QueueNotification(New AppleNotification().ForDeviceToken("6d9471a58384af100a0b854ec907729efb6c5334e4c26822e97eaccc6d48313d").WithAlert("Hello World!").WithBadge(1).WithSound("default")) 'push.StopAllServices(True) Response.Write("notification sent successfully") Catch ex As Exception Response.Write(ex.Message) End Try End Sub -------
-
Hi,
We are using Push Sharp library in VB .Net for sending notifications to iOS device but we arent able to receive notifications on our device.
Code is included below. We have checked the handshake using openSSL and thats also working properly. Please let us know whats wrong in the code.------- Imports System.Data.SqlClient Imports System.Data Imports System.Linq Imports System.Web Imports System.Net.Security Imports PushSharp Imports PushSharp.Apple Imports System.Security.Authentication Imports System.Net.Sockets Imports System.Security.Cryptography.X509Certificates Imports System.Configuration Imports Newtonsoft.Json Imports System.IO Imports System.Collections.Generic Imports System.Net Imports PushSharp.Core Partial Class mobile_app_notification_list Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Try Dim push As New PushBroker() push = New PushBroker() Dim cert As New ApplePushChannelSettings(True, File.ReadAllBytes(String.Format("C:\Websites\mobileapp.sanjeevkapoor.com\PushAppSanjeev.p12")), "pass@123") Dim settings As New PushServiceSettings() settings.AutoScaleChannels = False settings.Channels = 3 settings.MaxAutoScaleChannels = 3 push.RegisterAppleService(cert, settings) push.QueueNotification(New AppleNotification().ForDeviceToken("6d9471a58384af100a0b854ec907729efb6c5334e4c26822e97eaccc6d48313d").WithAlert("Hello World!").WithBadge(1).WithSound("default")) 'push.StopAllServices(True) Response.Write("notification sent successfully") Catch ex As Exception Response.Write(ex.Message) End Try End Sub -------
This question would probably be better answered on the Visual Basic forum. http://www.codeproject.com/Forums/1646/Visual-Basic.aspx[^] As just a note though you still have to have an app that will consume and deal with those notifications. Have you checked the app to make sure that you have it configured and coded properly to received the notifications?
-
Hi,
We are using Push Sharp library in VB .Net for sending notifications to iOS device but we arent able to receive notifications on our device.
Code is included below. We have checked the handshake using openSSL and thats also working properly. Please let us know whats wrong in the code.------- Imports System.Data.SqlClient Imports System.Data Imports System.Linq Imports System.Web Imports System.Net.Security Imports PushSharp Imports PushSharp.Apple Imports System.Security.Authentication Imports System.Net.Sockets Imports System.Security.Cryptography.X509Certificates Imports System.Configuration Imports Newtonsoft.Json Imports System.IO Imports System.Collections.Generic Imports System.Net Imports PushSharp.Core Partial Class mobile_app_notification_list Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Try Dim push As New PushBroker() push = New PushBroker() Dim cert As New ApplePushChannelSettings(True, File.ReadAllBytes(String.Format("C:\Websites\mobileapp.sanjeevkapoor.com\PushAppSanjeev.p12")), "pass@123") Dim settings As New PushServiceSettings() settings.AutoScaleChannels = False settings.Channels = 3 settings.MaxAutoScaleChannels = 3 push.RegisterAppleService(cert, settings) push.QueueNotification(New AppleNotification().ForDeviceToken("6d9471a58384af100a0b854ec907729efb6c5334e4c26822e97eaccc6d48313d").WithAlert("Hello World!").WithBadge(1).WithSound("default")) 'push.StopAllServices(True) Response.Write("notification sent successfully") Catch ex As Exception Response.Write(ex.Message) End Try End Sub -------
Having the same issues Views Album