satya
satya

Reputation: 27

how to get bitmap uri in android mobile device using java

i am implemented this code image upload device only how can retrieve bitmap uri Intent photoPickerIntent = new Intent(Intent.ACTION_PICK); photoPickerIntent.setType("image/*"); startActivityForResult(photoPickerIntent, ACTIVITY_RESULT_IMAGE_SELECTED);

 protected void onActivityResult(int requestCode, int resultCode, Intent intent,Intent data, CharSequence Uri) 
 {
     super.onActivityResult(requestCode, resultCode, intent);

     if (requestCode == ACTIVITY_RESULT_IMAGE_SELECTED)
     {
             if (resultCode == RESULT_OK) {
                     Uri uri = intent.getData();
                     Object mBitmap = MediaStore.EXTRA_OUTPUT; //Media.//getBitmap(this.getContentResolver(),uri);
                     //EditText images=(EditText) findViewById(R.id.EditTextImages);
                   //  mImageUploadAdapter.addImage(uri);
                    // mImageUploadGridView.invalidateViews();
             }
     } i am implementing this code

Upvotes: 2

Views: 5941

Answers (1)

Samuh
Samuh

Reputation: 36484

intent.getData() will return the URI of the Bitmap. If your question is about how you are to create a Bitmap Object from this URI you can take a look here.

Upvotes: 2

Related Questions