Codeigniter library for working with Google Cloud Messaging
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Codeigniter library for working with Google Cloud Messaging

Based on code of c2dm package, (c) 2011 & 2012

Simple example of usage:

// controller
public function send_gcm()
	// simple loading
	// note: you have to specify API key in config before
	// simple adding message. You can also add message in the data,
	// but if you specified it with setMesage() already
	// then setMessage's messages will have bigger priority
		$this->gcm->setMessage('Test message '.date('d.m.Y H:s:i'));
	// add recepient or few
		$this->gcm->addRecepient('New reg id');
	// set additional data
			'some_key' => 'some_val'
	// also you can add time to live
	// and unset in further
	// set group for messages if needed
	// or set to default
	// then send
		if ($this->gcm->send())
			echo 'Success for all messages';
			echo 'Some messages have errors';
	// and see responses for more info
	die(' Worked.');