Page 1 of 2

Geolocation & Push

Posted: Wed Feb 26, 2014 11:35 am
by Rafael Martínez

According to the documentation it is possible to send PUSH based on the geolocation of the device.

Image

In our Push console this options is not available:

Image

We need a guide or some help about this feature, and how to send a PUSH from 3rd party application with a geolocation filter.

Thanks in advance.


Geolocation & Push

Posted: Wed Feb 26, 2014 12:00 pm
by Maryna Brodina

Hello!
It's not available because you didn't add into Devices collection column with Geo point type. More information is here
http://docs.appery.io/documentation/b...
http://docs.appery.io/documentation/b...


Geolocation & Push

Posted: Wed Feb 26, 2014 12:31 pm
by Rafael Martínez

Thank you Maryna.

Could you provide us an example of how update of field geopoint from the device?

It is necessary create a custom service for this purpose or exists some predefined API or Service in Appery.IO?


Geolocation & Push

Posted: Wed Feb 26, 2014 2:46 pm
by Maryna Brodina

You have to create service as shown here http://docs.appery.io/documentation/b... (see Update device section)


Geolocation & Push

Posted: Sat Mar 01, 2014 12:29 am
by Rafael Martínez

Appery.IO has very little information on it and doesn't look good.

We always get "PNDU246 GeoPoint should be an array [latitude, longitude]...". in all the ways..... (an array of Long? an array of Strings? a more complex array?)

Some questions about this:

What should be the value type of the Geopoint parameter in the UpdateService (STRING of Object)? (We have tried both ways and always get PNDU246 or ERROR......)

If the value type of the Geopoint in the UpdateService is STRING, what's the format of the string? Could you provide us an example please?

If the value data is Object (I suppose an array)? Could you provide us an example please? Whats the correct array format?

A. [40, -4] ?
B. ["latitude": 40, "longitude": -4]?
C. ["Latitude": 40, "Longitude": -4] ?
D. ["Lat": 40," Lon": -4] ?
E [__type: Geopoint, Latitude 40, Longitude: -4] ?
F ["40", "-4"]??
G.....

We have tried to do this in all the ways and we always get ERROR o PNDU246.

(We are about to put off Appery.IO PUSH and come back to another PUSH provider.)


Geolocation & Push

Posted: Sat Mar 01, 2014 12:59 am
by Rafael Martínez

This is our UpdateService configuration:

Image

Image

Image

What's wrong? We always get PNDU246 "GeoPoint should be an array [latitude, longitude]..." or BCXX004 "No resource method found for PUT, return 405 with Allow header"


Geolocation & Push

Posted: Sat Mar 01, 2014 1:11 am
by Illya Stepanov

Hi Rafael, some DB Column with datatype: 'Geo point', with value for example looks like: code[48.208, 16.373]/code


Geolocation & Push

Posted: Sat Mar 01, 2014 1:18 am
by Rafael Martínez

OK, but, how do you update that value through a UpdateService? We always get error message PNDU246 "GeoPoint should be an array [latitude, longitude]..." or error message BCXX004 "No resource method found for PUT, return 405 with Allow header"

We have followed the steps in the docs, but there is no example of how to update the value of the Geopoint, only for Channels, TimeZone, etc...


Geolocation & Push

Posted: Sat Mar 01, 2014 1:21 am
by Illya Stepanov

Please post the Test tab results with these error cases.


Geolocation & Push

Posted: Sat Mar 01, 2014 1:31 am
by Rafael Martínez

IIlya, we cannot use de Test Tab because the PushNotificacionID has a ";".

We are testing directly in the device using

encodeURIComponent(localStorage.getItem('pushNotificationDeviceID'))

as deviceId parameter in the request of the service.