Android 如何使用printershare应用程序从我的应用程序中打印pdf文件?

Android 如何使用printershare应用程序从我的应用程序中打印pdf文件?,android,Android,朋友们好, I am developing an application which has a pdf file and I want to take printout of that file.I want to use printershare application in my application,but I didnt know how to move to that application from my application. 另一件事是我想检查应用程序是否安装

朋友们好,

      I am developing an application which has a pdf file and I want to take printout of that file.I want to use printershare application in my application,but I didnt know how to move to that application from my application.

另一件事是我想检查应用程序是否安装在设备上

是否可以像(pdf文件作为输入)那样为该应用程序提供输入

请帮忙


提前感谢

另一件事是我想检查应用程序是否安装在设备上

您可以使用try&catch块来确定是否已经安装了任何可以处理该格式的应用程序,如果尚未安装,则可以指示用户从catch块中的playstore下载应用程序

是否可以像(pdf文件作为输入)那样为该应用程序提供输入

//将用户指向playstore

 Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + packageName));
    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    startActivity(intent);

我如何将我的应用程序中的自定义pdf文件提供给此应用程序(必须打印)。您可以使用此应用程序直接打印pdf。我只使用按钮打印我的pdf文件,因此我如何使用send 2打印机。我认为只有当我们直接单击pdf文件时,此功能才起作用。
 Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + packageName));
    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    startActivity(intent);