Standard Android Music Player

by Nick Mitin » Tue, 09 Feb 2010 01:41:56 GMT


Sponsored Links
 Is there any way to pass a file or a playlist to a standard Android
Music Player? I guess almost all applications, for instance, i Music
do it.

--



Standard Android Music Player

by Sean Hodges » Tue, 09 Feb 2010 16:52:59 GMT


 Accroding to a comment in the OpenIntents site
( http://www.openintents.org/en/node/112 ), this should work:

Intent intent = new Intent(android.content.Intent.ACTION_VIEW);
Uri data = Uri.parse("file:///sdcard/song.mp3");
String type = "audio/mp3";
intent.setDataAndType(data, type);
startActivity(intent);

Haven't tested it though.




>


Sponsored Links


Other Threads

1. Samsung Extravaganza plus plus on Mirdak Yogya @Starbucks Amplaz dimulai jam 16:00 hari Rab

As per judul,
Mau mirdak lagi di Yogya, buat yang tertarik dateng, sumangga kemawon,
agenda:

1. Bahas dan Rooting Spica (masih dalam konfirmasi)
2. Bahas dan rooting SGS (confirmed)
3. Tutorial by request:
 - creating avd environment
 - boot animasi
 - splash screen
 - masak ROM sendiri dengan bahan-bahan yang sudah tersedia
 - editing apk
 - editing binary xml pakai hex editor
 - editing classes.dex / deodex pakai smali dan baksmali
-  compile kernel <-- ga janji yaa, tutornya aja muntah-muntah
 - de el el tergantung request dah asal waktunya cukup

Waktu: Rabu, 28 Juli 2010, jam 16:00 sampai selesai (diharapkan
sebelum Maghrib dah selesai)
Tempat: Starbucks Ambarukmo Plaza

Gak ada sponsor, jadi go dutch yak :p kemarin sempet nanya ke
manajernya, dibilang: "besok besok aja ya Gun" beuh....

Be there or NOT be there!!!!
Yang mau ngubrul , kenalan dan cari elmu, dipersilahkan.....

-- 
"Indonesian Android Community [id-android]" 

2. How does the Marketplace app widget use a ViewFlipper? (or a fading view)

Hi, I am trying to create a widget which functions in a similar manner
to the new Marketplace widget.

The Marketplace widget fades between different views (each view being
a sample Marketplace app with a TextView and an ImageView describing
the Marketplace app).  I would like to mimic this fading between
different views behavior.  Unfortunately, as is clearly stated in
http://developer.android.com/guide/topics/appwidgets/index.html#CreatingLayout
a ViewFlipper view is not supported.

So, how can we mimic this fading behavior?

1. RemoteViews requires any view's class that is added to implement
@RemoteView.  I tried creating the following class:
@RemoteView
public class MyViewFlipper extends ViewFlipper
{
        public MyViewFlipper(Context context)
        {
                super(context);
        }

        public MyViewFlipper(Context context, AttributeSet attrs)
        {
                super(context, attrs);
        }
}
but referencing that class in the layout will cause the widget's view
to fail to load. ("Problem loading widget")  So my trick about trying
to use @RemoteView doesn't work.

2. Update the widget a LOT (via AlarmManager) for a short period of
time.  During this time, we will somehow set the transparency of one
view down while the other's goes up.  But I believe this is a very
inefficient way of doing this, because the AlarmManager is not meant
for updates that occur more frequently than a second.

3. ???  Someone help me out here :)  Could I start an AsyncTask which
will do #2 but without the AlarmManager?  Heck, I don't even know
exactly how the fade really works.  Any other ideas would help too!

Thanks for the advice!
-Matt

-- 

3. Driver for USB device

4. INTENT_SEND and attached files

5. Sharedpreference info get overwritten each time I did a version update?

6. Custom "filter" on ListView

7. Why are all audio formats always passed to the Music Player ?