Q:

get image path from activity1 (that contain listview of picture) to activity2 (that contain canvas to draw picture returned from activity1 )

I developed an activity that contains canvas to draw image and I have a menu that calla activity (this activity shows list of picture). Once I choose a picture from list, this picture must be drawn on canvas. So, my problem is how to send this picture from listView in Activity1 to canvas on Activity2.
This is my code:
Activity1
case R.id.menu_prefs:
        Intent i = new Intent(TpMainActivity.this, ListViewImagesActivity.class);
        startActivity(i);
        return true;

Acitvity2 (list view picture)
public class ListViewImagesActivity extends Activity {
/** Called when the activity is first created. */
private PaintView paintView;
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    ArrayList<ItemDetails> image_details = GetSearchResults();

    final ListView lv1 = (ListView) findViewById(R.id.listV_main);
    lv1.setAdapter(new ItemListBaseAdapter(this, image_details));

    lv1.setOnItemClickListener(new OnItemClickListener() {
        @Override
        public void onItemClick(AdapterView<?> a, View v, int position, long id) { 
                                Thread thread = new Thread() {
                    //  @Override
                    public void run() {
                    try {
                        InputStream bitmap=getAssets().open("a.gif");
                        Bitmap bit=BitmapFactory.decodeStream(bitmap);
                        paintView.setBitmap(bit);
                    } catch (IOException e1) {
                        // TODO Auto-generated catch block
                        e1.printStackTrace();
                    }
                    }
                    };
                    thread.start();

        }  
    });
}

A:

Have activity1 call startActivityForResult rather than startActivity.  Then you can return a result when finish is called on activity2.  Activity1 will need to implement onActivityResult.  Activity 2 can return the path in the intent that is sent back to activity1.

