I was not able to find white papers if OpenStreetMap provides an API for any guidance. Maybe there is some other free service for this task?
Nothing is provided directly by the OpenStreetMap project, but there are other parameters provided using OpenSteeetMap data, such as the MapQuest Open Directions API Service .
As for your question and Android's drawing route on openstreetmap, I found your api API, which is free to use.
The routing API is open and accessible to everyone, provided that you do not overload the server. Server congestion in this context means: more than 1 request per second for extended periods of time.
Here is a sample request that I used to replace the Google Direction Api:
http://www.yournavigation.org/api/1.0/gosmore.php?flat=28.6337465&flon=77.35780799999999&tlat=28.6388179&tlon=77.3606496&format=geojson
You can use https://openrouteservice.org/
It has a comprehensive description and it is free.