title: Crop image before setting as a wallpaper and share that on facebook?
body: <pre><code>      public class FullImageActivity extends Activity {
      Button share;
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.full_image);
            Button buttonSetWallpaper = (Button)findViewById(R.id.btn);
            share=(Button)findViewById(R.id.share);
          // get intent data
          Intent i = getIntent();
  
          // Selected image id
          final int position = i.getExtras().getInt("id");
          final ImageAdapter imageAdapter = new ImageAdapter(this);
  
          ImageView imageView = (ImageView) findViewById(R.id.full_image_view);
          imageView.setImageResource(imageAdapter.mThumbIds[position]);
          buttonSetWallpaper.setOnClickListener(new Button.OnClickListener(){
  
              @Override
              public void onClick(View arg0) {
                  // TODO Auto-generated method stub
                    WallpaperManager myWallpaperManager 
                      = WallpaperManager.getInstance(getApplicationContext());
                      try {
                          myWallpaperManager.setResource(imageAdapter.mThumbIds[position]);
                          Toast.makeText(FullImageActivity.this, "wallpaper changed", Toast.LENGTH_LONG).show();
                    } catch (IOException e) {
                          // TODO Auto-generated catch block
                          e.printStackTrace();
                      }
                      }
              });
          share.setOnClickListener(new OnClickListener() {
  
              @Override
              public void onClick(View v) {
                  // TODO Auto-generated method stub
                  String url = "https://www.facebook.com/";
                  Intent i = new Intent(Intent.ACTION_VIEW);
                  i.setData(Uri.parse(url));
                  startActivity(i);
              }
          });
  
      }
  
  }
  </code></pre>
  
  <p>I want to crop images when user set that image as a wallpaper. How can i do this, and i also want to share that image on facebook, I tried to apply share code for facebook but it's not working.</p>