Skip to content

Idea: WebView-based live wallpaper android app #11

@iangilman

Description

@iangilman

Now that I know how to get a WebView in a live wallpaper:

https://gist.github.com/iangilman/71650d46384a2d4ae6387f2d4087cc37

… it might be cool to release an app that just lets you input any webpage to use as a live wallpaper.

One challenge is the updating; somehow the live wallpaper needs to know when to copy from the WebView to the screen. A couple thoughts:

  • Hook into requestAnimationFrame and trigger the redraw after every frame
  • As a fallback, allow the user to choose a set update frequency; sub webpages you'll want 30 FPS or whatever, whereas others might be once every 10 minutes
  • It might be interesting to make a little library that people can include in their webpages for improved smoothness/performance

Another thing to keep in mind is that you want the webpage to stop doing any processing when it's not on screen, but you don't necessarily want to flush it out and reload it every time the wallpaper is hidden. Again you might be able to hook into requestAnimationFrame and other such things to facilitate this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions