Recommend this page to a friend! |
![]() ![]() |
Info | ![]() |
![]() ![]() |
Reputation | Support forum (1) | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not yet rated by the users | Total: 1,342 | All time: 2,869 This week: 237![]() |
Version | License | PHP version | Categories | |||
gcm 1.0.0 | Freely Distributable | 5.3 | PHP 5, Wireless and Mobile, Web services |
Description | Author | |||||||||||||||||||||||||
This package can send messages to Android applications using Google Cloud Messaging. Innovation Award
|
|
GCMApplicationServer ==================== [](https://travis-ci.org/Web-Power/GCMApplicationServer) This is a port to PHP of the official [com.google.android.gcm.server JAVA package](http://developer.android.com/reference/com/google/android/gcm/server/package-summary.html). Usage ----- ````php $sender = new \WebPower\gcm\server\Sender('your google cloud messaging api key'); $message = \WebPower\gcm\server\Message::builder() ->addData('message', 'Hoi') ->build(); // Send to a single device using text/plain $result = $sender->singleSendNoRetry($message, 'registration id'); // or to multiple devices using application/json $result = $sender->sendNoRetry($message, array('registration id', 'another registration id')); echo $result; // all value objects support __toString just like the Java code ```` The Api key can be generated at the [apis console](https://code.google.com/apis/console/) Registration ids are obtained by the Android App when it registers itself on the GCM service. It should be forwarded to your PHP code. Installation ------------ ```` composer.phar require webpower/gcm-application-server ```` |
![]() |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() |
||||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Doc. | Documentation | ||
![]() ![]() |
Example | Example script |
![]() |
/ | src | / | WebPower | / | gcm | / | server |
File | Role | Description |
---|---|---|
![]() |
Class | Class source |
![]() |
Class | Class source |
![]() |
Class | Class source |
![]() |
Class | Class source |
![]() |
Class | Class source |
![]() |
Class | Class source |
![]() |
Class | Class source |
![]() |
Class | Class source |
![]() |
Class | Class source |
![]() |
Class | Class source |
![]() |
Class | Class source |
![]() |
Class | Class source |
![]() |
Class | Class source |
![]() |
/ | test | / | WebPower | / | gcm | / | server |
File | Role | Description |
---|---|---|
![]() ![]() |
Test | Unit test script |
![]() ![]() |
Test | Unit test script |
![]() ![]() |
Test | Unit test script |
![]() ![]() |
Test | Unit test script |
![]() ![]() |
Test | Unit test script |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.
Related pages |
Build status . |
Packagist package Packagist package |