Closed
Bug 741608
Opened 13 years ago
Closed 13 years ago
Create homescreen shortcut for installed app
Categories
(Firefox for Android Graveyard :: Web Apps (PWAs), defect)
Tracking
(blocking-kilimanjaro:+, firefox15 verified)
Tracking | Status | |
---|---|---|
firefox15 | --- | verified |
People
(Reporter: Harald, Assigned: mfinkle)
References
Details
(Whiteboard: [Phase1])
Attachments
(1 file, 1 obsolete file)
6.37 KB,
patch
|
wesj
:
review+
|
Details | Diff | Splinter Review |
On app install, create a launch shortcut on the homescreen.
It should not create duplicates, use the correct device-specific icon size.
When added, the shortcut should use the WEBAPP intent.
Updated•13 years ago
|
Whiteboard: [WebRT:Phase1] → [Phase1]
Updated•13 years ago
|
Whiteboard: [Phase1]
Updated•13 years ago
|
Whiteboard: [Phase1]
Assignee | ||
Comment 1•13 years ago
|
||
Dupe of bug 741431?
Comment 2•13 years ago
|
||
Yeah. bug 741431 already encompasses the task for this bug.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
Reporter | ||
Comment 3•13 years ago
|
||
I'd disagree, bug 741431 is about additional install options because Soup had them, but is a UX bug, which is to be solved by UX at this point. As those options did not pop up during the UX flows so far, I'd rather go with no options and create a shortcut by default; at least until we have a flow defined.
Though this bug is a basic implementation bug, and just describes the behavior we have defined for now.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Updated•13 years ago
|
Status: REOPENED → NEW
Updated•13 years ago
|
Whiteboard: [Phase1] → [Phase1] [marketplace-beta?]
Assignee | ||
Comment 4•13 years ago
|
||
(In reply to Harald Kirschner from comment #0)
> On app install, create a launch shortcut on the homescreen.
>
> It should not create duplicates, use the correct device-specific icon size.
We don't have a way to tell if a shortcut exists
Updated•13 years ago
|
Whiteboard: [Phase1] [marketplace-beta?] → [Phase1]
Reporter | ||
Comment 5•13 years ago
|
||
(In reply to Mark Finkle (:mfinkle) from comment #4)
> (In reply to Harald Kirschner from comment #0)
> > On app install, create a launch shortcut on the homescreen.
> >
> > It should not create duplicates, use the correct device-specific icon size.
>
> We don't have a way to tell if a shortcut exists
There is a hidden flag for shortcut creation that prevents dups: https://github.com/mozilla/soup/blob/master/src/org/mozilla/labs/Soup/plugins/MozAppsPlugin.java#L323 . It is not silent; when the shortcut already exists, the user will get a toast.
Assignee | ||
Comment 6•13 years ago
|
||
Throwing Wes onto the WebApp scene. This patch will create a homescreen shortcut for an app when installed.
It uses the same code I was using for the about:apps page. In fact, I moved the code into WebappsUI so it could be used by both features.
If no shortcut exists, Android will make one, potentially on a different homescreen if it is full. If a shortcut for the app already exists, Android will display a message stating that it exists and won't make a dupe.
Assignee: nobody → mark.finkle
Attachment #621356 -
Flags: review?(wjohnston)
Comment 7•13 years ago
|
||
Nominating for k9o, as this relates to basic functionality for the android web runtime for web apps on app install.
blocking-kilimanjaro: --- → ?
Comment 8•13 years ago
|
||
Comment on attachment 621356 [details] [diff] [review]
patch
Review of attachment 621356 [details] [diff] [review]:
-----------------------------------------------------------------
::: mobile/android/chrome/content/browser.js
@@ +4770,5 @@
> }
> };
>
> var WebappsUI = {
> + init: function init() {
Happy to have names! We should probably prefix them?
@@ +4807,2 @@
> DOMApplicationRegistry.confirmInstall(aData);
> + this.createShortcut(manifest.name, manifest.fullLaunchPath(), manifest.iconURLForSize("64"), "webapp");
Hmm... Still looking through this code. Is it possible for things to fail? Maybe we should just have an observer listening for the webapps-sync-install notification and when that happens we create a shortcut.
Updated•13 years ago
|
blocking-kilimanjaro: ? → +
Comment 9•13 years ago
|
||
Comment on attachment 621356 [details] [diff] [review]
patch
Review of attachment 621356 [details] [diff] [review]:
-----------------------------------------------------------------
I'd like to know if there is some event sent when the install is complete. It looks like from:
http://mxr.mozilla.org/mozilla-central/source/dom/base/Webapps.jsm#195
that confirmInstall does some async file writing. I think we need better messages/callbacks/promises/etc sent if that succeeds or fails? Can the webapps guys comment?
Attachment #621356 -
Flags: review?(wjohnston) → review-
Assignee | ||
Comment 10•13 years ago
|
||
(In reply to Wesley Johnston (:wesj) from comment #9)
> Comment on attachment 621356 [details] [diff] [review]
> patch
>
> Review of attachment 621356 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> I'd like to know if there is some event sent when the install is complete.
> It looks like from:
There is no event sent to chrome after install.
> http://mxr.mozilla.org/mozilla-central/source/dom/base/Webapps.jsm#195
>
> that confirmInstall does some async file writing. I think we need better
> messages/callbacks/promises/etc sent if that succeeds or fails? Can the
> webapps guys comment?
The appObject is cached in memory here:
http://mxr.mozilla.org/mozilla-central/source/dom/base/Webapps.jsm#192
That is what's used to access the app data after install, so we should be good to go.
Assignee | ||
Comment 11•13 years ago
|
||
This patch uses "webapps-sync-install" to wait for a successful install before adding the homescreen shortcut. Seems to work OK.
Attachment #621356 -
Attachment is obsolete: true
Attachment #625148 -
Flags: review?(wjohnston)
Comment 12•13 years ago
|
||
Comment on attachment 625148 [details] [diff] [review]
patch 2
Review of attachment 625148 [details] [diff] [review]:
-----------------------------------------------------------------
::: mobile/android/chrome/content/browser.js
@@ +5004,5 @@
> + // Wait until we know the app install worked, then make a homescreen shortcut
> + DOMApplicationRegistry.getManifestFor(data.origin, (function(aManifest) {
> + if (!aManifest)
> + return;
> + dump("XXXX make a homescreen shortcut")
Remove this
Attachment #625148 -
Flags: review?(wjohnston) → review+
Assignee | ||
Comment 13•13 years ago
|
||
Updated•13 years ago
|
Flags: in-moztrap?(aaron.train)
Comment 14•13 years ago
|
||
Flags: in-moztrap?(aaron.train) → in-moztrap+
Comment 15•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago → 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 15
Updated•13 years ago
|
Whiteboard: [Phase1] → [Phase1], [qa+]
Updated•13 years ago
|
Whiteboard: [Phase1], [qa+] → [Phase1], [qa+:AaronMT]
Comment 16•13 years ago
|
||
Verified Fixed
Via:
--
Nightly (06/02)
Samsung Galaxy Nexus (Android 4.0.4)
Status: RESOLVED → VERIFIED
status-firefox15:
--- → verified
Whiteboard: [Phase1], [qa+:AaronMT] → [Phase1]
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•