Languages

Menu
Sites
Language
Setting Lock Screen Wallpaper problem

I try to set the lock screen wallpaper from my application but i have a problem.

I use below code

        //set the lock screen background image
       String filepath = App::GetInstance()->GetAppResourcePath() + L"screen-density-xhigh/back.jpg";
        String key(L"http://tizen.org/setting/screen.wallpaper.lock");
        SettingInfo::SetValue(key,filepath);

but the result is not the expected. The lock screen wallpaper changes but with a black one and not the  specified wallpaper.

I have the privilege  http://tizen.org/privilege/setting in the config.xml

Responses

5 Replies
Alex Ashirov

Hello!

What is result value returned by SettingInfo::SetValue(key,filepath); ?

Byron Gavras

The result value is E_SUCCESS.

I also tried to push back.jpg in this folder (/opt/share/settings/Wallpapers/) and it works. The lockscreen changed with the image i want. This is the code.

        String filepath3 = "/opt/share/settings/Wallpapers/back.jpg";
        String key(L"http://tizen.org/setting/screen.wallpaper.lock");
        r=SettingInfo::SetValue(key,filepath3);

I don't understand what is the problem with first code.

youngsik yoon

your app's res folder can be accessed only from your app. so setting app can't access. 

please put wallpaper image in your app's shared/res folder. it can be accessed by others.

youngsik yoon

sorry. probably lockscreen app can't access your app's res folder is more correct. 

 

Byron Gavras

Ok after the transfer of the image to folder

/opt/apps/appId/shared/res/screen-density-xhigh/back.jpg" it worked

 

Thank you youngsik yoon