[英]download pdf and open it in google doc with download notification
我想制作一个按钮,每当用户按下该按钮时,都会下载 PDF 并且 pdf 在谷歌文档或任何其他 pdf 阅读器中打开。
并且 pdf 将从 url 提供。
我正在使用 java 编程语言。 帮我做这件事。
hii Buddy,我们有很多方法可以在 Google Docs 中打开 pdf 文件
android 意向
String pdfurl = "http://www.example.com/abcd.pdf";
String googleDocsUrl = "http://docs.google.com/viewer?url="+pdfurl;
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.parse(googleDocsUrl ), "text/html");
startActivity(intent);
web视图
WebView webview = new WebView(this);
setContentView(webview);
webview.getSettings().setJavaScriptEnabled(true);
webview.loadUrl("example.com/abc.pdf");
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.