android Programming Glossary: data.getdata
Android get image from gallery into ImageView http://stackoverflow.com/questions/10473823/android-get-image-from-gallery-into-imageview if requestCode SELECT_PICTURE Uri selectedImageUri data.getData selectedImagePath getPath selectedImageUri tv.setText selectedImagePath..
Calling camera from an activity, capturing an image and uploading to a server http://stackoverflow.com/questions/10679571/calling-camera-from-an-activity-capturing-an-image-and-uploading-to-a-server InputStream stream getContentResolver .openInputStream data.getData bitmap BitmapFactory.decodeStream stream stream.close imageView.setImageBitmap..
Camera intent not working with Samsung Galaxy S3 http://stackoverflow.com/questions/15248265/camera-intent-not-working-with-samsung-galaxy-s3 resultCode RESULT_OK null data Uri selectedImage data.getData String filePathColumn MediaStore.Images.Media.DATA Cursor..
Android Gallery on KitKat returns different Uri for Intent.ACTION_GET_CONTENT http://stackoverflow.com/questions/19834842/android-gallery-on-kitkat-returns-different-uri-for-intent-action-get-content null if requestCode GALLERY_INTENT_CALLED originalUri data.getData else if requestCode GALLERY_KITKAT_INTENT_CALLED originalUri.. if requestCode GALLERY_KITKAT_INTENT_CALLED originalUri data.getData final int takeFlags data.getFlags Intent.FLAG_GRANT_READ_URI_PERMISSION..
How to select and crop an image in android? http://stackoverflow.com/questions/2085003/how-to-select-and-crop-an-image-in-android 1 if resultCode Activity.RESULT_OK Uri selectedImage data.getData Log.d IMAGE SEL selectedImage TODO Do something with the select..
Get/pick an image from Android's built-in Gallery app programmatically http://stackoverflow.com/questions/2169649/get-pick-an-image-from-androids-built-in-gallery-app-programmatically if requestCode SELECT_PICTURE Uri selectedImageUri data.getData selectedImagePath getPath selectedImageUri helper to retrieve..
how to get the images from device in android java application http://stackoverflow.com/questions/2227209/how-to-get-the-images-from-device-in-android-java-application data if resultCode RESULT_OK Uri chosenImageUri data.getData Bitmap mBitmap null mBitmap Media.getBitmap this.getContentResolver..
get contact info from android contact picker http://stackoverflow.com/questions/3044545/get-contact-info-from-android-contact-picker data if resultCode Activity.RESULT_OK Uri contactData data.getData Cursor c managedQuery contactData null null null null if c.moveToFirst..
I'm getting a NullPointerException when I use ACTION_IMAGE_CAPTURE to take a picture http://stackoverflow.com/questions/3275749/im-getting-a-nullpointerexception-when-i-use-action-image-capture-to-take-a-pic Intent data if resultCode RESULT_OK return Uri imageUri data.getData Log.i imageUri imageUri.toString android share improve this.. check if the intent is null. If it isn't use data.getData and if it is then use the location specific in EXTRA_OUTPUT..
Get filename and path from uri from mediastore http://stackoverflow.com/questions/3401579/get-filename-and-path-from-uri-from-mediastore a URI for an image using the following Uri selectedImage data.getData Converting this to a string gives this content media external..
Access pictures from Pictures app in my android app http://stackoverflow.com/questions/550905/access-pictures-from-pictures-app-in-my-android-app if resultCode Activity.RESULT_OK Uri selectedImage data.getData TODO Do something with the select image URI Once you have the..
Get thumbnail Uri/path of the image stored in sd card + android http://stackoverflow.com/questions/5548645/get-thumbnail-uri-path-of-the-image-stored-in-sd-card-android try if requestCode 101 data null Uri selectedImageUri data.getData String selectedImagePath getPath selectedImageUri else Toast..
Android Camera Intent: how to get full sized photo? http://stackoverflow.com/questions/6448856/android-camera-intent-how-to-get-full-sized-photo int requestCode int resultCode Intent data Uri uri data.getData imageView.setImageURI uri It works for photo selected from gallery.. for photo selected from gallery but for camera intent data.getData returns null. android bitmap camera share improve this question..
How do I save data from Camera to disk using MediaStore on Android? http://stackoverflow.com/questions/649057/how-do-i-save-data-from-camera-to-disk-using-mediastore-on-android ImageView findViewById R.id.pictureView .setImageURI data.getData android camera android intent mediastore share improve..
Android file chooser [closed] http://stackoverflow.com/questions/7856959/android-file-chooser RESULT_OK Get the Uri of the selected file Uri uri data.getData Log.d TAG File Uri uri.toString Get the path String path FileUtils.getPath..
How to call Android contacts list? http://stackoverflow.com/questions/866769/how-to-call-android-contacts-list if resultCode Activity.RESULT_OK Uri contactData data.getData Cursor c getContentResolver .query contactData null null null..
how to store image in sqlite database http://stackoverflow.com/questions/9357668/how-to-store-image-in-sqlite-database requestCode case 0 if resultCode RESULT_OK Uri targetUri data.getData textTargetUri.setText targetUri.toString Bitmap bitmap try..
Android get image from gallery into ImageView http://stackoverflow.com/questions/10473823/android-get-image-from-gallery-into-imageview int resultCode Intent data if resultCode Activity.RESULT_OK if requestCode SELECT_PICTURE Uri selectedImageUri data.getData selectedImagePath getPath selectedImageUri tv.setText selectedImagePath img.setImageURI selectedImageUri public String..
Calling camera from an activity, capturing an image and uploading to a server http://stackoverflow.com/questions/10679571/calling-camera-from-an-activity-capturing-an-image-and-uploading-to-a-server to recyle unused bitmaps if bitmap null bitmap.recycle InputStream stream getContentResolver .openInputStream data.getData bitmap BitmapFactory.decodeStream stream stream.close imageView.setImageBitmap bitmap catch FileNotFoundException e..
Camera intent not working with Samsung Galaxy S3 http://stackoverflow.com/questions/15248265/camera-intent-not-working-with-samsung-galaxy-s3 requestCode resultCode data if requestCode RESULT_LOAD_IMAGE resultCode RESULT_OK null data Uri selectedImage data.getData String filePathColumn MediaStore.Images.Media.DATA Cursor cursor getContentResolver .query selectedImage filePathColumn..
Android Gallery on KitKat returns different Uri for Intent.ACTION_GET_CONTENT http://stackoverflow.com/questions/19834842/android-gallery-on-kitkat-returns-different-uri-for-intent-action-get-content Activity.RESULT_OK return if null data return Uri originalUri null if requestCode GALLERY_INTENT_CALLED originalUri data.getData else if requestCode GALLERY_KITKAT_INTENT_CALLED originalUri data.getData final int takeFlags data.getFlags Intent.FLAG_GRANT_READ_URI_PERMISSION.. GALLERY_INTENT_CALLED originalUri data.getData else if requestCode GALLERY_KITKAT_INTENT_CALLED originalUri data.getData final int takeFlags data.getFlags Intent.FLAG_GRANT_READ_URI_PERMISSION Intent.FLAG_GRANT_WRITE_URI_PERMISSION Check for..
How to select and crop an image in android? http://stackoverflow.com/questions/2085003/how-to-select-and-crop-an-image-in-android super.onActivityResult requestCode resultCode data if requestCode 1 if resultCode Activity.RESULT_OK Uri selectedImage data.getData Log.d IMAGE SEL selectedImage TODO Do something with the select image URI SharedPreferences customSharedPreference getSharedPreferences..
Get/pick an image from Android's built-in Gallery app programmatically http://stackoverflow.com/questions/2169649/get-pick-an-image-from-androids-built-in-gallery-app-programmatically requestCode int resultCode Intent data if resultCode RESULT_OK if requestCode SELECT_PICTURE Uri selectedImageUri data.getData selectedImagePath getPath selectedImageUri helper to retrieve the path of an image URI public String getPath Uri uri..
how to get the images from device in android java application http://stackoverflow.com/questions/2227209/how-to-get-the-images-from-device-in-android-java-application
get contact info from android contact picker http://stackoverflow.com/questions/3044545/get-contact-info-from-android-contact-picker resultCode Intent data super.onActivityResult reqCode resultCode data if resultCode Activity.RESULT_OK Uri contactData data.getData Cursor c managedQuery contactData null null null null if c.moveToFirst String name c.getString c.getColumnIndexOrThrow..
I'm getting a NullPointerException when I use ACTION_IMAGE_CAPTURE to take a picture http://stackoverflow.com/questions/3275749/im-getting-a-nullpointerexception-when-i-use-action-image-capture-to-take-a-pic protected void onActivityResult int requestCode int resultCode Intent data if resultCode RESULT_OK return Uri imageUri data.getData Log.i imageUri imageUri.toString android share improve this question Turns out the stock camera application doesn't.. camera app will save the image to that location. Then in onActivityResult check if the intent is null. If it isn't use data.getData and if it is then use the location specific in EXTRA_OUTPUT via a constant and insert it into the Mediastore. Urgh. share..
Get filename and path from uri from mediastore http://stackoverflow.com/questions/3401579/get-filename-and-path-from-uri-from-mediastore returning from an mediastore image selection which I can get a URI for an image using the following Uri selectedImage data.getData Converting this to a string gives this content media external images media 47 Or to a path gives external images media 47..
Access pictures from Pictures app in my android app http://stackoverflow.com/questions/550905/access-pictures-from-pictures-app-in-my-android-app requestCode resultCode data if requestCode SELECT_IMAGE if resultCode Activity.RESULT_OK Uri selectedImage data.getData TODO Do something with the select image URI Once you have the image Uri you can use it to access the image and do whatever..
Get thumbnail Uri/path of the image stored in sd card + android http://stackoverflow.com/questions/5548645/get-thumbnail-uri-path-of-the-image-stored-in-sd-card-android Intent data super.onActivityResult requestCode resultCode data try if requestCode 101 data null Uri selectedImageUri data.getData String selectedImagePath getPath selectedImageUri else Toast toast Toast.makeText this No Image is selected. Toast.LENGTH_LONG..
Android Camera Intent: how to get full sized photo? http://stackoverflow.com/questions/6448856/android-camera-intent-how-to-get-full-sized-photo using Intent Thanks edit I also tried public void onActivityResult int requestCode int resultCode Intent data Uri uri data.getData imageView.setImageURI uri It works for photo selected from gallery but for camera intent data.getData returns null. android.. data Uri uri data.getData imageView.setImageURI uri It works for photo selected from gallery but for camera intent data.getData returns null. android bitmap camera share improve this question To get full sized camera image you should point camera..
How do I save data from Camera to disk using MediaStore on Android? http://stackoverflow.com/questions/649057/how-do-i-save-data-from-camera-to-disk-using-mediastore-on-android Intent data if requestCode 0 resultCode Activity.RESULT_OK ImageView findViewById R.id.pictureView .setImageURI data.getData android camera android intent mediastore share improve this question This worked with the following code granted..
Android file chooser [closed] http://stackoverflow.com/questions/7856959/android-file-chooser Intent data switch requestCode case FILE_SELECT_CODE if resultCode RESULT_OK Get the Uri of the selected file Uri uri data.getData Log.d TAG File Uri uri.toString Get the path String path FileUtils.getPath this uri Log.d TAG File Path path Get the..
How to call Android contacts list? http://stackoverflow.com/questions/866769/how-to-call-android-contacts-list reqCode resultCode data switch reqCode case PICK_CONTACT if resultCode Activity.RESULT_OK Uri contactData data.getData Cursor c getContentResolver .query contactData null null null null if c.moveToFirst String name c.getString c.getColumnIndex..
how to store image in sqlite database http://stackoverflow.com/questions/9357668/how-to-store-image-in-sqlite-database super.onActivityResult requestCode resultCode data switch requestCode case 0 if resultCode RESULT_OK Uri targetUri data.getData textTargetUri.setText targetUri.toString Bitmap bitmap try bitmap BitmapFactory.decodeStream getContentResolver .openInputStream..
|