phonegap アプリケーションで pdf ファイルと ppt ファイルを開こうとしています。phonegap 2.4 と最新バージョンの WebIntent プラグインを使用しています。Webintentで言われた とおりにしました
しかし、私はまだこのエラーが発生します:
参照エラー: WebIntent が定義されていません
ここに私のHTMLヘッドセクションの一部があります:
<script type="text/javascript" src="js/cordova-2.4.0.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.mobile-1.2.0.min.js"></script>
<script type="text/javascript" src="js/webintent.js"></script>
ここに私のconfig.xmlファイルの一部があります
<cordova>
...
<plugins>
...
<plugin name="Globalization" value="org.apache.cordova.Globalization"/>
<plugin name="InAppBrowser" value="org.apache.cordova.InAppBrowser"/>
<plugin name="WebIntent" value="com.borismus.webintent.WebIntent"/>
</plugins>
</cordova>
ここに、プラグインを使用するコードの js 部分があります
function openFile(filePath){
window.plugins.webintent.StartActivity({
action: WebIntent.ACTION_VIEW,
url: filePath},
function(){},
function(){alert("failed to open file")}
);
}
ここで、filePath は「file:///mnt/sdcard/file.pdf」のようなものです
誰かが私が間違っていることを教えてください。PS: phonegap と eclipse は初めてです。