Giannis Pelelis
Posts: 0
Joined: Tue Nov 12, 2013 8:20 pm

geolocation push notification problem

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?

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

geolocation push notification problem

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

Giannis Pelelis
Posts: 0
Joined: Tue Nov 12, 2013 8:20 pm

geolocation push notification problem

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..

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

geolocation push notification problem

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

Return to “Issues”