<div dir="ltr">Your config looks good, if think it's on the server side that you do something wrong. I'm really rusty on the PHP side, haven't touched that for 10 years :) but make sure you read the body of your POST request , they are no GET requests nor params. Looking on google, looks like you have to use <a href="http://php.net/manual/en/function.http-get-request-body.php">http://php.net/manual/en/function.http-get-request-body.php</a> or something like that.<div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 3, 2015 at 10:22 PM, delalis <span dir="ltr"><<a href="mailto:delalis@gmail.com" target="_blank">delalis@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Sebastien, I tried to post to my REST server using the push.register()<br>
function. My PHP REST server receiving the call, but it doesnt look like<br>
the JSON payload is in either the _GET or _POST params.<br>
<br>
is there anything I am doing wrong?<br>
<br>
var pushConfig = {<br>
pushServerURL: window.localStorage.getItem("site_path")+"/register_device",<br>
alias: "test",<br>
android: {<br>
senderID: "46901159####",<br>
variantID: "test",<br>
variantSecret: "test"<br>
}<br>
};<br>
<br>
push.register(onNotification, testSuccessHandler, testErrorHandler,<br>
pushConfig);<br>
-----------------------------------------------------------------------------------<br>
<br>
Then on the PHP server I am doing this:<br>
$allVals = "";<br>
<br>
foreach ($_GET as $key => $value) {<br>
$allVals.= $key."=>".$value.", ";<br>
}<br>
foreach ($_POST as $key2 => $value2) {<br>
$allVals.= $key2."=>".$value2.", ";<br>
}<br>
watchdog('mobile_handler', 'all params passed:'.$allVals);<br>
print($allVals);<br>
---------------------------<br>
<br>
My service is logging the transaction, but I am not getting any JSON payload<br>
in either the GET or POST params containing a device token being sent to my<br>
service.<br>
<br>
This is what it is logging (drupal site logs): all params<br>
passed:q=>register_device/rest/registry/device,<br>
<br>
So you were correct that it is tacking on /registry/device, but where is the<br>
JSON payload??<br>
<br>
thoughts?<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://aerogear-dev.1069024.n5.nabble.com/Android-Background-push-notifications-not-working-tp11716p11755.html" target="_blank">http://aerogear-dev.1069024.n5.nabble.com/Android-Background-push-notifications-not-working-tp11716p11755.html</a><br>
<div class="HOEnZb"><div class="h5">Sent from the aerogear-dev mailing list archive at Nabble.com.<br>
_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
</div></div></blockquote></div><br></div>