Not Set Wallpaper in My Home Scrren Android....Can You Give Good Suggestion...? : //It's my function
//private int mW = 0;private int mH = 0;
//private int[] cW = new int[]{R.drawable.wall01, R.drawable.wall02, R.drawable.wall03, R.drawable.wall04, R.drawable.wall05, R.drawable.wall06, R.drawable.wall07, R.drawable.wall08, R.drawable.wall09, R.drawable.wall10, R.drawable.wall11, R.drawable.wall12, R.drawable.wall13, R.drawable.wall14, R.drawable.wall15};


private void cw() {
        try {
            WallpaperManager localWallpaperManager = WallpaperManager.getInstance(getApplicationContext());
            Display display = getWindowManager().getDefaultDisplay();
            Point size = new Point();
            try {
                if (VERSION.SDK_INT >= 11) {
                    display.getSize(size);
                    this.mW = size.x;
                    this.mH = size.y;
                } else {
                    this.mW = display.getWidth();
                    this.mH = display.getHeight();
                }
            } catch (Exception e) {
                Toast.makeText(this, "Wallpaper has been set not1.", Toast.LENGTH_SHORT).show();

            }
            Bitmap localBitmap = Bitmap.createScaledBitmap(BitmapFactory.decodeResource(getResources(), this.cW[this.i]), this.mW, this.mH, true);
            localWallpaperManager.setWallpaperOffsetSteps(1.0f, 1.0f);
            localWallpaperManager.suggestDesiredDimensions(this.mW, this.mH);
            try {
                localWallpaperManager.setBitmap(localBitmap);
                Toast.makeText(this, "Wallpaper has been set successfully.",0).show();
            } catch (IOException e2) {
                Toast.makeText(this, "Wallpaper has been set not2.", Toast.LENGTH_SHORT).show();
            }
        } catch (Exception e3) {
            Toast.makeText(this, "Wallpaper has been set not3.", Toast.LENGTH_SHORT).show();
        }
    }