SDK 1.5 and camera preview decoding

by blindfold » Fri, 17 Apr 2009 15:27:39 GMT

Sponsored Links
 Does Cupcake (SDK 1.5) add any support for decoding camera preview
images with BitmapFactory.decodeByteArray(), or does onPreviewFrame(),
as with SDK 1.1, still give only a header-less image data[] that the
Dalvik interpreter must decode pixel-by-pixel (too slow for most



Other Threads

1. sharing embedded resource via content provider

How do I share an embedded resource with other apks via a content


2. AnimationDrawable not starting

i'm trying to use an AnimationDrawable for frame wise animation. the
problem is that when i render it on screen, only the first image in
the Drawable is displayed. the animationDrawable.isRunning() returns
true, however the images are not animated.

following is the XML file (called whitepawnchanged.xml) and is stored
in the res/anim folder

<?xml version="1.0" encoding="UTF-8"?>
<animation-list xmlns:android="
android" android:oneshot="false" android:id="@+id/upgradewhite">
        <item android:drawable="@drawable/whitebishop"
android:duration="100" />
        <item android:drawable="@drawable/whiteknight"
android:duration="100" />
        <item android:drawable="@drawable/whiterook" android:duration="100" /
        <item android:drawable="@drawable/whitequeen" android:duration="100" /

the java code within the onCreate() method of the Activity is as
follows ... (the relevant snippet)

public void onCreate(Bundle icicle) {

        ImageView whitePawnChange = new ImageView(this);
        whiteChange = (AnimationDrawable)whitePawnChange.getBackground
();  //whiteChange is an AnimationDrawable object defined in the

        //rest of the stuff

    the call to the whiteChange.start() is NOT in the onCreate and is
fired later when a button is clicked ... typically well after the
application is running.
    apparently other people have faced this same issue but i could not
find any solution. any help would be greatly appreciated.

incidentally, i'm also looking at a workaround (in case this problem
persists) - is there any way that we can change the Bitmap associated
with a BitmapDrawable AFTER the BitmapDrawable has been created? in
the documentation i could only find a getBitmap() method and nothing
along the lines of a setBitmap() or similar method.



3. Debugger doesn't start on G1

4. Storing app-specific synced data with a contact

5. How to test omx encoder in opencore 2.0?(on emulator)

6. AudioFlinger - many "write blocked for" log WARN messages

7. how many items on a map are "usable"?