How to Set Wallpaper: Difference between revisions

From wizarPOS
No edit summary
(Replaced content with "{{Migrating|https://smartpossdk.gitbook.io/cloudpossdk/faq/firmware/set-wallpaper}}")
Tag: Replaced
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Code snippet==
{{Migrating|https://smartpossdk.gitbook.io/cloudpossdk/faq/firmware/set-wallpaper}}
  <uses-permission android:name = "android.permission.SET_WALLPAPER"/>
<syntaxhighlight lang="java">
public void setWallPaper() {
    WallpaperManager mWallManager = WallpaperManager.getInstance(context);
    try {
        mWallManager.setResource(R.drawable.wallpaperCos);
        mHandler.obtainMessage(2, "set setWallPaper success...").sendToTarget();
    } catch (Exception e) {
        e.printStackTrace();
        mHandler.obtainMessage(3, "set setWallPaper fail...").sendToTarget();
    }
}
</syntaxhighlight>
== Demo Project ==
Please get the [http://ftp.wizarpos.com/advanceSDK/cloudpos/SetCloudposWallpaper.zip whole demo].

Latest revision as of 08:40, 7 April 2024

Please visit new link of same subject:

https://smartpossdk.gitbook.io/cloudpossdk/faq/firmware/set-wallpaper

We're making a move! Our site's content is migrating to a new URL, to provide you with an enhanced browsing experience. Please update your bookmarks accordingly. Thank you for your continuous support!