Training Mag For most of the examples given in this tutorial yo | Page 9

Example 3/3 5. Web URL print (Auto) Intent intent = new Intent("com.sec.print.mobileprint.action.PRINT"); Uri uri = Uri.parse(“http://www.samsung.com"); intent.putExtra("com.sec.print.mobileprint.extra.CONTENT", uri ); intent.putExtra("com.sec.print.mobileprint.extra.CONTENT_TYPE", “WEBPAGE_AUTO"); intent.putExtra("com.sec.print.mobileprint.extra.OPTION_TYPE", “DOCUMENT_PRINT"); intent.putExtra("com.sec.print.mobileprint.extra.AUTO_RETURN", “TRUE"); intent.putExtra("com.sec.print.mobileprint.extra.JOB_NAME", "Untitled"); startActivity(intent); // Starts Mobile Print //startActivityForResult(intent , 99) // Use this if you want to get result that user pressed Print or just returned back from Mobile Print. 6. Getting Result from Mobile Print (Version 2.00.00 and above) //Call startActivityForResult for getting Result startActivityForResult(intent , 99) // Use this if you want to get result that user pressed Print or just returned back from Mobile Print. @Override protected void onActivityResult(int requestCode , int resultCode, Intent data) { if (resultCode == RESULT_OK){ Toast.makeText(this,”User Pressed Print”, Toast.LENGTH_LONG).show(); } else{ Toast.makeText(this,”User did not press Print”, Toast.LENGTH_LONG).show(); } } 9