如何使用Android应用程序在Web视图中呈现pdf文件?

时间:2014-12-15 10:29:35

标签: android web-services pdf

我正在研究与Web服务相关的移动应用程序。当我们在默认浏览器中调用以下服务URL时,将下载pdf文件。

服务网址:http:/demo.com/microeforms/Pages/MicroeForms/Student/StudentProgressReports/StudentReport.aspx?来源= mobileapp& StudentCode = 12/0429& AcademicYearId = 751& AcademicYearText = 2014 - 2015& StudentLevelId = 151& StudentLevelText = Y1& StudentGroupId = 562& StudentGroupText = 1A& BranchId = 100& BranchName = PS02-TEPS& Term = 1

输出:学生进度报告.pdf

但我必须在移动浏览器中调用此服务URL,请告诉我如何在移动应用程序中调用此服务URL以及如何在Web视图中显示下载的pdf文件?

1 个答案:

答案 0 :(得分:2)

尝试这样。



Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://naseformsdemo.agilitylogistics.com/microeforms/Pages/MicroeForms/Student/StudentProgressReports/StudentReport.aspx?Source=mobileapp&StudentCode=12/0429&AcademicYearId=751&AcademicYearText=2014 - "));
startActivity(browserIntent);