C2DM and PHP

bluedude

Well-Known Member
Licensed User
Longtime User
Hi,

Did anyone create a sendmessage sample in PHP with Google C2DM? A Java send message module isn't really practical because not many hosting providers have Java out of the box.

Erel has provided a great sample but unfortunately most hosting environments are on PHP etc. Practically it would be best to have a PHP module that talks to the phone by using C2DM.

Cheers,
 

bluedude

Well-Known Member
Licensed User
Longtime User
Sorry Erel but this isn't a real life option. Don't want to mess around on my hosted environment with Tomcat etc. PHP is that way to go, will figure something out myself.

Of course a desktop tool is maybe nice but not when running a professional environment where everything is done from a server.

Installing java is a problem on most paid hosts :)
 
Upvote 0

thedesolatesoul

Expert
Licensed User
Longtime User
There are some PHP examples on StackOverflow.
Also, if you know Java you can try Google App Engine that has Java support.
Either way, do post some feedback on what you have done.

On a side note, I didnt realise you could use a b4a app as a server and allow devices to communicate with each other using c2dm!
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Don't want to mess around on my hosted environment with Tomcat etc.
A java server is not needed!
Only the JRE (Java runtime) is needed. You should treat the tool as a regular executable and call it (shell) from your PHP.

Note that you do not need to install Java. You should just put the files in a folder and it works.

The tool is quite complicated. It can be of course ported to PHP but it will not be simple.
 
Upvote 0

bluedude

Well-Known Member
Licensed User
Longtime User
Erel,

I really believe you have developed a great solution but JRE needs to be installed right? That would level out a lot of other hosting options.

I think JRE cannot be put in a folder to work or am I totally wrong?
 
Upvote 0
Top