简体   繁体   English

使用按钮appcelerator推送通知(Android和iOS)

[英]Push notification with buttons appcelerator (Android and iOS)

I am having a hard time with push notifications to update an app, to send the push, is ok, using the notification, first I lost a bit of time to learn that you need the physical devices to test the push. 我在使用推送通知来更新应用程序,发送推送方面很困难,可以使用通知,首先我花了一些时间来了解您需要物理设备来测试推送。

ok receiving the push done, but on a near update I need to create a push with buttons (ok, cancel), and hear that event, and acoording to the answer send the message back to the person that first activated the push, I do not know if I am clear enough. 好的,接收到推送已完成,但是在更新之后,我需要创建一个带有按钮的推送(确定,取消),并听到该事件,然后根据答案将消息发送回首次激活该推送的人,不知道我是否足够清楚。

The person will enter the app and perform a search on other users, he can select a few tags and aptions to search, when he clicks search, the server will locate every user in that area and send a push to the selected users, that will show a time limit or a countdown counter if possible and an ok(the user wants to appear on that search) and cancel button, if cancel is clicked, just dismiss the notification, but if ok is clicked it must answer the person who is searching with that user id, and I am a bit lost on how to perform that task, I do not even know where to start, sending the push is the only thing I knew I should do, but the rest of the idea is not clear on how to do it on appcelerator. 该人将进入该应用并在其他用户上执行搜索,他可以选择一些标签和词义进行搜索,当他单击搜索时,服务器将找到该区域中的每个用户,并将推向该用户发送,如果可能,请显示时间限制或倒数计数器,然后单击确定(用户希望出现在该搜索中)并单击取消按钮,如果单击取消,则只是取消通知,但是如果单击确定,则必须回答正在搜索的人使用该用户ID,我对如何执行该任务有点迷茫,我什至不知道从哪里开始,将推送发送是我唯一应该做的事情,但是其余的想法尚不清楚如何在appcelerator上执行此操作。

The buttons are so-called Interactive (Push) Notifications. 这些按钮是所谓的“交互(推送)通知”。 They can be used in both local and push notifications. 它们可以在本地通知和推送通知中使用。 Simply include the category (which needs to be registered in the app) in the payload, eg: 只需在有效负载中包括类别(需要在应用程序中注册),例如:

{
    "alert": "New content available! Download now?",
    "badge": 1,
    "url": "http://www.download.com/resource/asset.json",
    "category": "DOWNLOAD_CATEGORY"    
}

See: 看到:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM