问题标签 [pushsharp]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
ios - 带有 PushSharp 应用程序的 Xamarin.IOS 会被 Apple AppStore 拒绝吗?
我正在设计一个项目,该项目将使用Xamarin.iOS创建一个 iPhone/iPad 应用程序,该应用程序将使用推送通知,最后,它必须发布到Apple AppStore。虽然我必须使用 Xamarin.iOS,但我知道推送通知是通过使用 PushSharp library完成的。考虑到 Apple 对在其商店中发布应用程序施加的限制,尤其是以下几点:
- 2.5 使用非公开 API 的应用将被拒绝
- 5.1 提供推送通知而不使用 Apple Push Notification (APN) API 的应用程序将被拒绝
那么,使用PushSharp库向 iOS 设备发送推送通知会导致我的应用被 Apple 拒绝吗?
c# - C# .WithJson 无效的 JSON 错误
我正在尝试按如下方式构建此 JSON 字符串
现在,每当我运行它时,我都会得到 InvalidCastException 未处理/检测到无效 JSON!错误信息。
但是,当我执行以下操作时
它工作得很好。
如果有人对如何使这项工作有任何想法或建议,将不胜感激。
谢谢!
c# - 如何检查事件是否已触发?
我的代码实现有问题。我目前正在使用 PushSharp 库,我想做的一件事是如果事件触发,我想根据它是什么事件返回一个真值或假值。这是代码:
所以我想要的是如果事件触发,根据发生的情况返回真或假,然后最终在第一个方法中返回这个值
ios - PushSharp iOS PushNotification with custom sound
I am trying to add a custom sound to at push notification with PushSharp, but I can't find any documentation about this. I am using a windows service in C#, and every thing worked with default sound. But when I use this code I either get default sound og no sound.
I have the sound file included in the C# project, and also included in the iOS app project.
What do I need to do to make it work? Is it something about filetypes?
c# - Pushsharp 苹果通知调用 SSPI 失败错误
我正在使用 PushSharp 在 C# 中发送 Apple 推送通知,我有我的生产 .pem 文件及其密码。下面是我的代码片段。我总是收到这个错误..
或者
我尝试了网络中几乎所有可用的代码。甚至尝试了 MoonAPNS 但同样的错误,对于自定义脚本也收到此 SSPI 失败错误。我使用相同的 .pem 文件并运行 php 脚本从同一服务器向 APN 发送推送通知,它可以工作。
请帮助提前谢谢
client - pushsharp 客户端名称已更改
使用 PushSharpClient 示例代码,我将包名称从 com.pushsharp.test 更改为 com.testPush。我搜索并用新名称替换了旧名称的所有实例。当我尝试在我的摩托罗拉 XT389 设备上的 Xamarin Studio (F5) 中调试运行应用程序时,我得到以下结果:
由于内部错误,部署失败:找不到文件 'S:\PushSharp-master\Client.Samples\PushSharp.ClientSample.MonoForAndroid\PushSharp.ClientSample.MonoForAndroid.Gcm\bin\Debug\com.pushsharp.test-Signed。 APK'
实际上,实际文件名为 com.testPush-Signed.apk' 我还需要在哪里更改文件名 - 我已将其更改为:
[assembly: Permission(Name = "com.testPush.permission.C2D_MESSAGE")] //, ProtectionLevel = Android.Content.PM.Protection.Signature)] [assembly: UsesPermission(Name = "com.testPush.permission.C2D_MESSAGE" )]
在 PushService.cs
以及AndroidManifest.xml中的包名
而且我无法使用搜索和查找找到其他参考资料。
push-notification - PushSharp 队列长度
有谁知道获取队列中有多少消息的方法?(队列 ==> 已排队等待发送但未从服务器获得任何响应 [成功/失败] 的消息)
android - 在 Android 上未收到推送通知
我没有收到我的 Android 推送通知。我能够
- 注册设备
- 接收设备标识符
- 将通知消息推送到 GCM
我成功进入通知发送事件,但我的设备上没有收到任何消息。成功推送代码如下:
android - 应用关闭时未收到 Android 推送通知
我遵循了 PushSharp 存储库中的示例: PushSharp Android Client Sample
如果应用程序打开或在后台(通过点击主页或后退按钮),一切都很好。但是,如果我通过在应用程序管理器中将其滑开来关闭应用程序,我将不再收到通知。
我的假设是,由于 PushHandlerService 被标记为 [Service],即使应用程序关闭并继续侦听通知,它也会保持打开状态。有没有办法在应用程序关闭的情况下继续接收通知,还是我做错了?
我会包含代码,但我所得到的几乎完全来自上面链接中的示例。
编辑:
即使设备已经注册,我也尝试在应用程序启动时触发 PushClient.Register,希望这会在未启动的情况下启动 PushHandlerService。即使在每次启动应用程序时重新注册,当应用程序关闭时我仍然没有收到通知。