前回は,
Hosted Appsとは
Hosted Appsの基本的な考え方は,
サーバー側では任意の言語やWeb技術を利用し,
Hosted Appsの作成方法
Hosted Appsは,
WebアプリをHosted Appsとして公開する場合,
- exampleApp/
- manifest.
json - icon_
128. png
- manifest.
任意の名前のフォルダを作成し,
マニフェストファイルとアイコンの作成
マニフェストファイルは,
{
"name": "exampleApp",
"description": "Hosted Apps Example",
"version": "1",
"app": {
"urls": [
"*://example.com/apps/",
"*://example.com/mail/"
],
"launch": {
"web_url": "http://example.com/apps/"
}
},
"icons": {
"128": "icon_128.png"
},
"permissions": [
"unlimitedStorage",
"notifications",
"geolocation",
"background"
]
}
マニフェストファイル中の
アイコンファイルには,
ほかにも,
この例では,
その他のHosted Appsで設定するマニフェストファイルの内容については,
表1 Hosted Appsのマニフェストファイル詳細
フィールド名 | 必須 | 説明 |
---|---|---|
name | ○ | Webアプリの名前 |
description | Webアプリの説明 | |
version | ○ | バージョン番号 ドット区切りの数字 |
app | ||
urls | Webアプリで利用するURL ワイルドカードを利用できます。また, |
|
launch | ||
web_ |
○ | Webアプリの最初のページ |
container | Webアプリが起動するコンテナの形態 |
|
height | containerに |
|
width | containerに |
|
icons | ||
128 | ○ | Chrome Web Storeおよび, |
minimum_ |
Webアプリがインストール可能なChromeブラウザの最低バージョン | |
permissions | Webアプリに対するアクセス許可 |