I am trying to embed remote pdf in my application,,,,
this is what i have tried after searching google-
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.pdf);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.parse("http://mydomain.com/downloads/abc.pdf"), "application/pdf");
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
try {
startActivity(intent);
}
catch (ActivityNotFoundException e) {
Toast.makeText(TestPdf.this,
"No Application Available to View PDF",
Toast.LENGTH_SHORT).show();
}
}
Always entering into catch block,,
I have also got the solution for using "https://docs.google.com/viewer/....",,Its working but google gives option to Download the pdf,,,
I am looking for a solution to have an Activity(containing my header and footer) that will embed remote pdf(Not allowing Download),,,,
Thanks