This question is locked. New answers and comments are not allowed.
Hi, I was trying to setup an end-to-end Push Notifications example using these guides :
*** NOTE that it is this same API key that I am using in the REST URL I am posting to
* I have put the Google API Project number (12 digit number) in the same main.js where it said "GOOGLE_PROJECT_NUMBER" ( in the car androidProjectNumber)
Other symptoms :
* After deploying and running the app for the 1st time, when I hit register, it showed an error on the app's screen saying that registration had failed. However, within a few seconds the app turned up on BackEnd services website under "Devices"
* To enable Push Notifications on the Native Android emulator, I have created an AVD for the Google APIs version 15, and before running the hybrid app, registered a Google account (the same one with the API project) and verified auto-login from the browser.
Why is it working from the website, but not from the REST client ? What am I missing ?
Thanks a lot for your help !
I have created a Backend Service project, added Push Notifications for Android, and on the app side, cloned a project from the "Telerik Baas Push Notification", set it up, deployed to the native Android emulator. At this point I am able to send Push messages from the BackEnd Service's "Push Notifications" > "Push Browser" interface and see what looks like a toast-like message with the raw json Push payload on the app screen (so I presume it is working). However, when I try to follow the examples here to send Push notifications using the same API key but from a REST client (mainly SOAPUI), I get a http 404 error, with a payload of .
For example, to try the equivalent of this :
var
notification = {
"Filter"
: JSON.stringify({
'PlatformType'
: 1
}),
"Message"
:
"A generic message"
};
$.ajax({
type:
"POST"
,
contentType:
"application/json"
,
data: JSON.stringify(notification),
success:
function
(data) {
alert(JSON.stringify(data));
},
error:
function
(error) {
alert(JSON.stringify(error));
}
});
*** NOTE that it is this same API key that I am using in the REST URL I am posting to
* I have put the Google API Project number (12 digit number) in the same main.js where it said "GOOGLE_PROJECT_NUMBER" ( in the car androidProjectNumber)
Other symptoms :
* After deploying and running the app for the 1st time, when I hit register, it showed an error on the app's screen saying that registration had failed. However, within a few seconds the app turned up on BackEnd services website under "Devices"
* To enable Push Notifications on the Native Android emulator, I have created an AVD for the Google APIs version 15, and before running the hybrid app, registered a Google account (the same one with the API project) and verified auto-login from the browser.
Why is it working from the website, but not from the REST client ? What am I missing ?
Thanks a lot for your help !