tags:

views:

30

answers:

2

Hi,

I'm very new to Android development and am trying to do something fairly simple, select from a picklist of tracks.

I have some code that in theory works, and this is as follows;

Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setType("vnd.android.cursor.dir/track");
this.startActivity(intent);

This works perfectly on the emulator, however when running on my Galaxy S, I get the following exception.

android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.PICK typ=vnd.android.cursor.dir/track }

I'm not really sure, nor can I seem to find how to correct the issue.

I apologise in advance if this is naivity on my part, but I'm just a bit puzzled that the code works on the emulator but not on the phone. Any advice or info would be gratefully received.

Many thanks in advance,

Neil.

A: 

Hi

Neil

As far as I know the particular exception occurs when you don't have any application on your device to handle the concerned intent type.

success_anil
Thanks for the response, but I thought that android has a built in library for displaying a list of tracks ? Certainly it comes with a music player that is more than capable. What I don't seem to be able to find is an example of how to do deal with this situation myself. Does anyone have examples to point me at ?
Neil