This week's book giveaway is in the NodeJS forum. We're giving away four copies of Serverless Applications with Node.js and have Slobodan Stojanovic & Aleksandar Simovic on-line! See this thread for details.
In some way the ImageView.setImageBitmap(Bitmap) method will probably be involved, so you should read up on how to create suitable Bitmap objects; the setPixel/setPixels methods seem particularly relevant.
i finally got the code to work. but a weird thing is going on, on the emulator this code
byte myImage = gemyImage();
ImageView myView = (ImageView)findViewById(R.id.myImage);
catch (Exception e)
Log.e("Create file error : ",e.getMessage());
that displays the image that i get from the webservice works, when i copy the app to a device with 2.1 on it just crashes. no errors can be viewed. any idea why this is happening?
thanks in advance.
posted 8 years ago
...it just crashes. no errors can be viewed. any idea why this is happening?
This sounds odd. Whenever Android sees fit to terminate an application there should always be a message in the logcat output. Which lines of the code you just posted do get executed in the case of the app crashing?
everything else n the app, which is mostly getting data from web services works. When i try to get the image and display it it crashes. The weird thing is that on the emulator it works fine. On my device i dont know what happens. can i test my app on my device and not on the emulator from eclipse? cant see on which line it is crashing because its running on my device...
posted 8 years ago
cant see on which line it is crashing because its running on my device...
Sure you can, that's what the logcat tool is for that comes with the Android SDK.
i think i found what was crashing the app, the emulator has 2.2 version, my device has 2.1 it throws this error
02-24 12:13:42.221: ERROR/AndroidRuntime(341): java.lang.NoClassDefFoundError: android.util.Base64
cant i use the Base64 on older versions?? is there an other utility for older versions?