I am Printing Pdf using Google Cloud Printing from my Storage of my phone. i want to use pdf URL by replacing this. How to use URL? For Example: i want to replace /print/test.pdf" to "www.example.com/print/test.pdf"
File file = new File(Environment.getExternalStorageDirectory().getAbsolutePath()+"/print/test.pdf");
Intent printIntent = new Intent(MainActivity.this,PrintDialogActivity.class);
printIntent.setDataAndType(Uri.fromFile(file),"application/pdf");
printIntent.putExtra("title", "Android print demo");
startActivity(printIntent);
Download http://central.maven.org/maven2/commons-io/commons-io/2.4/commons-io-2.4.jar and paste it to your libs folder in Android Studio. Open your Gradle file and inside the dependencies add this "compile files('libs/commons-io-1.3.2.jar')"