Android's Missing MP3 Encoder: The Problem and Four Workarounds

https://hackernoon.imgix.net/images/cKPAEsXJWrhfQyDsfMKM3bKfsWt1-bn820kn.jpeg

A platform gap most developers meet the hard way, the four ways around it, and what each one costs.

Every phone you have ever owned plays MP3s. No public Android API will make you one.

That sentence sounds wrong the first time you read it, and it is the single most surprising thing I learned building audio features for an Android assistant. Android’s supported media formats table has two columns, encoder and decoder, and MP3 has a tick in exactly one of them. The platform will happily decode an MP3 at any bitrate you throw at it. It will not encode one, at any effort, through any API the SDK exposes..

If you are building anything that produces audio on Android, you will meet this. Here is what it means and what the options actually cost.

The gap, precisely

Two separate limits stack up, and confusing them wastes an afternoon.

...

Copyright of this story solely belongs to hackernoon.com. To see the full text click HERE

Read more