I have some Android code that lets a user choose a song on their device:

        Intent intent = new Intent();
        intent.setAction(Intent.ACTION_PICK);
        intent.setData(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI);

        startActivityForResult(intent, 0);

This works fine on most Android devices, but not the Kindle Fire. On Kindle, the activity is not available. Is there another activity to try? Or does Kindle simply not allow these requests?

有帮助吗?

解决方案

On Kindle, the activity is not available.

You are requesting audio. The Kindle Fire HD does not ship with an audio playing app, so there is nothing that could handle that Intent. MediaStore.Video.Media.EXTERNAL_CONTENT_URI works, routing you to the "Personal Videos" app.

Is there another activity to try?

It would have to be something supported by some third-party app.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top