4

Intel XDK API と Phonegap API の両方を 1 つのモバイル アプリに統合することは可能ですか? これは、一部の API が Phonegap でのみ使用可能であり、その逆も同様であるためです。

4

2 に答える 2

6

はい、質問を正しく理解していれば、Intel XDK を使用して 1 つのアプリで両方の API にアクセスできると思います。

于 2014-05-02T05:48:10.423 に答える
2

これらのヒントは、XDK で新しい空のプロジェクトをビルドするときに index.html で見つけることができます。

注: intelxdk.js または cordova.js でディレクトリ プレフィックスを使用しないでください。ビルド システム、エミュレータ、およびその他のツールによって自動的に挿入され、index.html ソース ディレクトリにあると想定されます。これらの JS ファイルはプロジェクトのどこにもありません。これらは「ファントム」ライブラリです。これらのファイルのコピーがプロジェクトの一部として表示される場合は、XDK の混乱を避けるために削除する必要があります。

When building with any of the XDK Cordova build systems (e.g., "Cordova Hybrid App") you can
omit the "intelxdk.js" and "xhr.js" script files shown below. It does not hurt to keep them, but
they are not used in that environment, they are only needed for the "legacy" XDK build systems.
(In the case of the Cordova build system, the Cordova and XDK apis are included as plugins
and the CORS configuration is specified as a parameter in the build configuration file.)

答えは「はい」です。両方を使用できます。またAccelerometer、 、Geolocation、またはBaseAPI などの一部の API が非推奨になっていることに気付くかもしれません。インテルでは、これらの機能を使用する代わりに Cordova API を使用することを推奨しています。

xdkコルドバ

ノート:

intelxdk.jsまたはのソース ファイルは見つかりませんcordova.js。ご覧のとおり、これらはPhantomファイルであり、スクリプトに自動的に挿入されます。したがって、両方のスクリプトに追加のソースを追加しないでください。両方のソースのいずれかを削除したい場合は、見つかった対応する行を削除するだけです。 index.html で:

<script src="intelxdk.js"></script>         <!-- phantom library, needed for XDK api calls -->
<script src="cordova.js"></script>          <!-- phantom library, needed for Cordova api calls -->
于 2014-11-30T11:09:54.880 に答える