MinkZzii
Android Fan
Profile
Posts: 1
Reg: Jun 05, 2012
Thailand
10
06/06/12 12:04 AM (13 years ago)

Emulator can not show PDF file. It's show No Application available to view pdf

I install AdobeReader.apk in emulator already. My code is .. Uri path = Uri.parse("android.resource://" + getPackageName() + "/ R.raw.tipi1.pdf "); Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(path, "application/pdf"); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); try { startActivity(intent); } catch(ActivityNotFoundException e) { Toast.makeText(this, "No Application available to view pdf", Toast.LENGTH_LONG).show(); } When I run It can not show pdf file and it show message "No Application available to view pdf"
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
06/06/12 06:58 AM (13 years ago)
Emulator can show a PDF if you provide an application for it to do so. Download your favorite PDF app. But it's a good reminder that your app users will run into the same issue. Fred
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.