Closed Bug 918363 Opened 11 years ago Closed 6 years ago

long-press any image in browser to set as wallpaper

Categories

(Firefox OS Graveyard :: Gaia::Browser, enhancement)

ARM
Gonk (Firefox OS)
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: dietrich, Unassigned)

References

Details

(Keywords: feature)

Attachments

(1 file, 1 obsolete file)

This is the first thing my daughter tried with her Firefox OS phone.
Severity: normal → enhancement
OS: Mac OS X → Gonk (Firefox OS)
Hardware: x86 → ARM
(In reply to Dietrich Ayala (:dietrich) from comment #0)
> This is the first thing my daughter tried with her Firefox OS phone.

I'd like to work on it =D
change wallpaper from browser is not what I'd expect =D
but why not?
Bug 918363 - long-press any image in browser to set as wallpaper

[done](modified browser.js, add option to Image saving context menu)
    generateSystemMenuItem: function browser_generateSystemMenuItem
        separately handle image type
        change return value to array (to allow extra option required)

[done](modified locales en-US)
    set-wallpaper=Save and Set as Wallpaper

[todo](handle "set as Wallpaper")
    added one function
        setWallpaper: function browser_setWallpaper(url, type)
    I poked around and proposed naive design .. (commented in code)
    but not sure what procedure to follow to setWallpaper

thank you!
Flags: needinfo?
Dear Tim
Sorry to bother you ..

As I try to work on this bug, I need guidance on implementation .. How can I seek help?
(does needinfo serve this purpose?)

Also I think this bug is related to UX, so it be consulted before moving on.
(how do I check if a bug is ready / allowed to work on?)

and any suggestions please!
Thank you!
Flags: needinfo?(timdream)
Hi Xiao di,

(In reply to xiaodi from comment #4)
> As I try to work on this bug, I need guidance on implementation .. How can I
> seek help?
> (does needinfo serve this purpose?)
> 

You probably not going to deliver this feature by just changing Gaia. To make every image shown in every web page in the Browser app, we definitely need to put the code in Gecko. I am not the right person to guide you on this bug -- I am not experience enough to figure out how to fix this feature.

To seek some other developers, come to irc.mozilla.org and find channel #gaia #b2g #developers. People in Taipei office usually hang out on #mozilla-taiwan, so if you are more comfortable speaking Chinese (Traditional, not Simplified) you might want to go there too.

> Also I think this bug is related to UX, so it be consulted before moving on.

Yes, beside engineering, this bug requires UX attention to define an user interaction. However, I don't consider it's a blocker for start writing code -- you may even finish it first, and post a video to demonstrate your proposed interaction. We could always improve the interaction from what's already done.

> (how do I check if a bug is ready / allowed to work on?)

This is a open source project. Everyone is allowed to work on everything :).
The right question to ask is whether or not this bug fits your skill set, and whether or not this feature/bug is consistent with overall Mozilla engineering/product goals.

> and any suggestions please!
> Thank you!

No problem; you had fixed one [good first bug]; giving good guidance is one of the few things I could offer in return :)
Flags: needinfo?(timdream)
Flags: needinfo?
(In reply to Tim Guan-tin Chien [:timdream] (MoCo-TPE) (please ni?) from comment #5)
> Hi Xiao di,
> 
> (In reply to xiaodi from comment #4)
> > As I try to work on this bug, I need guidance on implementation .. How can I
> > seek help?
> > (does needinfo serve this purpose?)
> > 
> 
> You probably not going to deliver this feature by just changing Gaia. To
> make every image shown in every web page in the Browser app, we definitely
> need to put the code in Gecko. I am not the right person to guide you on
> this bug -- I am not experience enough to figure out how to fix this feature.

Actually I think this can be done just on the gaia side, like the "Save Image" that was added to the context menu.
(In reply to Tim Guan-tin Chien [:timdream] (MoCo-TPE) (please ni?) from comment #5)

Thanks for your kind reply =P

(In reply to Fabrice Desré [:fabrice] from comment #6)

Yes
I've done some experiment and I think it's doable.
I think The missing puzzle is how to set as wallpaper
I can find reference from wallpaper and gallery app, but don't know what's the right way to do it?
(In reply to xiaodi from comment #7)
> (In reply to Tim Guan-tin Chien [:timdream] (MoCo-TPE) (please ni?) from
> comment #5)
> 
> Thanks for your kind reply =P
> 
> (In reply to Fabrice Desré [:fabrice] from comment #6)
> 
> Yes
> I've done some experiment and I think it's doable.
> I think The missing puzzle is how to set as wallpaper
> I can find reference from wallpaper and gallery app, but don't know what's
> the right way to do it?

Currently the wallpaper url is a setting named wallpaper.image - You need to be in a certified app to be allowed to change it.
(In reply to Fabrice Desré [:fabrice] from comment #8)
> Currently the wallpaper url is a setting named wallpaper.image - You need to
> be in a certified app to be allowed to change it.

I checked that the browser is a certified app.
And I've done a version of setting wallpaper from within browser app, not tested yet (due to network issue, I'll test it later)

But I think we shouldn't change wallpaper directly like this, is there's a interface to call?
The gallery app achieve this using MozActivity. But it's not general purpose I think.
(https://developer.mozilla.org/en-US/docs/Web/API/MozActivity)
the browser app has only read permission to settings
this version use MozActivity but can't handle blob correctly, error at cropURL = URL.createObjectURL(file);

despite this, it's not handy for user

Fabrice,
can you help me look at it please?
thank you!
Attachment #8361671 - Attachment is obsolete: true
Flags: needinfo?(fabrice)
I'm redirecting to Ben that owns the browser app.
Flags: needinfo?(fabrice) → needinfo?(bfrancis)
Hi Xiao di,

I don't want to discourage you from working on the project, but please be aware that the browser app will probably be retired in version 1.4 as we are creating a new system browser which is part of the system app. If you implement this feature in the browser app now, it may never ship in a release.

The browser does currently allow you to save an image to the gallery, then you can add it as a wallpaper from there. If we wanted to add a feature to directly set the wallpaper from the browser, I think you've correctly identified that Web Activities would be a good way to do that.

The system browser does not yet have the feature to long press an image (or audio or video element) to save it and we need to add that feature, it's tracked by bug 941272. We would like to trigger the new download manager from the system app in order to do this.

If you wanted to try to have a go at implementing this feature then you could use the code in the browser app as an example and I could help you, but be aware that the system app is more complex than the browser app so it may not be quite so straightforward.

Happy hacking :)
Flags: needinfo?(bfrancis)
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: