Changes

Jump to: navigation, search

Firefox OS/Stingray/SmartScreen/

2,267 bytes added, 06:11, 3 November 2014
Card UI
= Card UI =
Card UI is the main feature of smart screen. It comprised of smart system, smart home, app deck, device deck, tv deck, settings app, browser app, and dashboard app. Bookmarks or short-cuts in smart home are '''CARDs'''. All decks has the ability to create a card to smart-home app. All decks and apps are normal app in smart-system app. Their relationships can be found as the following figure:
[[File:Stingray_Smart_Screen.png|The relationships among apps]]
== Smart Home ==
 Smart home app is the default home app which hosts decks and cards. Smart home app is the owner of cards data store. It creates a card while a deck sends a '''mozActivity ''' to smart home. And all decks will listen the change event or read the cards record of data store to determine if their cards are already created.
The card can be deleted from both deck and smart home. If card is asked to be removed from a deck, the deck sends a mozActivity to smart home app to remove it. If a card is removed from smart home, the deck may know it by read the record from data store or listen the change event of data store.
According to UX spec, card removed from deck app should not have a transition to smart home app. We may let data store be writable or send a mozActivity to smart system app and send an IAC message to smart home app to tell that. And this is a workaround to archive that.(THE WORKAROUND IS NOT DECIDED, YET)
== Smart System ==
The smart-system app is folk from phone's system app. We may find the smart-system app at {GAIA}/tv_apps/smart-system . We use the custom-prefs.js to switch to smart-system app in TV build, like:  user_pref('b2g.system_startup_url', 'app://smart-system.gaiamobile.org/index.html'); user_pref('b2g.system_manifest_url', 'app://smart-system.gaiamobile.org/manifest.webapp'); user_pref('b2g.neterror.url', 'app://smart-system.gaiamobile.org/net_error.html'); The main difference between phone's system app and smart system app is we introduce landing app in smart system. Once the device booted, the first app shown to user is '''LANDING APP''' which can be any app users want. Smart system app reads a mozSettings, landing_app.manifestURL, to find out the landing app:  { "homescreen.appName": "smart-home", '''"landing_app.manifestURL": "app://clock.gaiamobile.org/manifest.webapp"''' } Another difference is that smart system app removes lots ICC related modules, like icc, callscreen, dialer_agent, etc. We kept the whole window management, popups, dialogs, toast, orientation manager, sound manager, etc in smart system. Most of them are related to window management and background service. So, the smart system may boot a little faster than phone's system app. According to UX/VD, we will change the behavior of window manager, including the landing app support, animations, launching position, etc. (THE DETAILED CHANGES IS NOT DECIDED, YET) == Decks ==Decks are apps with the ability to '''PIN TO HOME'''. All decks will be shown at smart home app and can be set as the landing app. According to the definition of smart home, a deck can use '''mozActivity''' to pin to home and can have the permission to query if an launch path is pined as a card. A launch path may point to the deck app itself of to another app's launch path. Like TV deck, it may pin a channel as a card whose launch path may the same as TV deck with hash included, ie: apps://tv.gaiamobile.org/#66. Or app deck may pin an app as a card whose launch path may be apps://otherapp.gaiamobile.org/index.html. An example of pin to home may be:  new mozActivity({ name: 'pin-to-home', data: { manifestURL: 'app://tv.gaiamobile.org/manifest.webapp', launchPath: '/index.html#66', name: 'Channel 66 - HBO', thumbnail: ref-to-blob } });
Confirm
209
edits

Navigation menu