[aerogear-dev] Sndroid Background push notifications not working

delalis delalis at gmail.com
Wed Jun 3 16:22:14 EDT 2015


Hi Sebastien, I tried to post to my REST server using the push.register()
function.  My PHP REST server receiving the call, but it doesnt look like
the JSON payload is in either the _GET or _POST params.

is there anything I am doing wrong?

var pushConfig = {
	pushServerURL: window.localStorage.getItem("site_path")+"/register_device",
	alias: "test",
	android: {
	senderID: "46901159####",
		          variantID: "test",
		          variantSecret: "test"
	}
};
		
push.register(onNotification, testSuccessHandler, testErrorHandler,
pushConfig);
-----------------------------------------------------------------------------------

Then on the PHP server I am doing this:
$allVals = "";
	
foreach ($_GET as $key => $value) {
		$allVals.= $key."=>".$value.", ";
}	
foreach ($_POST as $key2 => $value2) {
		$allVals.= $key2."=>".$value2.", ";
}	
watchdog('mobile_handler', 'all params passed:'.$allVals);
print($allVals);
---------------------------

My service is logging the transaction, but I am not getting any JSON payload
in either the GET or POST params containing a device token being sent to my
service.  

This is what it is logging (drupal site logs): all params
passed:q=>register_device/rest/registry/device,

So you were correct that it is tacking on /registry/device, but where is the
JSON payload??

thoughts?




--
View this message in context: http://aerogear-dev.1069024.n5.nabble.com/Android-Background-push-notifications-not-working-tp11716p11755.html
Sent from the aerogear-dev mailing list archive at Nabble.com.


More information about the aerogear-dev mailing list