If you are getting blurry images, it is probably because the autofocus is failing to find the right distance. You should consider the Open Camera application, as, with a suitable device (needs the Android camera2 API and support for manual focus), you can focus manually. The ability to do so will, however, be limited by the screen resolution, so you might not get a better effective resolution than that unless you take some test shots and work out the exact best setting.

Assuming the camera is properly calibrated, setting focus to infinity will probably be best. Don’t use zoom, as zoom on phones is digital and won’t do better than taking at the highest available resolution.