Printing via Google Cloud Print

前端 未结 1 1067
深忆病人
深忆病人 2021-01-05 17:44

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,

相关标签:
1条回答
  • 2021-01-05 18:31

    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/*");
    
    0 讨论(0)
提交回复
热议问题