Question

This whole thing started when I began working on an Adobe Air App that was until now a completely single player game. The question I have is whether it is possible to alert a user when it is their turn without using a polling technique ( without continually checking... is it my turn yet? ). The technologies I have at my disposal are pretty much just AIR, PHP, and MySQL. I currently have a shared hosting package with no ssh support in which I am sure I will change soon this year to a dedicated package with ssh support.

With these technologies would that be possible?

The idea / direction I have been going down is.

Setting up a PHP Socket Program to maintain the connection between users and having a common domain the AIR application(s) will connect to. For example. My phone would POST to my.domain.com which would execute a php script to start a Socket Server "exec("php /socket.php"); All users of the application would join a "pool" in the server if it was running in which - my theory is that - I can maintain bidirectional communication with them. The MySQL server can be used to track if the socket is open and who is currently in the pool. Is this possible?

I also think I would not be able to notify users when the app is closed as they would no longer be in the socket.

I'm just wondering if I am way off base here.

Was it helpful?

Solution

If you want to use existing notification ANE, you can get it from here :

ANE-Push-Notification

It works for both IOS and Android.

And if you want to start from scratch, this link is also useful :

Developing Native Extensions with Adobe

OTHER TIPS

After a lot of research, and reviewing many alternative technologies, both ios and android offer native support for notifications to be sent to another device. I think the best option is to build an air native extension or find one that already exists to bridge the gap between the andriod or ios notification system. Here is a good resource to get started http://www.adobe.com/devnet/air/native-extensions-for-air.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top