我正在通過本教程https://developers.google.com/cloud-print/docs/android進行谷歌雲打印。我正在嘗試向我的應用程序添加打印功能。然而,我沒有想法什麼docUri代表/手段/定義。我要打印的文件「/sdcard/StudentLatePass.txt」Android - Eclipse - docUri是什麼意思?
這是我到目前爲止,
public void onClick(View v) {
//Print using Google Cloud Print
Intent printIntent = new Intent(StudentActivity.this, PrintDialogActivity.class);
printIntent.setDataAndType(docUri, "text/plain");
printIntent.putExtra("title", "Student Late Pass");
startActivity(printIntent);
}// onClick
});// btnPrintSDFile
這正是我所需要的。你的回答只是確保我按時上大學! – UPGRAYEDD 2012-03-28 18:27:37
沒問題。希望你喜歡畢業;) – Hayden 2012-03-28 19:17:31
@Hayden這個東西不與我的代碼工作..可能是什麼原因可能的原因?它說我也用pdf試過了無效的內容 – Bhupinder 2013-11-29 11:57:52