Ever noticed how your Android Downloads folder easily gets cluttered with useless files and documents that you viewed once and never needed again? This is especially true of PDF files since Chrome can't open them natively and thus hands them over to other applications, the default being Google Drive's PDF viewer. Well, I noticed a strange thing recently: sometimes PDF files would just load in Drive directly and it seemed that my phone's Downloads folder clutter wasn't getting out of hand as fast as it used to. Some investigation was in order.
Turns out that a new feature crept up in Google Drive's 2.3.544.17 release on January 28. If you have that version or the newer 2.3.583.13 installed, you'll see that tapping on PDF links in any app (SMS, Chrome, Twitter, WhatsApp, etc...) will immediately open Drive's PDF viewer and start loading them there. See the screenshot at the top of the post for the blue loading bar. This means that you'll have less tapping and manual jumping around to do, and that the Downloads folder won't get filled with every document you have ever consulted. If you do need to keep the PDF for later, there's a Download button in the overflow menu.
However, and this is the thing that tripped us, not all PDF files will trigger this behavior. We've tried dozens of links and some will load in Drive while the others will still need to be downloaded first. So far, our most accurate observation is that PDF documents with an http link get handed over to Drive directly, whereas https ones still trigger a download in Chrome before being available to open in Drive. Whether this is a technical limitation of secure links, an oversight, or a work in progress, we can't tell for sure.
Left: Drive PDF viewer loading an http file directly (Download button in overflow menu)
Right: Drive PDF viewer opening a downloaded https file (no Download button)
Regardless, that's definitely a welcome change from the previous behavior. Chances are that most of the useless documents that messed up your Downloads folder, like restaurant menus and support manuals that you consulted once, came from http links so you will be able to view them without them staying permanently on your device.
By now, everyone should already be on Google Drive 2.3.544.17 or the newer 2.3.583.13, both of which have the option available. If not, you can manually grab them from APK Mirror.