Push Notifications

Yes any updates on this, please? [import]uid: 8192 topic_id: 7853 reply_id: 35618[/import]

+1 for OS notification :slight_smile:
[import]uid: 60157 topic_id: 7853 reply_id: 36779[/import]

Any news or time frame for the push notification?

Carlos?
[import]uid: 52906 topic_id: 7853 reply_id: 37505[/import]

+1 for Push Notifications [import]uid: 57346 topic_id: 7853 reply_id: 38376[/import]

+1 for native push notification.

Currently the accepted work-arounds for my team are:

1.) Setup each Corona App as a server listening on port X for incoming messages, and respond accordingly based on the message. (Downside: we are not guaranteed that port X is open on a particular network. We can aggressive scan the 65000 ports for open ports but this is impractically slow, and still does not guarantee another port being open.)

2.) Each Corona App polls a web server/application/service every T amount of time for a message, and respond accordingly based on the message. (Downside: works as long as you have internet access on the device running Corona App, but does not scale well once you have massive amounts of users.)


We currently utilize option #2, and are wondering what kind of implementation native push notification would provide that addresses the two problems from above?
[import]uid: 13381 topic_id: 7853 reply_id: 38749[/import]

@zeltice Very cool info thanks.

+1 for this. Any workaround would be ok for now. [import]uid: 8192 topic_id: 7853 reply_id: 38765[/import]

Here is code to implement push notification using approach #1 I described above.

Code was updated from Matthew Pringle’s TCP server code at http://developer.anscamobile.com/reference/index/networkrequest . I fixed syntax errors, added more comments, and modified code allow for retrieval of entire communication batches, not just 2 lines.

main.lua

local socket = require("socket");  
  
local tcpServer;  
  
local function createTCPServer( port )  
 -- Create Socket  
 local tcpServerSocket, err = socket.tcp();  
 local backlog = 5; -- Max number of accepted connections to server  
  
 -- Check Socket  
 if tcpServerSocket == nil then   
 return nil, err;  
 end  
  
 -- Allow Address Reuse  
 tcpServerSocket:setoption( "reuseaddr" , true );  
  
 -- Bind Socket  
 local res, err = tcpServerSocket:bind( "\*" , port );  
 if res == nil then  
 return nil, err;  
 end  
  
 -- Check Connection  
 res, err = tcpServerSocket:listen( backlog );  
 if res == nil then   
 return nil , err;  
 end  
  
 -- Return Server  
 return tcpServerSocket;  
end  
  
local function runTCPServer()  
 local tcpClient, tcpClientMessage;  
 local completeMessage = "";  
  
 -- Set Timeout  
 tcpServer:settimeout(0); -- Additional delay between each socket listen event.  
  
 -- Set Client  
 tcpClient, \_ = tcpServer:accept();  
  
 -- Get Message  
 if tcpClient then  
 -- The max allowed time between messages is 10ms, after which the sender is  
 -- considered to have finished sending data.  
 tcpClient:settimeout(.01);  
  
 while true do  
 tcpClientMessage, \_ = tcpClient:receive();  
  
 if tcpClientMessage == nil then  
 break;  
 end  
  
 --print("Message: " .. tcpClientMessage);  
 completeMessage = completeMessage .. "\n" .. tcpClientMessage;  
 end  
  
 -- Get rid of the first char ('\n') which was manually inserted.  
 completeMessage = completeMessage:sub(2);  
  
 tcpClient:send("I HAVE BEEN PUSH NOTIFIED! DATA RECEIVED: " .. completeMessage);  
 tcpClient:close();  
 else  
 -- Error  
 end  
end  
  
-- Make sure to enable port forwarding for port 8080 on your router, and enable   
-- inbound + outbound for port 8080 on your Windows/Mac firewall.  
tcpServer , \_ = createTCPServer("8080");  
Runtime:addEventListener( "enterFrame" , runTCPServer);  
-- tcpServer.close() is done on program exit. Call the close method manually  
-- if you're turning off server.  

The code works under ideal network connectivity scenarios. If you have experience dealing with TCP data disconnection issues, I’d really love some insight and perhaps improvements in the code that addresses fault tolerance.

Again, for any port we pick for the push notification application there is no guarantee that port will be open for us to bind to. [import]uid: 13381 topic_id: 7853 reply_id: 38773[/import]

Maybe you can use PubNub?

http://www.pubnub.com/ [import]uid: 48521 topic_id: 7853 reply_id: 38876[/import]

Any news on push notifications ?
(I mean real push notifications that works even when the application is not running… not like pubnub)

I know ansca team is working on monetization first but when you’re creating business app push notification is #1 feature that clients are asking. Selling business apps is part of monetization, right ? We can’t wait for it ! Please, dear team, do it for us !!

Thanks !

[import]uid: 3638 topic_id: 7853 reply_id: 40539[/import]

+1
Yes we want native push notifcation even for iOS only. [import]uid: 45018 topic_id: 7853 reply_id: 40590[/import]

Hi,

Just to second that “real” push notifications are a must have for most developments we are asked for right now, that we need to carry on using good sweet :wink: old native dev at the moment, and loose the power of cross-platform compilation Corona is giving us.
Phil

Moving Player

[import]uid: 51301 topic_id: 7853 reply_id: 40635[/import]

+1 [import]uid: 6795 topic_id: 7853 reply_id: 40646[/import]

hi I would very interested in incorporating verse into corona
can you help with this please
[import]uid: 69848 topic_id: 7853 reply_id: 41222[/import]

+1 [import]uid: 40033 topic_id: 7853 reply_id: 41238[/import]

Do we get push notification now ? [import]uid: 21680 topic_id: 7853 reply_id: 41701[/import]

Any new status now ? [import]uid: 61610 topic_id: 7853 reply_id: 42652[/import]

Not going to make it this release.

We are looking for next release and remember to vote up on our roadmap

c [import]uid: 24 topic_id: 7853 reply_id: 42897[/import]

Thanks for the update Carlos. Makes sense given how much is changing in the upcoming IOS 5.0.

As with the prior IOS upgrades, immediately after the release, the new features will be in high demand by the consumer and first apps to support and make good use will have a good appeal.

It will therefore be nice to see how the roadmap shapes up to match IOS 5 and beyond over the next few months.

Keep well. [import]uid: 11904 topic_id: 7853 reply_id: 42993[/import]

Hello Carlos,

Thanks for the heads up. This is so saaad !

Any time frame ? :frowning:
[import]uid: 3638 topic_id: 7853 reply_id: 43117[/import]

Not having push is the +1 reason we have not switched to Corona. [import]uid: 35155 topic_id: 7853 reply_id: 43261[/import]