android – save image into gallery

MediaStore.Images.Media.insertImage(getContentResolver(), yourBitmap, yourTitle , yourDescription); The former code will add the image at the end of the gallery. If you want to modify the date so it appears at the beginning or any other metadata, see the code below (Cortesy of S-K, samkirton): https://gist.github.com/samkirton/0242ba81d7ca00b475b9 /** * Android internals have been modified to store images in … Read more

Android: Bitmaps loaded from gallery are rotated in ImageView

So, as an example… First you need to create an ExifInterface: ExifInterface exif = new ExifInterface(filename); You can then grab the orientation of the image: orientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, 1); Here’s what the orientation values mean: http://sylvana.net/jpegcrop/exif_orientation.html So, the most important values are 3, 6 and 8. If the orientation is ExifInterface.ORIENTATION_ROTATE_90 (which is 6), for … Read more

Horizontal ListView in Android?

As per Android Documentation RecyclerView is the new way to organize the items in listview and to be displayed horizontally Advantages: Since by using Recyclerview Adapter, ViewHolder pattern is automatically implemented Animation is easy to perform Many more features More Information about RecyclerView: grokkingandroid.com antonioleiva.com Sample: survivingwithandroid.com Just add the below block to make the … Read more

android pick images from gallery

Absolutely. Try this: Intent intent = new Intent(); intent.setType(“image/*”); intent.setAction(Intent.ACTION_GET_CONTENT); startActivityForResult(Intent.createChooser(intent, “Select Picture”), PICK_IMAGE); Don’t forget also to create the constant PICK_IMAGE, so you can recognize when the user comes back from the image gallery Activity: public static final int PICK_IMAGE = 1; @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode … Read more

Get/pick an image from Android’s built-in Gallery app programmatically

This is a complete solution. I’ve just updated this example code with the information provided in the answer below by @mad. Also check the solution below from @Khobaib explaining how to deal with picasa images. Update I’ve just reviewed my original answer and created a simple Android Studio project you can checkout from github and … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)