2
我正在嘗試將Google雲打印實施到應用中,並遵循Integration Guide。我試圖通過打印google.com來保持其基本。當點擊我創建的打印按鈕,將彈出的對話框中,但我得到一個FileNotFoundException異常,說明如何使用雲打印打印Android活動顯示
java.io.FileNotFoundException:沒有內容提供商: http://www.google.com
如果我再選擇打印機並單擊打印,對話框會給我一個「Document Missing」消息,基於FileNotFoundException有意義。
我從指南中逐字逐句打印了print_dialog.xml和PrintDialogActivity.java。這裏是我的代碼調用活動:
Intent printIntent = new Intent(getActivity(), PrintDialogActivity.class);
Uri docUri = Uri.parse("http://www.google.com");
printIntent.setDataAndType(docUri, "text/html");
printIntent.putExtra("title", "Google");
startActivity(printIntent);
我試圖弄清楚如何打印網頁,但希望最終能夠打印活動顯示。
所以我的問題是:我需要做什麼才能打印網頁或活動顯示?
謝謝,但我已經有它在那裏 – Cameron