I am new in android development platform.
I am developing a pdf reader, as android don't have any native pdf
viewer so i have to use third party pdf viewer.
in that case i have chose the Adobe pdf viewer for android.
I can open pdf file which are stored in sdcard of my device.
Now i want to open password protected pdf file from my application.
If user wants to open password protected pdf file manually then use
have to provide password while opening.
but i want to open those password pdf file from my application without
any password prompt.
Application provide the password,[apps knows the password] and without
any password prompt, pdf will open.
currently if i want to open any password protected pdf file from my
application then a password prompt is appeared and needs a password to
open it.
I am using this code to open pdf from my stored pdf files in the
SDCARD.
====
File pdfFile = new File(fileLocation);
if (pdfFile.exists())
{
Uri pdfFilepathUri = Uri.fromFile(pdfFile);
Intent intent = new Intent(Intent.ACTION_VIEW); //Set Intent
action view pdf file
intent.setDataAndType(pdfFilepathUri, "application/pdf"); //
Set data type
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
try
{
startActivity(intent); //Start
Activity
}
catch (ActivityNotFoundException e)
{
Toast.makeText(this,"No Application Available to View PDF :
"+fileLocation,Toast.LENGTH_LONG).show();
}
}
else
Toast.makeText(this,"File cannot found :
"+fileLocation,Toast.LENGTH_SHORT).show();
====
can anybody please help how can i provide the password from the
application, so that it can open pdf file automatically without
prompting any password window.
?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en