play external .mp3 file

by Victor Hugo » Fri, 23 Apr 2010 00:18:00 GMT

Sponsored Links
 Hi people,

im playing a mp3 file on my emulador using
that code:

MediaPlayer mediaPlayer = Player.create(getApplicationContext(),

but i need play a mp3 file from my server

how do i to play that mp3 file????



play external .mp3 file

by Rog茅rio de Souza Moraes » Fri, 23 Apr 2010 00:43:15 GMT

 Hi Victor,

take a look at this tutorial. I think this is what you want. 



2010/4/22 Victor Hugo <>


Sponsored Links

play external .mp3 file

by Victor Hugo » Fri, 23 Apr 2010 03:04:48 GMT

 ty Rogrio

On 22 abr, 13:43, Rogrio de Souza Moraes <>

> >

Other Threads

1. Eclipse not recoginizing my attached Hero, Ubuntu 9.10

Slightly unrelated topic but provided the solution none the less.

2. nullPointerException with custom ArrayAdapter

You need something like this in the getView to create the view if it 
hasn't been created already.:

                 if (convertView == null)
LayoutInflater inflater = Groups.this.getLayoutInflater(); convertView = inflater.inflate(R.layout.groupitem, null); }
hello, I have written a custom ArrayAdapter for a ListActivity : private class StepItemAdapter extends ArrayAdapter<Step> { public StepItemAdapter(Context context, List<Step> objects) { super(context, R.layout.step_list_item,, objects); } @Override public View getView(final int pos, View convertView, ViewGroup parent) { View v = super.getView(pos, convertView, parent); // will crash here // etc ... } } On the "onCreate" method of the activity I tell the activity to use this adapter with a list of object I get from somewhere else ("t.getSteps()") : adapter = new StepItemAdapter(this, t.getSteps()); this.setListAdapter(adapter); Everything works fine and the activity is displayed. But if I add a new object to the list and tell the adapter to refresh the view I've got an error : t.getSteps().add(3, new Step()); adapter.notifyDataSetChanged(); The "getView" method of my adapter is called, which is ok since the list view need to be updated, but I've got an exception on the call to "super.getView(pos, convertView, parent)". The stack trace : java.lang.NullPointerException at android.widget.ArrayAdapter.createViewFromResource( 355) at android.widget.ArrayAdapter.getView( at $StepItemAdapter.getView( at android.widget.HeaderViewListAdapter.getView( 220) at android.widget.AbsListView.obtainView( at android.widget.ListView.makeAndAddView( at android.widget.ListView.fillDown( at android.widget.ListView.fillSpecific( at android.widget.ListView.layoutChildren( at android.widget.AbsListView.onLayout( ... Do you guy have any ideas of what is going on ??
-- Sincerely, Brad Gies ----------------------------------------------------------------------- Bistro Bot - Bistro Blurb ----------------------------------------------------------------------- Never doubt that a small group of thoughtful, committed people can change the world. Indeed. It is the only thing that ever has - Margaret Mead --

3. Eclipse not recoginizing my attached Hero, Ubuntu 9.10

4. nullPointerException with custom ArrayAdapter

5. Downloads & Active installs numbers frozen on Developer Console?

6. Developer Console - update "Total" download count

7. Same problem