Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Select Push Notification

Hello Carlos,

You should debug your application. Could you check the component names (they are case sensitive) and are there errors in the console. Please put before the code

codereturn JSON.stringify(checked);/code

this code

codealert(JSON.stringify(checked));/code

Do you have anything displayed in the alert?

Carlos Castillo6909856
Posts: 0
Joined: Tue Jun 03, 2014 12:51 pm

Select Push Notification

No, I don't have any alert set up

Carlos Castillo6909856
Posts: 0
Joined: Tue Jun 03, 2014 12:51 pm

Select Push Notification

I added the code you sent me

Here are the screens, I double checked the variables spelling, they do look ok

Who does invoke the service the actual Checkbox or the GroupLIst? I did put it on both

Here are the screenshots
Image Image Image Image

Hope we can nail this as soon as possible, I have another 3 customers waiting for this feature.

Best

Carlos E

obullei
Posts: 0
Joined: Thu Jun 05, 2014 12:17 am

Select Push Notification

Hello!

There can be a several reasons why code is not called.
Perhaps you call the wrong service in which was inserted this code, or you have an error in your code.
Please check if there are any errors in the console?

Carlos Castillo6909856
Posts: 0
Joined: Tue Jun 03, 2014 12:51 pm

Select Push Notification

Yes that could be the problem, and thats why I ́m trying to provision as much information as possible.

If you could get the time to review the images I enclose so that you couuld give me a more accurate feedback

Thanks in advance

Best

Carlos E

Carlos Castillo6909856
Posts: 0
Joined: Tue Jun 03, 2014 12:51 pm

Select Push Notification

Ok I don't know why but it takes a while the Google Tools start working

Any wat I do recive the Alert message from the App
i.e.
Mensaje de la página appery.io:
[121,122]

Here are the logs from the developers tool
When I start the service:
Remote Address:54.221.205.233:443
Request URL:https://api.appery.io/rest/push/reg/
Request Method:OPTIONS
Status Code:200 OK
Request Headersview source
Accept:/
Accept-Encoding:gzip,deflate,sdch
Accept-Language:es-ES,es;q=0.8,en;q=0.6
Access-Control-Request-Headers:accept, x-appery-app-id, content-type
Access-Control-Request-Method:PUT
Connection:keep-alive
Host:api.appery.io
Origin:http://appery.io
Referer:http://appery.io/app/view/13a50817-47...
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36
Response Headersview source
Access-Control-Allow-Headers:accept, x-appery-app-id, content-type
Access-Control-Allow-Methods:PUT
Access-Control-Allow-Origin:http://appery.io
Connection:keep-alive
Content-Length:0
Date:Fri, 11 Jul 2014 01:08:21 GMT
Server:nginx

Then getting back message
HEADER
Remote Address:54.221.205.233:443
Request URL:https://api.appery.io/rest/push/reg/
Request Method:PUT
Status Code:405 Method Not Allowed
Request Headersview source
Accept:application/json, text/javascript, /; q=0.01
Accept-Encoding:gzip,deflate,sdch
Accept-Language:es-ES,es;q=0.8,en;q=0.6
Connection:keep-alive
Content-Length:24
Content-Type:application/json
Host:api.appery.io
Origin:http://appery.io
Referer:http://appery.io/app/view/13a50817-47...
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36
X-Appery-App-Id:13a50817-4736-4bbb-92e7-c60cbb114320
Request Payloadview source
{channels:[122,123]}
channels: "[122,123]"
Response Headersview source
Access-Control-Allow-Origin:http://appery.io
Connection:keep-alive
Content-Type:application/json
Date:Fri, 11 Jul 2014 01:08:26 GMT
Server:nginx
Transfer-Encoding:chunked

Preview
code: "BCXX004"
description: "No resource method found for PUT, return 405 with Allow header"

Response
{"code":"BCXX004","description":"No resource method found for PUT, return 405 with Allow header"}

We are getting very close, hope with this info you can tell me what am I doing wrong.

Best

Carlos E

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Select Push Notification

Hello Carlos,

You do not appeal to the correct url, you have url:

codehttps://api.appery.io/rest/push/reg//code

But there should be deviceId in the end also

codehttps:&#47;&#47;api&#46;appery&#46;io/rest/push/reg/<deviceId> /code

Please look here for more info:
http://devcenter.appery.io/documentat...

Carlos Castillo6909856
Posts: 0
Joined: Tue Jun 03, 2014 12:51 pm

Select Push Notification

This is the command I do have in URL

https://api.appery.io/rest/push/reg/{...

And at the mapping I do have the Storage Varriable pushNotificationDeviceID
that has the JS:
return encodeURIComponent (value);

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Select Push Notification

Carlos,

Please clarify is local storage variable pushNotificationDeviceID full (is there any data or is it empty)? As I understand you test in the browser? On the device it should be filled with useful data, but in browser do you fill it or not?

Carlos Castillo6909856
Posts: 0
Joined: Tue Jun 03, 2014 12:51 pm

Select Push Notification

It is empty

Yes I did test on the browser how do I fill the DeviceID for testing behind the browser?

Return to “Issues”