语言

Menu
Sites
Language
Live wallpapers

Hi

Is it possible to create live wallpapers with Tizen API? Does not matter if WEB or Native.

 

slaw

 

响应

3 回复
André Reus

hi Slawek Kowalski!

What kind of Live wallpaper ..can you explain more ?

Slawek Kowalski

Changed programmatically, rendered in runtime. Not GIF pictures.

Iqbal Hossain

If can follow this, 

//config.xml
<tizen:privilege name="http://tizen.org/privilege/setting"/>

//index.html
 <div class="ui-page ui-page-active" id="main">
    <div class="ui-content">
    <button id="changeBtn">Change HomeScreen</button>
    </div>
 </div>

//main.js
  var changeBtn = document.querySelector('#changeBtn');

    changeBtn.addEventListener("click", function() {
       setLockscreenWallpaper();
    });
    
    
    function setLockscreenWallpaper() 
    { 
    	  var imagepath="images/home.jpeg";
          try 
          {
             tizen.systemsetting.setProperty("HOME_SCREEN",imagepath,successCB, errorCB);
        // Give LOCK_SCREEN for changing Lock Screen
          }
          catch (error)
          {
             console.log("Error: " + error);
          }
    }
    
    function successCB()
    {
       console.log("It's set");
    }
    
    function errorCB()
    {
       console.log("It's not set");
    }

I gave you the code for changing wallpaper/lockscreen programatically. You just need to give the image like gif to make it live. 

Ref: https://developer.tizen.org/community/code-snippet/web-code-snippet/changing-home-and-lock-screen-programmatically?tab=all

-hope it will help you. 

-thanks