PDA

View Full Version : مشکل این کد چیست؟



amirrezaq
چهارشنبه 11 تیر 1393, 23:51 عصر
با عرض سلام و خسته نباشید
من یک فایل به نام test.pdf دارم...
کد زیر رو برای اجرای اون توسط برنامه پیش فرض دیوایس به برنامه دادم...
File pdfFile = new File("file:///android_assets/test.pdf");

Uri path = Uri.fromFile(pdfFile);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.setDataAndType(path, "application/pdf");

startActivity(intent);


;



زمانی که برنامه ادوبی ریدر باز میشه پیام the document pach is not valid رو نشون میده...
حالا میخواستم بپرسم آدرس دهی کجاش مشکل داره؟
با تشکر