Snap to road in android to encrease the accuracy of GPS streaming data

Hello Dear
I’m trying to build a new android navigation app for a research project. Because of lack of enough accuracy in GPS data, I need “snap to road” to encrease the accuracy of GPS streaming data.
<< I need to know can I use Graphhopper map matching algorithm for this purpose?
<<If yes, could you please share some links, methods, classes in android studio where I can use for my project?
<< IF you have a sample code in android that which does snap to road, I would be thankful if u share that with me.
Thank you in advance.

See the code and examples here https://github.com/graphhopper/map-matching