I am trying to print a .txt file that my application saves via FileWriter.
The file it saves is /sdcard/StudentLatePass.txt
When the print button is clicked,
Try this and see what happens:
Intent printIntent = new Intent(StudentActivity.this, PrintDialogActivity.class);
That should resolve the first "red squigglies".
Here is what you could try for the URI problem.
File file = new File("/sdcard/StudentLatePass.txt");
intent.setDataAndType(Uri.fromFile(file), "text/*");