【问题标题】:Appcelerator push notification internationalizationAppcelerator 推送通知国际化
【发布时间】:2016-03-03 09:08:32
【问题描述】:

我部署了一些在多个国家/地区使用的应用程序。 现在我想发送通知,但我找不到用不同语言发送通知的方法。 我的需要是向用户发送一些新闻,因此将翻译集成到 i18n 文件中对我来说并不方便。

我想我不是第一个有这种问题的人,但我在互联网上没有找到很多帮助。

请不要犹豫,分享一些关于此的提示或良好做法

提前致谢,

阿诺

【问题讨论】:

    标签: push-notification internationalization translation appcelerator appcelerator-arrow


    【解决方案1】:

    APN 和 GCM 本身只知道每个设备的令牌。像 Arrow Push 这样的推送服务提供商会跟踪每个令牌的元信息。

    对于 Arrow Push,您可以为每种语言创建一个单独的频道。然后,当您发送推送通知时,您需要分别针对每种语言执行此操作并针对相关频道。

    要将令牌/用户订阅到频道,请参阅: http://docs.appcelerator.com/platform/latest/#!/api/Modules.Cloud.PushNotifications-method-subscribeToken

    要发送给频道中的所有令牌/用户,请参阅: http://docs.appcelerator.com/arrowdb/latest/#!/api/PushNotifications-method-notify

    或通过 Appcelerator Platform Dashboard 发送。

    【讨论】:

    • 所以没有办法向特定国家的所有设备发送通知?
    • 并非开箱即用,因为 Google 和 Apple 提供该服务。您需要自己负责对设备令牌进行分组。
    猜你喜欢
    • 1970-01-01
    • 2019-01-25
    • 1970-01-01
    • 2016-04-20
    • 1970-01-01
    • 1970-01-01
    • 2012-04-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多