I'm not sure if this the right forum to post this question. I'm trying to find what is the best option to take photos of planets using smart phone. I have a Google Pixel XL, and I'm looking for a good telescopic lens that can be fitted to phone camera. Has anyone tried this before? Really appreciate any thoughts, suggestions, recommendations to get clear photos with mobile phone camera.
The best option is to attach the phone to a telescope. E.g. Jupiter with a phone and a 10" Dobsonian.
A 10" Dobsonian isn't small, you're attaching the phone to the scope rather than the other way around.
Size illustration of 8" and 12" Dobsonians vs. a 180 cm (5 feet 11") adult. Adapted from astroshop.eu.
The issue is that the angular resolution of a lens, the smallest feature (in arc seconds) the lens can resolve, scales with the aperture diameter. IMO, anything small enough for a phone attachment isn't going to give enough resolution to be worth the trouble. At best you'll get Jupiter as a bright dot and the Galilean moons as fainter dots.
A 'superzoom' bridge camera like the Nikon P900 can do better. At 357mm f/6.5 (2000mm 'equivalent' focal length) that's a 55mm (or 2") aperture, it's a start.
But honestly, you're better off with a telescope. If a Dobsonian is too big, something like a 5" Mak-Cass is fairly portable and can give better planetary pictures at less cost than a superzoom. You'll still need a tripod. The phone can be handheld close to the eyepiece, or you can use a phone adapter (example).
The best planetary pictures are from stacking a large number of individual frames. Look into stacking and editing when you're ready.
If you want to use a mobile phone camera with a telescope, you're going to be limited to what is called "afocal" photography. For this, you set the telescope as normal, with an eyepiece, just as you would for visual use. Then you hold the camera up next to the eyepiece, so that it's looking through the scope just like your eye would.
The important thing is to get the camera lens centered over the eyepiece. You can just handhold it, but it's easier to get repeatable results with some sort of holder. You can get commercial adjustable ones that attach to the scope (often clamped to the eyepiece/focuser), or for a DIY alternative, you can glue a spare eyepiece cap (with a hole in the center) to a cheap phone case.
For phones with both a wide angle and telephoto camera, you're more likely to fill the frame with the telephoto camera, since typical entry level eyepieces have an apparent field of view (AFOV) of around 50 degrees or so (You can get much wider AFOV eyepieces, but they're expensive).
With a bit of practice, You should probably be able to get some good moon photos this way - the moon is basically a gray rock in bright sunlight, so you don't need long exposures.
Other targets may be more of a problem - it depends what the low light performance of the camera is like. With relatively tiny pixels, that's not going to help with sensitivity or noise performance.
While you may be able to get usable images of some of the other planets (they're pretty bright too) and maybe some open star clusters, it's unlikely that you'll be able to do deep sky photos of faint nebulae and galaxies - even using a telescope at prime focus, these need very long exposures (typically lots of multi-minute shots) and a driven mount with very accurate tracking to avoid trailing as the target moves across the sky due to the earth's rotation.
Unless the target fills the frame (like the moon at higher magnifications) you'll probably also need a camera app that allows manual control - if you rely on auto-exposure, then what usually happens is that the camera sees all the black background around your target and cranks the gain/exposure time up to try and get the normal 18% gray result. This usually causes the target to be blown out and heavily overexposed, often losing all the details.
There are adapters to fit the smartphone over the exit pupil of the eyepiece. Just do a search for "astrophotography with smartphone" and you'll get a lot of detailed instructions.