Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Push notifications
Started by soin08 Aug 30 2014 01:36 AM

7 replies to this topic
push notifications
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

soin08

[GLOBAL: userInfoPane.html]
soin08
  • Observer

  • 24 posts
  • Corona SDK

What I would like to achieve is when a user in my app mentions another user (e.g. hey @alex, what's up?) the one that gets mentioned should recieve an instant push notifation. Just like when somebody tags you on Instagram or Facebook. 

 

I skimmed through GameThrive's functionality and as far as I understand I would only be able to send push notifications to all users or certain segments.

 

Can such functionality be implmented using Corona SDK?



[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,788 posts
  • Enterprise

Corona SDK really doesn't factor into this.  It's all a matter of what your push provider supports.  I know that Urban Airship allows pushes to be sent to a single device from their web based online console.  I'm not sure about PushWoosh. I don't see anything in their online console to select an individual.  I've never worked with either one's API's before to know what's involved with it.    Since you want Corona SDK to send it, you would have to use their  APIs and network.request() calls to make it happen.

 

There are other push services out there that you might want to look in to.  I know Parse.com has been adding push.  One of our own developers, @develephant, has created his own service called Coronium (http://coronium.io/) that I think will do single user pushes.  You should check them out.

 

Rob



[TOPIC: post.html]
#3

yosu

[GLOBAL: userInfoPane.html]
yosu
  • Contributor

  • 520 posts
  • Corona SDK

What i did was to build a database that links all the users and notification-ids. In this way, all data is sent to your server and you will know which user to notify.



[TOPIC: post.html]
#4

elbowroomapps

[GLOBAL: userInfoPane.html]
elbowroomapps
  • Contributor

  • 353 posts
  • Corona SDK

I think this thread might have the info you are looking for. I haven't tried this myself, so I can't say how well it works.

 

http://forums.coronalabs.com/topic/47422-device-to-device-notifications/



[TOPIC: post.html]
#5

soin08

[GLOBAL: userInfoPane.html]
soin08
  • Observer

  • 24 posts
  • Corona SDK

@yosu, this is exactly what I'm gonna do! pushbots.com supports pushes to a single device.

 

@Rob Miracle, thanks a lot! I've tried coronium.io and this is what I'm gonna be using for my project!



[TOPIC: post.html]
#6

george18

[GLOBAL: userInfoPane.html]
george18
  • Contributor

  • 233 posts
  • Corona SDK

GameThrive (Disclaimer: A service I help run) also supports pushing messages to a single device. You'll still need to store the recipient's push token or GameThrive id on a server somewhere so you know where to send the message. Then simply call our API with that token or ID and your message.

 

Here's the API documentation on this feature: http://docs.gamethrive.apiary.io/#post-%2Fapi%2Fv1%2Fnotifications (Under target parameters you'll see that you can use include_player_ids, include_ios_tokens, or include_android_reg_ids for this feature).



[TOPIC: post.html]
#7

yosu

[GLOBAL: userInfoPane.html]
yosu
  • Contributor

  • 520 posts
  • Corona SDK

It is actually not that hard to do some PHP coding to push the message yourself to GCM. It is just a http-post with your KEY, token(s), message.  Based on the database, you can set categories, etc so the push notifications can be sent to ALL or only 1 device. 

 

All the best!



[TOPIC: post.html]
#8

soin08

[GLOBAL: userInfoPane.html]
soin08
  • Observer

  • 24 posts
  • Corona SDK

@yosu, sure thing!




[topic_controls]
[/topic_controls]