Reputation: 63
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.
Upvotes: 0
Views: 176
Reputation: 3866
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, e.g.:
{
"alert": "New content available! Download now?",
"badge": 1,
"url": "http://www.download.com/resource/asset.json",
"category": "DOWNLOAD_CATEGORY"
}
See:
Upvotes: 1