Reviews/B2G/AppUpdates: Difference between revisions

Jump to navigation Jump to search
Line 26: Line 26:
# If there is an update for an app, the process depends on whether the app is packaged/hosted or removable/non removable:
# If there is an update for an app, the process depends on whether the app is packaged/hosted or removable/non removable:


#Non-removable Packaged Apps (http://mxr.mozilla.org/mozilla-central/source/dom/apps/src/Webapps.jsm#1225)
*Non-removable Packaged Apps (http://mxr.mozilla.org/mozilla-central/source/dom/apps/src/Webapps.jsm#1225)
#* No updated as part of webapps process - these are updated with a system update process
*# No updated as part of webapps process - these are updated with a system update process


#Non-removable Hosted Apps (http://mxr.mozilla.org/mozilla-central/source/dom/apps/src/Webapps.jsm#1230 onwards)
*Non-removable Hosted Apps (http://mxr.mozilla.org/mozilla-central/source/dom/apps/src/Webapps.jsm#1230 onwards)
#* Just check if new app cache manifest is available
*# Just check if new app cache manifest is available
#* If so, do async download of manifest contents
*# If so, do async download of manifest contents


#Removable Packaged Apps (http://mxr.mozilla.org/mozilla-central/source/dom/apps/src/Webapps.jsm#1122)
*Removable Packaged Apps (http://mxr.mozilla.org/mozilla-central/source/dom/apps/src/Webapps.jsm#1122)
#* Send a 'Webapps:CheckForUpdate:Return:OK' event (from webapps.jsm)
*# Send a 'Webapps:CheckForUpdate:Return:OK' event (from webapps.jsm)
#* Set properties of the update on the app object, then fire a downloadavailable event
*# Set properties of the update on the app object, then fire a downloadavailable event
#* Event caught in system app (updatable.js) which adds itself updates queue in update manager (UpdateManager.js)
*# Event caught in system app (updatable.js) which adds itself updates queue in update manager (UpdateManager.js)


#Removable Hosted Apps (http://mxr.mozilla.org/mozilla-central/source/dom/apps/src/Webapps.jsm#1149)
*Removable Hosted Apps (http://mxr.mozilla.org/mozilla-central/source/dom/apps/src/Webapps.jsm#1149)
#* Update web apps registratation (system messages & web activities)
*# Update web apps registratation (system messages & web activities)
#* Store the new manifest
*#  Store the new manifest
#* Update the webapps registry
*# Update the webapps registry
#* If not updatable then send Webapps:CheckForUpdate:Return:OK message to fire a downloadapplied event
*# If not updatable then send Webapps:CheckForUpdate:Return:OK message to fire a downloadapplied event
#* Else, Start app cache update (nsOfflineCacheUpdateService::CheckForUpdate)
*# Else, Start app cache update (nsOfflineCacheUpdateService::CheckForUpdate)
#* Observer for this update sends Webapps:CheckForUpdate:Return:OK, when check has been done.
*# Observer for this update sends Webapps:CheckForUpdate:Return:OK, when check has been done.
#* downloadapplied/downloadavailable event caught in system app (updatable.js) which adds itself updates queue in update manager (UpdateManager.js)
*# downloadapplied/downloadavailable event caught in system app (updatable.js) which adds itself updates queue in update manager (UpdateManager.js)


===Download App Update===
===Download App Update===
canmove, Confirmed users
1,220

edits

Navigation menu