Android camera to take multiple photos

Posted by user2975407 on Stack Overflow See other posts from Stack Overflow or by user2975407
Published on 2013-11-10T03:51:13Z Indexed on 2013/11/10 3:52 UTC
Read the original article Hit count: 105

Filed under:
|
|
  1. problem.java

    public class problem extends Activity {
    

    ImageView iv; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.problem);

    iv=(ImageView) findViewById(R.id.imageView1);
    
    Button b=(Button) findViewById(R.id.button1);
    b.setOnClickListener(new OnClickListener() {
    
        @Override
        public void onClick(View v) {
        Intent intent=new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
        startActivityForResult(intent, 0);
    
        }
    });
            }
    
         @Override
        protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    // TODO Auto-generated method stub
        super.onActivityResult(requestCode, resultCode, data);
        Bitmap bm=(Bitmap) data.getExtras().get("data");
       iv.setImageBitmap(bm);
           }    
           }
    
    
        From this code I can only take one photo and it displayed in the screen. 
      **But I want to take more photos nearly 5 photos and display in the screen**
        Further I want to add these photos to MySQL database.please help me to do that.I am new to android
    

© Stack Overflow or respective owner

Related posts about java

Related posts about android