2015-01-17 42 views
-2

我是Android和我的語言英語的開發人員不太好。
我的問題是:
我需要代碼到Android設備上,打開PowerPoint。
並在Android設備上顯示PowerPoint。
請解釋代碼是如何工作的。在Android上打開PowerPoint

回答

1

您可以嘗試使用下面的代碼:

File file = new File("path_to_the_file.ppt"); 
Intent intent = new Intent(Intent.ACTION_VIEW); 
intent.setDataAndType(Uri.fromFile(file),"application/vnd.ms-powerpoint"); 
startActivity(intent); 

而且還有一個Apache POI - the Java API for Microsoft Documents。你可以看看here