HTC Incredible displaying blank ImageView - android

I have an app that displays an an image in an ImageView using the setImageDrawable(Drawable) method. However, with the release of the Droid Incredible the images are coming up as a blank screen. I am using Drawable.createFromPath(Environment.getExternalStorageDirectory() + "\\imagefile") to access the image from the SD card. I don't get any sort of error, just a black screen. I will get a null pointer exception if after trying to load the image I try to access a property of the Drawable. This makes me believe that the Drawable wasn't loaded, but I don't know why or how to make it work.
This code as been working on all other Android devices, so I'm not sure what is different with the Incredible.
Unfortunately I don't have access to an Incredible to test on, so I've got to rely on others to test and send me the log files. Any help you can offer would be greatly appreciated. If anyone knows how to replicate this issue on the emulator, that would be helpful too. I've configured an emulator with firmware 7 and the correct screen resolution, but I was unable to replicate the issue.

The Incredible does not come with an SD card. Instead, it has 8GB internal storage you can work with. See here for more information.
Heh, I just noticed Mark already said this.

I've verified that it's not an issue with the SD card (although that is another issue to be addressed). Using an Incredible with an SD card installed produces the result described above as does saving/loading the image from the internal memory ("/emmc").

Related

ML5 image classifiers returns exactly the same results for all images on cordova android platform

I just started working with ML5 and machine learning in general. I started by creating an app that classifies images from my webcam using 'MobileNet' image classifier, I then created a my own classifier using Teachable Machine which also worked great. I created my app using cordova, and I used the browser platform as I got started and all worked great.
However once I switched to try the app on android platform, whatever image I try to classify (whether it is taken with my phone camera, or even hard-coded to the html page) always returns the same result with the exact same confidence. But if I switch back to the browser, it works just fine again. I cant seem to find anyone else reporting this kind of problem. Does anyone have any idea what it might be?
I once had the same problem and it turned out that the Android version was having out-of-memory exceptions that weren't being caught or reported.
After debugging using Chrome Developer Tools (by following this), it appears the problem was that the images I was trying to classify were too large to be processed on android (error - webGL: INVALID_VALUE: texImage2D: width or height out of range).
Therefore reducing the size/quality of the images before classifying them resolved the problem.

Drawable resources corruption in Android Studio

I've been attempting to resolve memory issues that cause my app to break when I attempt to create a bitmap with writing and images on it (via canvas / paint). I've been looking into attempting to get the right files repeated in the right places, at the right sizes across all of the various drawables folders.
This involved cutting and pasting a few files in and out, attempting to remove some duplication etc.
However after moving files around I started getting only Fatal signal 7 (SIGBUS) errors on my Nexus 5. I restored my drawables folders to how they were, and I'm still getting the error no matter what I do. Also an S3 Mini that I use for testing returns FileNotFoundException when I try to access a drawable:
Uri uri = Uri.parse("android.resource://"+getPackageName()+"/drawable/"+getApplicationContext().getResources().getResourceEntryName(imgId));
The path in the error in DDMS looks fine, and no different from when it was working. I really haven't changed anything else and have reverted everything I can, but I seem to have somehow corrupted something to do with my drawables.
I realise there isn't a huge amount to go on here, and I'm not posting my code as I'm not looking for a huge technical solution that dives into my extensive codebase, more just information as to whether this is a known problem / any ideas on what could be causing such a strange issue. I'm using Android Studio.

My code to capture a video from the default camera works fine on every device except the Galaxy S2 when specifying MediaStore.EXTRA_OUTPUT path

I have code that gives me back a path to store my video file which basically produces a path that looks like this:
/storage/sdcard0/Pictures/MyApp/MyApp20130816_144111_1131938614.mp4
When I try to capture the video on my S2, I take the video and press stop the camera my camera app does not display the normal save screen, it just puts itself back into the beginning of capture mode and onActivityResult is never called. I've found that if I do not pass a path to MediaStore.EXTRA_OUTPUT it functions correctly.
I've tested my code on Note II, GS3, GS4, Nexus and they all seem to be able to capture the video and save it to the correct path with no problems. Why would the S2 be behaving this way?
Something about the galaxy s2 doesn't like /storage/ maybe?
Never hardcode paths. Always use methods like Environment.getExternalStoragePublicDirectory() to get the root of where to store files on external storage. Different devices, and even different users on the same device (Android 4.2+ tablets) will have different paths for external storage.
However, the point in my initial comment still holds. You as a developer are not "using the default camera app as installed on the galaxy devices". You as a user may be using that particular app. There are nearly a billion Android device users; you are not all of them. They are welcome to use whatever camera app they want to, including third-party ones. And, they will be using thousands of Android device models. None of them will necessarily honor your request to take a picture. It's certainly worthwhile for you to do testing to try to work more faithfully on more devices (such as not hardcoding paths), but you need to bear in mind that any time you ask another developer's app to do work for you, the other developer is control of what happens, much more than you are.

Adreno200-EGLSUB: <ConfigWindowMatch:2087>: Format RGBA_8888 issue with Motorola Defy device

I have been facing strange issue in my one of Android application with Motorola Defy device. I have been testing the same application on HTC and Samsung devices and it is running perfectly without any issue, however when I test it with Motorola device, it starts getting crashes.
All log files shows Adreno200-EGLSUB: : Format RGBA_8888 error. Let me add one more thing that I am using SurfaceView and surfaceHolder class.
Could anyone know what possible reasons might be and it can be sorted out?
Thanks in advance.
I met the same problem, I tried to set
getWindow().setFormat(PixelFormat.RGBA_8888);
But still returned the same problem. I run on several thousands times, no further error was shown related to this one.
According to answers Device specific error - s3dReadConfigFile "Can't open file for reading."
It will not affect the use of your application
i have it too,
just unlock your phone, and make it ready to use.
than run your app from software (Eclipse - in my case).

Images not visible on Galaxy S3

I hava the following issue - my app is working well on all devices I have, but I have just tried it on Galaxy S3 and I am surprised to see, that all images are... gone. The only image, that is still visible, is the app icon image. On the S3 I have downloaded the app from th market.. and as mentioned - on the other devices it works as expected. The images are statically loaded in xml in image views... nothing fancy...
Any idea what could cause such behavior?
This is the app id in market, if needed (NOT intended to be app advertisement!):
Com.rts.android.tictactoe3d
Thank you!
This was a wired issue, it dissipated after I have updated my S3 to the latest firmware. Before that nothing really helped, I have tried to cleanup the application data, uninstall/reinstall, more the app to the SD or back to phone - same behavior.
It turned out, that GIF image format is not entirely supported in some Android versions, for more information you could take a look at the thread below and a big THANK YOU to Rich for solving the issue!
Images not loading on Galaxy S3

Categories

Resources