Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试创建本地通知。我得到了通知工作,但有一个硬编码的标题。我需要能够唤醒应用程序,点击一个 api,然后使用从 api 调用返回的标题向用户显示通知。有人可以建议我应该使用什么方法来做到这一点?
当您设置本地通知时,您可以进行 API 调用吗?如果是这样,只需将本地通知 alertBody 设置为您从 API 检索的标题。
这使用本地通知是不可能的,但使用推送通知是可能的。您是否有任何理由不使用推送通知?