SakeTami
MishaalRahman
MishaalRahman

patreon


Android could finally be getting a native PDF viewer

After reading the headline, I know what some of you are probably already thinking: "Mishaal is crazy! Android already has a native PDF viewer app!" It might seem silly, but Android actually can't natively open PDF files.  If you boot up a vanilla build of Android from AOSP and try to open a PDF, nothing happens. That's because, while AOSP does support rendering PDFs, it doesn't ship with an app that can open PDF files out of the box. That could change with an upcoming update to a core Project Mainline module, however.

At the end of last week, multiple patches under the "framework-pdf" topic were submitted to AOSP by a Google engineer. These patches "added [a] new framework-pdf jar inside [the] MediaProvider module." While the patches consist mostly of placeholder code, it seems as though Google is preparing to ship a "PDF viewer inside [the] MediaProvider module." 

MediaProvider, by the way, is a core Project Mainline module that's available on devices running Android 11 and later, and it's responsible for indexing media files in a database and providing access to that database through the MediaStore API. This module also contains the Photo Picker feature introduced in Android 13 that was later backported to Android 11+. Thus, it's possible that Google could backport this to Android 11+ devices through a Play System Update, but it's far too early to say for sure.

This probably isn't very exciting news to most of you. That's because most Android devices already ship with one or more apps that can handle PDF files. Google Drive, for example, is preinstalled on tons of Android phones since it's part of the core GMS suite. Drive has its own PDF viewer, which for all intents and purposes can be considered Android's "native" PDF viewer due to its wide availability. 

However, Google Drive isn't included in AOSP, so Android builds without GMS (like most custom ROMs) have to ship a separate app to handle PDFs. And apparently, Google specifically identified issues like slow scrolling speeds (compared to iOS) and a poor UX when downloading and opening PDFs (since each downloaded PDF has its own notification) as the top reasons for why they're working on a native PDF viewer for AOSP.

I'll keep an eye out to see if this PDF viewer starts appearing in future builds of MediaProvider. I'm not expecting to see it until the first public developer preview of Android 15 drops early next year, though.

Android could finally be getting a native PDF viewer

Comments

I'm not really sure *how* it'll work at this point, I just know it's in the works (Google even told OEMs about it recently).

Side note, my life has improved a lot since Firefox started viewing PDFs natively. No more gosh dang menu PDFs cluttering my Download folder. This change to MediaProvider sounds pretty sweet tho! I wonder how the UI will work - like, would it integrate with DocumentsUI? That's the download and file manager on AOSP after all.

Yeah, I had to double check that I wasn't crazy on this. Asked Chirayu from CalyxOS and Nolen from LineageOS to confirm if their respectively AOSP-based forks had a PDF viewer without GApps; I also booted up an AOSP GSI on my Pixel 6 Pro just to confirm it couldn't open a PDF.

Now that's crazy! I just assumed a PDF viewer was built in...


More Creators