android - Google 云打印应用的打印 Intent

标签 android google-cloud-print

截至今天,Google 的官方云打印文档仍然告诉您将 PrintDialogActivity 包含到您的应用程序中以使用 Google 云打印打印文档。但是,现在也可以使用官方的 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 目前不起作用。

关于android - Google 云打印应用的打印 Intent ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17383588/

相关文章:

android - 通过谷歌云打印打印

android - 如何使用 onInterceptTouchEvent 从 RecyclerView 中点击特定 View ?

android - Debian 8.3 Jessie 64 位上的 AAPT 错误

firebase - 如何向 Google 云打印进行身份验证

android - 使用热敏打印机进行 Google 云打印

php - 通过 PHP 进行谷歌云打印

c# - 使用 C# 的谷歌云打印

android - 加载布局时出现异常 : java. util.LinkedHashMap.eldest()Ljava/util/Map$Entry;

android - 如何知道图像是否太暗以至于需要使用 OpenCv 进行闪光

android - 隐藏软键盘的方法不影响android中edittext的功能