Big bug playing ogg files in Android 2.3 (a.k.a Stop the Android Audio Madness!)

by k7k0 » Sat, 12 Mar 2011 05:18:50 GMT

Sponsored Links
 I'm having a big problem with Android 2.3, the MediaPlayer API seems broken 
with most .ogg files.

If you grab a mono or non-44khz ogg file, after loading it into the 
MediaPlayer it reports ridiculous lengths using the getDuration() API. Is 
not just bad information, you can't use the seekTo API!. Try to download 
this file to your sdcard and play it using the Music Player app in a 2.3 
emulator, the file is 18 seconds length, it reports only 8 seconds!.

I've filed a bug here 
If you are an audio-related app developer please star it.

We switched to ogg to avoid the gaps of the mp3 files. *This worked since 
android 1.1*, I don't know what's happening to android audio API's, I 
thought they couldn't make it even worse!


Other Threads

1. Slideshow with fading in pictures

Hey folks,

I'm doing Android since 3 weeks and I really like it, everything was
fine but now I really need help.

I do a simple slideshow app, I got my pictures in an array (not really
array but that doesn't matter now), and I'd like to use transition
effect to slide in the next picture.

OK, so I have /res/picture.xml like this (I explain later why I set
the width to 320px):

<?xml version="1.0" encoding="utf-8"?>
<AbsoluteLayout xmlns:android="
    android:layout_height="fill_parent" android:layout_width="320px"

...and my class has these lines:

ImageView pictureImageView = (ImageView) findViewById(;
Animation frameAnimation = AnimationUtils.makeInAnimation(this,

Don't worry about pictureResource.getPicture(), this retrieves a valid
image resource.
Also, the variable 'animation' is an object for a proper
This class which implements AnimationListener sets the background of
the current window to the current picture by onAnimationEnd()

Now, the way it works:
if you use your device in vertical direction, the application steps
forward in the gallery (pictureResource.getPicture() gives the next
picture resource), and you can see the actual picture because it's in
the background, and the new picture slides in nicely.
However, if the device is in horizontal direction, the background got
stretched to the whole screen, which is bad for me, as all my pics are
portrait images. That's why I set the layout width to 320px, but that
doesn't help, the same effect as I used fill_parent

You can ask, why I don't use layers.

I tried, 2 ImageViews under each other and the bottom ImageView is
changed to store the current picture, while the top ImageView has the
new image (the one slides in), but in this way the slide-animation was
"under" all the ImageViews. In vertical direction, I could only see
the pictures changing without transition. I've seen the why in
horizontal direction: 'cause the animation is "under" the ImageViews
(both), the animation effect ended at the edge of the ImageView
container. After it slide in, the new image got shown, which is
alright, but ain't what I want. I wanna see the old image while the
new image slides in ABOVE the old image.
I used frameAnimation.setZAdjustment(Animation.ZORDER_TOP) but the
animation was still under the ImageViews.

Hope you understand my problem, and help me if you can



2. G1 Disability Accessibility

Was wondering if there's a Zoom features or Text-to-speech for those
with disabilities and low vision. I know the new 3.0 iphone does note
the links below. Thanks.

Here's iphone features:

Check out Video of how it works:


3. how to create AndroidManifest.xml

4. G1 system UIDs inconsistent, none of the apps work, help.

5. android-sdk-windows-1.5_r2: How to show default keyboard autometically on focus of EditText.

6. UDP broadcast receiver

7. is Instant Messaging and Presence Service(IMPS) available in Android...