Confirmed with the engineers that Android doesn't have an embedded PDF viewing capability, like iOS. So you will have to open it externally by using window.open() or linking to it like you did with the button.
This script should work for both cases:
setTimeout(function() {
var pdfFile = "path/to/file.pdf";
if(navigator.userAgent.match(/Android/i)) {
window.open(pdfFile);
} else {
window.document.location.href = pdfFile;
}
}, 100);
You can also use window.open() for iOS, but the experience will be different, as that will open the PDF in the iOS In-App Browser.
- Mike