2012-12-08 123 views

回答

0

你可以用这个做到这一点:

Intent intent = new Intent(Intent.ACTION_VIEW); 
intent.setDataAndType(path, "application/filetype"); 
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); 


try { 
    startActivity(intent); 
} 
catch (ActivityNotFoundException e) { 
    Toast.makeText(OpenPdf.this, 
     "No app available", 
     Toast.LENGTH_SHORT).show(); 
} 
相关问题