I have image with 543*6423 resolution, I want to display it in all devices. It is displaying in few of android phones which allows the high resolution. I tried with
android:hardwareAccelerated="false"
This is my java code for android client
File storagePath =Environment.getExternalStoragePublicDirectory(
                    Environment.DIRECTORY_DOWNLOADS+
                    "abc.png");
            InputStream is = this.getContentResolver().openInputStream(Uri.fromFile(storagePath)); 
            Bitmap b = BitmapFactory.decodeStream(is, null, null); 
            is.close(); 
            image.setImageBitmap(b);
This worked in my mobile (sony xperia) but few other phones are not displaying it. Please help me how can I display this image independent of screen resolution.
Thanks, Aman
Your image is probably too large to be displayed on most devices. So you have to load a scaled down version of the image. Look at Loading Large Bitmaps Efficiently to see how to do this and calculate an appropriate sample size.
If you need the display width / height (in case of a full screen image) you can use getResources().getDisplayMetrics().
try with
android:hardwareAccelerated="false" 
android:largeHeap="true"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With