打印意图谷歌云打印应用 [英] Print Intent for Google Cloud Print App

查看:191
本文介绍了打印意图谷歌云打印应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

截至今日,来自谷歌官方的云打印的文档还告诉你包括PrintDialogActivity到您的应用程序,以打印使用谷歌云打印的文档。然而,它现在也可以使用谷歌官方的云打印应用进行打印。我找不到任何文档,虽然。

As of today, the official Cloud Print documentation from Google still tells you to include the PrintDialogActivity into your app to print documents using Google Cloud Print. However, it's now also possible to print using the official Google Cloud Print app. I couldn't find any documentation for that though.

推荐答案

答案是:pretty的简单,但它还是花了我几天来弄明白:

The answer is pretty straightforward, but it still took me a few days to figure it out:

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 不会在目前的工作

That's the correct way to do it. Important: Intent.ACTION_SEND_MULTIPLE does NOT work at the moment.

这篇关于打印意图谷歌云打印应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆