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
http://php.net/manual/en/function.http-get-request-body.php or something
like that.
On Wed, Jun 3, 2015 at 10:22 PM, delalis <delalis(a)gmail.com> wrote:
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-notific...
Sent from the aerogear-dev mailing list archive at
Nabble.com.
_______________________________________________
aerogear-dev mailing list
aerogear-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/aerogear-dev