dmfs / opentasks

A task app for Android
Apache License 2.0
940 stars 248 forks source link

Feature requests: Location based alarms #56

Open Lykos153 opened 10 years ago

dmfs commented 10 years ago

The difficult part is to sync location based alarms, since that's not specified in iCalendar.

Lykos153 commented 8 years ago

On the other hand, is it really necessary to sync such things to the server and other devices? By intuition one would create this kind of alarm on the very device which is going to enter the specified area. Maybe this is something that actually should be stored locally.

I have to admit that it could make sense in shared task lists. Like "whoever goes to the supermarket first will be reminded of buying milk".

jkufner commented 8 years ago

Of course it makes sense to sync it. Sync is backup if nothing else. Simply add alarm as X-Something custom field and that's it.

dmfs commented 8 years ago

I think Apple has invented some field to sync the location based alarm. That's probably what we're going to use.

fazlerabbi37 commented 5 years ago

I have been using Tasks for some time now to keep track of my todo(s) and coming from Google Keep, I would absolutely love to see this feature in Tasks.

I don't know much about how the internal working of the app so it may sound dumb but the idea is that for a reminder when a user selects the location option, the user can search for a location or put a lat-long on that field. For location search Nominatim and for server sync Geo URI scheme can be used. When the current location of the device matches the defined location, the alarm can be triggered. The current location can be obtained by both GPS and Network.

Please let me know what you guys think.

jkufner commented 5 years ago

It is possible to use geo: URI in the location field. For example: geo:50.0634378,14.4152958# Jump here.

Note the human-friendly comment part after the #. It is valid URI and it works in Osmand (it opens correct location when clicked).

fazlerabbi37 commented 5 years ago

So I was looking for the open source apps that already have implemented this feature and I stumbled upon this java2s list. It may come in handy!? @dmfs, if time allows, maybe have a look at it?

dmfs commented 5 years ago

thanks @fazlerabbi37. The technology is actually not that difficult. Android provides an API which makes it almost trivial to implement this feature as far as it concerns the actual geo fencing part: https://developer.android.com/training/location/geofencing

At present I'm still working on recurrence though and I didn't ultimately decide yet which feature should be next afterwards.