截至今天,谷歌官方的“云打印”文档仍然要求您将PrintDialogActivity集成到您的应用程序中,以使用Google Cloud Print打印文档。然而,现在也可以使用官方的Google Cloud Print应用程序进行打印。但我找不到相关文档。
Intent printIntent = new Intent(Intent.ACTION_SEND);
printIntent.setType("text/html");
printIntent.putExtra(Intent.EXTRA_TITLE, "some cool title for your document");
printIntent.putExtra(Intent.EXTRA_STREAM, uri);
startActivity(printIntent);
这是正确的方式。 重要提示: Intent.ACTION_SEND_MULTIPLE
目前不起作用。