apps-android-commons icon indicating copy to clipboard operation
apps-android-commons copied to clipboard

Send system notification when user is close to a location on the Nearby Places list

Open nicolas-raoul opened this issue 9 years ago • 20 comments

With the same data as seen at #73

We would probably need to run some server-side code to achieve push notifications. I am not sure we can use Google's push service, so anyone feel free to post ideas of the technology we could use to develop this feature, thanks! Client-side library must be open source and service must be compatible with Wikimedia's privacy policy.

nicolas-raoul avatar Mar 07 '16 08:03 nicolas-raoul

Just clarifying, you mean that the user gets a notification when he is close to (say, 50m) a location that is on the Nearby list?

misaochan avatar Sep 07 '16 04:09 misaochan

I forgot I had created this issue haha Yes, exactly.

nicolas-raoul avatar Sep 07 '16 05:09 nicolas-raoul

I would say it needs some other parameters too. Maybe just a few pop ups a day, so it doesn't get annoying. 100 m seems like a good default, but being able to set the radius would be nice. I am not sure if some users would like to filter by categories, but that can probably wait.

tobias47n9e avatar Sep 07 '16 05:09 tobias47n9e

I agree, probably 1 or 2 notifications a day max, and the option to disable the feature if they want to. I'm not sure how this would work though. I know Google Cloud Messaging is a free service that can do push notifications from the server side, but that isn't open source I think?

misaochan avatar Sep 08 '16 04:09 misaochan

It should be opt-in, or at least very easy to opt-out (via button within the notification for instance, and preferences).

nicolas-raoul avatar May 21 '17 05:05 nicolas-raoul

Is this the same as #259 ?

misaochan avatar Jul 06 '17 13:07 misaochan

That issue's title made it sound similar but the body is a very different idea. I renamed that issue to reflect the body.

nicolas-raoul avatar Jul 07 '17 07:07 nicolas-raoul

Another option for sending push notifications - https://firebase.google.com/docs/cloud-messaging/ . Would this be compatible with our policies?

misaochan avatar Sep 04 '17 09:09 misaochan

I'm not sure what I'm missing but why do you need a server to send push notifications? Couldn't you do that on the client itself?

sivaraam avatar Sep 06 '17 09:09 sivaraam

I also don't think we really need push notifications, it is not like we are a messenging app for talk pages (that could be an idea for another app haha)

Network-wise polling once in a while is actually probably better than waiting for a push all day long.

Push notifications' infrastructure would be heavier in terms of maintenance. It would also become a source of problem when people fork the app and modify it heavily or introduce bugs.

nicolas-raoul avatar Sep 06 '17 09:09 nicolas-raoul

What is described in the initial post maybe would not even be implemented with push notifications but local notifications: It could be a setting the user can opt in, so his app checks regularly (also when only running in background) for relevant locations and then sends a local notification that informs them about it and allows a shortcut to opening the app.

Implementing this with a push notification from a server would actually be more complicated. The app still would have to check the location regularly (also in the background) but then send it to a server that then finds out if there is a POI near by, then sends a push notification to the device. This would introduce a server side component not only to send push to a user (which means all users have to exist in a server side database with their push token connected to some user id) but also to check for a nearby relevant location (which would duplicate logic that is already in the app).

(Discussing technical implementation details almost never makes sense before specifying the actual feature that should be implemented...)

janpio avatar Sep 06 '17 09:09 janpio

Network-wise polling once a day is actually probably better than waiting for a push all day long.

That was what I had in my mind. What's needed is an Android service not a web service.

Implementing this with a push notification from a server would actually be more complicated.

That's true. It's more easier to do it on the client side where all the crucial info is present.

(Discussing technical implementation details almost never makes sense before specifying the actual feature that should be implemented...)

@janpio I thought the feature was notifying an use about a nearby location requiring an image even though the app isn't open.

sivaraam avatar Sep 06 '17 09:09 sivaraam

Kaartic Sivaraam, 06/09/2017 12:52:

@janpio https://github.com/janpio I thought the feature was notifying an use about a nearby location requiring an image even though the app isn't open.

Indeed

nemobis avatar Sep 06 '17 09:09 nemobis

Thanks, all! I did not realize this was achievable without push notifications. That would be helpful indeed. I will modify the title.

I thought the feature was notifying an use about a nearby location requiring an image even though the app isn't open.

Yeah, correct.

As stated at #865 , there are two different suggestions for system notifications, this and #259 (which would only trigger when the user takes a photo near the location, not just by being near the location). Do we want both? Or should we start with #259 , and see how that goes first?

misaochan avatar Sep 06 '17 15:09 misaochan

(Please note my https://github.com/commons-app/apps-android-commons/issues/259#issuecomment-327519106 - I am not sure this was about a notification at all in the beginning)

janpio avatar Sep 06 '17 15:09 janpio

As stated at #865 , there are two different suggestions for system notifications, this and #259 (which would only trigger when the user takes a photo near the location, not just by being near the location). Do we want both? Or should we start with #259 , and see how that goes first?

I guess you would need both to address all kinds of users. Some user would love to take a lot of pictures and would be happy to know that their snap might contribute something to commons. A few others who don't take pictures often all the time would love to take a snap when they come to know a place near them is in need of a picture.

sivaraam avatar Sep 06 '17 17:09 sivaraam

Looks like some other tickets were potentially looking at a similar suggestion, ie, push notifications. As this is 7 years old, do we know whether we still need this ticket open?

Chris.

chrisdebian avatar Dec 20 '24 15:12 chrisdebian

@chrisdebian In such cases would you mind pasting the URL of the similar issues? Thanks!

nicolas-raoul avatar Dec 21 '24 13:12 nicolas-raoul

@chrisdebian In such cases would you mind pasting the URL of the similar issues? Thanks!

Sure, I didn't because it was in the line above.

chrisdebian avatar Dec 21 '24 13:12 chrisdebian

@chrisdebian This issue describes a different feature, even if it uses the same technology. Not need to ask "do we know whether we still need this ticket open" unless there are more reasons to think it should be closed. Thanks!

nicolas-raoul avatar Dec 23 '24 04:12 nicolas-raoul