Android Tutorial - Play Online Music Mp3 / Stream Music

Blockchain & Crypto Tutorials · 53K views · 2011 · 15:32

Open on YouTube

Software (other)Web developmenttutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it as a worked example of streaming audio with Android's MediaPlayer, both in answers about background playback and in questions that follow it as a base.

Recommended by 2 people across 2 different months, 2012 to 2016.

What it is

A 2011 Android developer tutorial that walks through building an app which streams an online MP3 and a simple music player with volume controls. It is a screen-recorded, code-along walkthrough of about 15 minutes, with a downloadable sample project offered by the channel.

What people said

Recommends Anup Cowkur · 2012-10 · Stack Overflow · on “How to play streamed audio in background on Android?”

You have to use something called Android Services. From the docs: "A Service is an application component representing either an application's desire to perform a longer-running operation while not interacting with the user or to supply functionality for other applications to use." Here's the excellent official guide to using services to get you started: [LINK] Here's a good tutorial on building an audio player: [LINK] Here's a video tutorial for building a streaming music player: [this video]

Recommends Dinesh Saini · 2016-08 · Stack Overflow · on “hardware back button on Android is stopping the app”

You have to use something called Android Services. From the docs: "A Service is an application component representing either an application's desire to perform a longer-running operation while not interacting with the user or to supply functionality for other applications to use." Here's the excellent official guide to using services to get you started: [LINK] Here's a good tutorial on building an audio player: [LINK] Here's a video tutorial for building a streaming music player: [this video]

Cites user3047537 · 2014-02 · Stack Overflow · on “NFC and Media Player playing files from URL”

I have a problem playing (streaming) MP3 files using Android's Media Player. My idea is to read NFC tag and place that data URL into a string (songs_urls). After that, media player should use that string and play file from that link. Everything works fine when I define link, for example String link = " [LINK] ", but the problem is when I want to read it from the NFC tag. I have followed this tutorial to build Media Player: [this video] . Everything regarding Media Player is in onCreate() function. NFC part is in the onResume() function. So I have, just moved the Media Player code below from onCreate() to onResume(). Here is the MP code I've moved to onResume() : ImageButton btn_play = (ImageButto