you can't. check https://github.com/barteksc/AndroidPdfViewer#why-i-cannot-open-pdf-from-url
Dude I already did it
Can you shed some light how did you do that? @Atlas789
I used a method that will call the url from the webpage.
Did you use this library to load pdf or the webview?
webview =)
@Atlas789 can u send me the method that u used
Passing the firebase storage url will open without downloading
private void getPdf(String url) {
pdfView.setVisibility(View.VISIBLE);
final InputStream[] input = new InputStream[1];
new AsyncTask<Void, Void, Void>() {
@SuppressLint({"WrongThread", "StaticFieldLeak"})
@Override
protected Void doInBackground(Void... voids) {
try {
input[0] = new URL(url).openStream();
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
@Override
protected void onPostExecute(Void aVoid) {
super.onPostExecute(aVoid);
pdfView.fromStream(input[0])
.pageFitPolicy(FitPolicy.WIDTH)
.enableDoubletap(false)
.load();
}
}.execute();
}