Google Now as mentioned above does this depending on what you are looking for. I know that there was recently an article on Android central about the power of Google Now that covered some of these features. You can tell it "remind me to buy milk next time I'm at _______ (insert favorite store here)." It will tell you next time your phone pings in at that point to buy milk. I don't know if that is specifically what you are looking for but it does a very good job from what I have experienced.