how to add images in sqllite database of by browse?
<p>I follow this <a href="http://androidhub4you.blogspot.com/2012/09/hello-friends-today-i-am-going-to-share.html" rel="nofollow">tutorial</a> </p>

<p>is add same image in database again n again I want to add new image of my own choice by browse gallery and upload and save to database</p>

<p>the output of the code look like <a href="http://imgur.com/u7wCK" rel="nofollow">this</a> </p>

<p>I add new button in <code>main.xml</code> called  browsebutton.  and set is function to open gallery but how do I upload browse image to database? help me plz I wanna add my own img from gallery how do is et code to add  database my gallery image??</p>

<pre><code>   import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.ListView;

 public class SQLiteDemoActivity extends Activity {
private static final int SELECT_PICTURE = 1;
ArrayList&lt;Contact&gt; imageArry = new ArrayList&lt;Contact&gt;();
ContactImageAdapter adapter;
Button BrowseButton;

 /** Called when the activity is first created. */
 @Override
 public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.main);

 DataBaseHandler db = new DataBaseHandler(this);
//get image from drawable
Bitmap image = BitmapFactory.decodeResource(getResources(),
R.drawable.facebook);


BrowseButton=(Button)findViewById(R.id.BrowseButton);



BrowseButton.setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View v) {
    // TODO Auto-generated method stub
     // in onCreate or any event where your want the user to
    // select a file
    Intent intent = new Intent();
    intent.setType("image/*");
    intent.setAction(Intent.ACTION_GET_CONTENT);
    startActivityForResult(Intent.createChooser(intent,
            "Select Picture"), SELECT_PICTURE);

 }
});




//convert bitmap to byte
 ByteArrayOutputStream stream = new ByteArrayOutputStream();
 image.compress(Bitmap.CompressFormat.JPEG, 100, stream);
 byte imageInByte[] = stream.toByteArray();
/**
* CRUD Operations
* */
//Inserting Contacts
Log.d("Insert: ", "Inserting ..");
db.addContact(new Contact("FaceBook", imageInByte));
//display main List view bcard and contact name

//Reading all contacts from database
List&lt;Contact&gt; contacts = db.getAllContacts();
for (Contact cn : contacts) {
String log = "ID:" + cn.getID() + " Name: " + cn.getName()
+ " ,Image: " + cn.getImage();

//Writing Contacts to log
Log.d("Result: ", log);
 //add contacts data in arrayList
imageArry.add(cn);

}
adapter = new ContactImageAdapter(this, R.layout.screen_list,
imageArry);
ListView dataList = (ListView) findViewById(R.id.list);
dataList.setAdapter(adapter);
}
}
</code></pre>
