Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Picking up the pieces - Overcoming Device Fragmentation

Jan Berkel
October 26, 2012

Picking up the pieces - Overcoming Device Fragmentation

Talk given at Droidcon London, Oct 2012. Jan Berkel and Jon Schmidt.

Jan Berkel

October 26, 2012
Tweet

Other Decks in Programming

Transcript

  1. • Launched in 2008 • Upload, record, share original audio

    content • Receive feedback from the community directly on the waveform • 10+ million official app installs over all platforms “Unmute the web”
  2. SoundCloud on Android Connect to and receive updates from your

    account. Discover, listen, and interact with SoundCloud’s library of audio.
  3. MediaPlayer mp = new MediaPlayer(); mp.setDataSource(String.format("http://127.0.0.1:%d/", socketPort)); mp.prepare(); mp.start(); Connect

    to a Local Socket if (res.indexOf("User-Agent: stagefright") >= 0) { isStagefright = true; } Read the user agent
  4. if (mProxy == null) { mProxy = new StreamProxy(getApp()).init().start(); }

    mMediaPlayer.setDataSource( String.format("http://127.0.0.1:%d/%s", mProxy.getPort(), path) ); http://code.google.com/p/npr-android-app Stream Proxy
  5. • Control the connection logic • caching layer The Good

    The Bad • Still no control over buffer • Introduced new streaming problems Stream Proxy
  6. try { return getHttpClient().execute(target, request); } catch (NullPointerException e) {

    request.abort(); throw new BrokenHttpClientException(e); } HttpClient is broken
  7. if (Build.SDK_INT >= 10) // use built-in AAC else //

    slow vorbis encoding Only available on 2.3.3