Tuesday, August 23, 2011

[android-developers] Re: Determining audio decoders available

Of course there is:
-----------------------------------------------------------------------------------------------------
Intent intent = new Intent(android.content.Intent.ACTION_VIEW);
Uri data = Uri.fromFile(new File("/sdcard/test.wma"));
intent.setDataAndType(data, "audio/wma");
List<ResolveInfo> resolveInfos=
getPackageManager().queryIntentActivities (intent, 0);
boolean wmaCodecReady=resolveInfos.size()>0;
--------------------------------------------------------------------------------------------------------------
the above code may not pass compile and is just FYI.
Hope it helps!

On Aug 24, 6:40 am, b0b <pujos.mich...@gmail.com> wrote:
> Is there a sensible way to detect if a particular audio decoder  which
> may or may not be present depending on manufaturers,  is available
> (for example: WMA) ?
>
> Right now I'm asking the user. There has to be a better way ?

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment