LIVE FROM DROIDCON LONDON: Developers from music sharing app maker SoundCloud spoke about the perils of device fragmentation when building apps for Android, and provided advice on best practice.

SoundCloud’s Jon Schmidt and Jan Berkel outlined the company’s issues with the playback and recording functionality in various iterations of its app due to challenges presented by Android abstractions, third party media-player frameworks and codecs, and differing CPUs.

“There were no hard and fast rules we could rely on for optimising our code,” Berkel said.

“We had to work out what we could control and what we couldn’t control,” Schmidt added.

Fixing the device fragmentation issues gave the company a good insight into best practices, including the value of having a fall-back option for older devices if changes to code only applied for newer devices.

Other tips included thorough beta testing, using good quality crash reporting tools, not being afraid to resort to hacks to solve issues and reading source code and frameworks carefully.

“There were lots of time we had to go into the media code to understand what was going on,” said Berkel.