Changing Blackberry 10 wallpaper through code is a fairly easy task. In this blog post we will cover two methods of changing wallpaper of Blackberry 10 programatically. Using Cascades In cascades we can use HomeScreen class defined inside bb::platform namespace. To link against this class you must have following line in your .pro file LIBS += -lbbplatform HomeScreen class has a function setWallpaper which accept object of type QUrl as argument. This function sets the wallpaper to the image pointed by url passed. It returns a bool as status of call. Now we can write code to change the wallpaper. For simplicity, code will set image as wallpaper from assets directory. bb::platform::HomeScreen homeScr; bool wallpaperResult=homeScr.setWallpaper(QUrl("asset:///mywallpaper.png")); Blackberry notes for setWallpaper method The image will be scaled to fit the screen. If the wallpaper image is deleted while it is set as the current wallpaper (say, because the image...
I document random stuff on this Blog. It can be a piece of code , my personal experience, a fun fact or anything else.