Use a HTML page as Live Wallpaper in Android

♀尐吖头ヾ 提交于 2021-01-27 04:56:32

问题


Can I use a HTML page as a Live Wallpaper?
Or is it possible to capture a web page as an image and set it as a wallpaper?

Any help would be greatly appreciated.


回答1:


There is an app on the market called WebLiveWallpaper that does this. There is an option in it for how often to refresh the view of the web page, which leads me to believe that it is simply taking a snapsnot of the page and presenting it as an image some how. Unfortunately I wouldn't know how to go about setting that up. But I think you're definitely going to want to go the image route.

Edit Here are some links that may help you out:

Open source Java library to produce webpage thumbnails server-side

http://www.acasystems.com/en/web-thumb-activex/

http://www.fileguru.com/apps/convert_html_to_image_in_java

I have not used any of these components before so I'm not positive about them but they seem like they can do what your looking for .




回答2:


I am the author of the mentioned WebLiveWallpaper. It can use both techniques: Showing a web snapshot from snapr, webthumb, ... but normally it is really a WebView which has disadvantages but also some advantages. A web snapshot/thumb image cannot update animated images fast enough. But it avoids the problems a 'hacked' WebView in a live wallpaper has (like missing images, huge memory footprint).

I think what you want is using one of these: http://www.websnapr.com/ http://webthumb.bluga.net/home http://snapr.seekxl.de

They all have more and better documentation on their sites than I can put in here. Mostly it is simply a picture from their url with your key and some settings.



来源:https://stackoverflow.com/questions/5203688/use-a-html-page-as-live-wallpaper-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!