Building an open-source, free cycling Android app using OSM

My university project is to build an open-source, free cycling android app via OSM. We intend to piece together an app that provides maps, along with cycling-focused routing. We’re quite stuck with how to create this app though. We initially used mapbox, but realised that it wouldn’t be truly free if a certain number of users download the app. We came to the idea of using Mapsforge and using YOURS routing over the top of it, but we now realise that it seems that mapsforge is only an offline solution, and would end up taking a lot of storage space for the user’s phone. We do want both online and offline options, but want it to be by the users choice. Another option is to use OpenMapTiles but supposedly it doesn’t support routing. As such, we’re currently at a roadblock on how to go forward with this project. We’ve seen other apps that seem to route, such as CycleStreets etc. which make use of an OSM tile server, but we worry that with too many downloads potentially, we would not be able to make use of third-party tile servers. Any advice on how to approach this would be very appreciated, we are all new to OSM and app development, so we hope that this question is clear and our attempted methods make sense.

Did you evaluate OsmAnd? Available at Google Play. Uses off-line maps.

I don’t have experience with the Mapbox mobile SDKs, but would have expected that you can also use custom styles that point to other/your own services like you can do with Mapbox GL JS.

Using offline MBTiles seems to require patching the code according to OpenMapTiles.org:

Maybe see also Building a Navigation App using Open Source Tools - GraphHopper Directions API.

Isn’t YOURS super outdated? http://yournavigation.org/ says “Routing data from planet file: 2014-09-02”.

You probably are aware of the Routing and Frameworks wiki pages?

Maybe mapsforge/vtm would be an alternative, it seems to support multiple tile sources.

Ideally you would be hosting your own services (see also Switch2OSM) and the university might have the resources to do that. You then could also host the CyclOSM map style. There are plenty of open source routing/map/geocoding stacks to choose from. I guess the difficulty is to have the same routing engine and map style both on- and offline.

Or maybe you could collaborate with the University of Heidelberg that develops and provides Openrouteservice?

In addition to the advice above, probably the best thing I could suggest would be to concentrate on providing maps (of whatever sort) for a relatively small area initially. You can look at the data sizes at http://download.geofabrik.de/ to get an idea of how much OSM data there is in a certain area. For raster map tiles, a fairly run on the mill desktop PC or equivalent virtual server can handle http://download.geofabrik.de/europe/great-britain.html (which is 1GB of .osm.pbf file). For offline maps, I’m not sure about the Mapbox GL option but for OsmAnd’s .obf format it takes me a couple of minutes to process http://download.geofabrik.de/europe/great-britain/england/north-yorkshire.html (38MB of .osm.pbf).

Getting cycle routing “right” for a particular type of cyclist could be challenging - I suspect there’s quite a lot of “secret sauce” involved behind sites such as https://cycle.travel/ and other similar sites (taking into account non-OSM data such as climbs, traffic frequency, urban / rural etc.). Some cyclists just want to get there quickly, some are going for a scenic tour, some just pootling about with the family.

For a university project I’d make sure at the outset that you’ve said up-front what you’re planning to deliver and that you don’t “over promise” - you’ll obviously encounter setbacks on the way through and how you deal with those will be considered when the project is evaluated at the end.