I am working through this tutorial https://developers.google.com/cloud-print/docs/android for google cloud print. I am trying to add a print functionality to my application. However I have NO IDEA what docUri stands for/means/definition. I am trying to print the file “/sdcard/StudentLatePass.txt”
This is what I have so far,
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
docUri – URI of the document to be printed.
What is a URI? A uniform resource identifier (URI) is a string of characters used to identify a name or a resource (Wiki URI).
I think that you can set it using: