Page 1 of 1

geolocation push notification problem

Posted: Thu Nov 21, 2013 8:08 am
by Giannis Pelelis

I am trying to build a "messaging" app that uses distance criteria to receive messages.What I mean by that is that

"A-user" can send a message around him on 500 meters.So only "B" users that are 500m close to him can see his message.

I've created a database to upload messages,the coordinations of message and the distance.
I also succesfully build a page to load messages using the distance criteria.

.BUT My problem is on notification
I want to notify the users when a new message arrive.So I decided to use push notifications.
I know how to send a push notification from a device using the $nearSphere query.

My question is ,do every user has to update his location on database(device collection) every 30 seconds,in order to send a push notification??
I mean this is a lot of requests.
Do you have any idea how could I send the push notification from the senter and be seen only by users that around him N-meters?


geolocation push notification problem

Posted: Thu Nov 21, 2013 9:05 am
by Maryna Brodina

Hello! Yes, you have to update current coordinates for each user in collection every N seconds.


geolocation push notification problem

Posted: Thu Nov 21, 2013 9:22 am
by Giannis Pelelis

while I can get every information I need from devices DB(like token and type) ,when I try to update i get an error.
Update service inside appery works fine
but in mobile,something doesn't work..


geolocation push notification problem

Posted: Thu Nov 21, 2013 12:17 pm
by Maryna Brodina

This issue is connected to this one https://getsatisfaction.com/apperyio/... - it's a bug unfortunatelly. Sorry for inconvenience.