mozilla-b2g/gaia — pull request #1929 by arcturus (2012-06-26 09:02:38+00:00)
Title: Entry points

# Multiple entry points PoC #

This is a test for trying the support of multiple entry points.

## General Idea ##

In order not to modify a lot of code from the homescreen, this patch follows the idea of creating a 'virtual' application for each entry point we find in a real manifest.

## Modifications ##

+ appmanager.js: here is were we add the 'virtual' apps.
+ window_manager.js: modified to detect if a launch event is comming from an entry point
+ offline_cache.js: need to modify the way we cache the icons.

## manifest.webapp ##

This is the manifest used, also the idea was create an app called 'comms' and inside put the current dialer and contacts app.

{
"name": "Comms",
"description": "Gaia Comms",
"launch_path": "/",
"developer": {
"name": "The Gaia Team",
"url": "https://github.com/mozilla-b2g/gaia"
},
"entry_points": {
"dialer": {
"path": "/index.html",
"name": "Dialer",
"icons": {
"120": "/style/icons/Dialer.png",
"60": "/style/icons/60/Dialer.png"
}
},
"contacts": {
"path": "/index.html",
"name": "Contacts",
"icons": {
"120": "/style/icons/Contacts.png",
"60": "/style/icons/60/Contacts.png"
}
}
},
"permissions": [
"telephony",
"contacts",
"power",
"mozApps",
"mobileconnection",
"background"
],
"icons": {
"120": "/style/icons/Dialer.png",
"60": "/style/icons/60/Dialer.png"
},
"background_page": "/dialer/background.html",
"attention_page": "/dialer/oncall.html",
"orientation": "portrait-primary"
}

== Findings ==
+ use of the name of the entry point to compound the url
+ used the path within the entry point to build the final url
+ right now breaking the background and attention screen :(
+ multiple apps in the task launcher, as long as we are using different origins. (faking the origin as well).
+ in general a bit confusing with all the path appending