Confirmed users
353
edits
| Line 24: | Line 24: | ||
If we access the download api from the system app we don't have the child/parent separation because the system app runs in the parent. The system app is chrome code so this should be fine. | If we access the download api from the system app we don't have the child/parent separation because the system app runs in the parent. The system app is chrome code so this should be fine. | ||
Notes from Aus about how activities open file after it is downloaded: | |||
By default with B2G we will always Save To Disk *first*. After the file is downloaded and saved to disk we will then route it to the appropriate application when it's "pressed" (either from the notifications or the downloads list in the Settings). | |||
You can see where we default to save to disk here: | |||
https://mxr.mozilla.org/mozilla-central/source/b2g/components/HelperAppDialog.js | |||
Once the content is downloaded and the user opts to open it, it will go through this: | |||
https://mxr.mozilla.org/mozilla-central/source/b2g/components/ContentHandler.js | |||
Which in turn, will call this: | |||
https://github.com/mozilla-b2g/gaia/blob/5ffb0c1dbe1d4af68713c681baff6698665bbf5a/shared/js/mime_mapper.js | |||
Which will actually help launch the right activity (based on the applications registered types, in the application web manifest.) | |||
== Gaia == | == Gaia == | ||