title: Setting wallpaper using onclick event of a button has no effect
body: <p>I'm following the <a href="http://android-er.blogspot.in/2011/03/set-wallpaper-using-wallpapermanager.html" rel="nofollow">tutorial</a> trying to set the wallpaper using onclick event of a button.</p>
  
  <p>My code for that is,</p>
  
  <pre><code>private OnClickListener startListener = new OnClickListener(){
  
      public void onClick(View v){
  
          setBg();}
  
      public void setBg(){
          WallpaperManager myWallpaperManager
           = WallpaperManager.getInstance(getApplicationContext());
          try {
           myWallpaperManager.setResource(R.drawable.shrek);
          } catch (IOException e) {
           // TODO Auto-generated catch block
           e.printStackTrace();
          }
  
         }
  </code></pre>
  
  <p>Also i've set the permission SETWALLPAPER.</p>
  
  <p>But when i click, Nothing happens.</p>
  
  <p>whats the problem here?</p>