第7章 Cordova Light
7.1. ダウンロード
7.2. スタート
RHMAP JavaScript SDK により、Cordova Light アプリで RHMAP API を使用することができます。Cordova Light は、www ディレクトリーのみを公開する Cordova アプリです。これらのアプリは、HTML、CSS、JavaScript などの標準 web テクノロジーのみを使用します。ネイティブコードは使用されません。
Cordova Light アプリの使用は、Red Hat Mobile Application Platform ホスト型 (RHMAP) の使い方を習得する上で簡単かつ分かりやすい方法となりますが、開発者は標準的な Cordova プラグインの使用に制限されます。
7.2.1. 新規アプリ
サンプルアプリをダウンロードし、すでに RHMAP SDK が組み込まれている新規の Cordova Light アプリを使って開始します。
7.2.2. 既存アプリ
SDK をダウンロードし、feedhenry.js として保存します。
feedhenry.js を Cordova アプリの index.html ファイルと同じ場所 (通常は /www ディレクトリー内) にコピーします。
以下のコードを index.html ファイルに追加します。
<head> <script src="feedhenry.js" type="text/javascript"></script> </head>
7.2.3. セットアップ
fhconfig.json ファイルは /www ディレクトリーにすでに存在している可能性があります。この場合は、このファイルの内容の確認のみが必要になります。
最後に、アプリが RHMAP サーバーと通信できるようにするプロパティーを定義する必要があります。SDK ファイルと同じディレクトリーに、以下の内容の fhconfig.json という新規ファイルを作成します。括弧内の参照部分はプロジェクトの値に置き換えます。
{
"host": "<RHMAP Core host>",
"projectid": "<Project ID>",
"connectiontag": "<Connection tag>",
"appid": "<Client App ID>",
"appkey": "<Client App API key>"
}クライアントアプリとクラウドアプリ間の通信についての詳細は、「Projects - Connections」を参照してください。
7.3. API ドキュメント
- API Docs: すべてのクライアント API についてのドキュメント

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.