mpcjanssen / simpletask-android

GNU General Public License v3.0
545 stars 124 forks source link

Geofence based threshold linked to contexts #888

Open y2kbugger opened 6 years ago

y2kbugger commented 6 years ago

It would be great to link context to a physical geofence based context. Then a filter option could be "Only show items that are within contextgeofences."

https://developers.google.com/location-context/geofencing/

Then my high-priority widget would show only the home geofence to contacts when I'm at home and modify that when at work or other places such as the stores that I've fenced.

I think a notification could be linked to this somehow though I don't know how to do that in an unobtrusive but also useful way.

smichel17 commented 6 years ago

It's hard to tell from mobile, but it looks like that API might be a proprietary Google one, not a part of base android.

y2kbugger commented 6 years ago

If it is part of Google services does that affect us due to licensing?

On Fri, Apr 6, 2018, 01:23 smichel17 notifications@github.com wrote:

It's hard to tell from mobile, but it looks like that API might be a proprietary Google one, not a part of base android.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mpcjanssen/simpletask-android/issues/888#issuecomment-379151243, or mute the thread https://github.com/notifications/unsubscribe-auth/AF0arT6AM7N8MWKxj1XGL8EDY65JPQxNks5tlvu1gaJpZM4TJPG7 .

smichel17 commented 6 years ago

Not certain, but it affects my willingness to build or use a tool that relies on such a feature.

y2kbugger commented 6 years ago

Actually don't think that this is proprietary API. https://developer.android.com/training/location/geofencing.html

It just allows you registry function call back whenever you cross a certain perimeter.

I think the scary one is snapshots: https://developers.google.com/awareness/android-api/snapshot-get-data

This one takes into account location plus what kind of motion you're doing, and other physical status is based on all the sensors.

It would be really useful to tie a context to its IRL context location.

smichel17 commented 6 years ago

I can't find an actual API reference, though. Eg, later in that guide they have a dependency on Google Play Services. https://developer.android.com/guide/topics/location/transitions.html#setup

y2kbugger commented 6 years ago

ohhh see that. Hmmm.

On Apr 8, 2018 10:24, "smichel17" notifications@github.com wrote:

I can't find an actual API reference, though. Eg, later in that guide they have a dependency on Google Play Services. https://developer.android.com/guide/topics/location/transitions.html#setup

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mpcjanssen/simpletask-android/issues/888#issuecomment-379554420, or mute the thread https://github.com/notifications/unsubscribe-auth/AF0arVIsaOFtN2CT8Veim7szg-Zyhha7ks5tmh2WgaJpZM4TJPG7 .

mpcjanssen commented 6 years ago

A dependency on google play services is a no-go.

y2kbugger commented 6 years ago

So it appears you can use Location Manager to get location, but you can't set the callbacks. Not sure how refreshing a widget gets triggered/polled.

https://stackoverflow.com/questions/17726728/get-location-without-google-play-services-android

https://developer.android.com/guide/topics/location/strategies.html

It would be possible to set filter based of being with a certain radius of a Coordinate.

On Mon, Apr 9, 2018 at 4:55 AM, Mark Janssen notifications@github.com wrote:

A dependency on google play services is a no-go.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mpcjanssen/simpletask-android/issues/888#issuecomment-379682070, or mute the thread https://github.com/notifications/unsubscribe-auth/AF0arZaJayCqDbZnVKiEp3bVvRQBv2JTks5tmyHngaJpZM4TJPG7 .

dsjoho commented 6 years ago

Another option would perhaps be to allow intents to be received by simpletask for specific widgets, and have an already geofencing-capable app like llama send them?

mpcjanssen commented 6 years ago

@dsjoho that would be a more palatable option.