Predicting users' next location allows to anticipate their future context, thus providing additional time to be ready for that context and react consequently. This work is focused on a set of LZ-based algorithms (LZ, LeZi Update and Active LeZi) capable of learning mobility patterns and estimating the next location with low resource needs, which makes it possible to execute them on mobile devices. The original algorithms have been divided into two phases, thus being possible to mix them and check which combination is the best one to obtain better prediction accuracy or lower resource consumption. To make such comparisons, a set of GSM-based mobility traces of 95 different users is considered. Finally, a prototype for mobile devices that integrates the predictors in a public transportation recommender system is described in order to show an example of how to take advantage of location prediction in an ubiquitous computing environment.