Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7443319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:18:44+00:00 2026-05-29T11:18:44+00:00

I am trying to play audio with the ACTION_VIEW intent, but regardless on what

  • 0

I am trying to play audio with the ACTION_VIEW intent, but regardless on what type of sound file (.mp3, .3gpp etc.) I always get the same error:

E/AndroidRuntime(3007): android.content.ActivityNotFoundException: No Activity found to        handle Intent { act=android.intent.action.VIEW dat=/mnt/sdcard/recording-23363382.3gpp typ=audio/3gpp }

My code:

Firstly here is where I launch the activity:

    case R.id.largeThumbnailText:
        media_column_index = mediacursor
                .getColumnIndexOrThrow(MediaStore.Audio.Media.DATA);
        mediacursor.moveToPosition(lastClicked);
        mediaFileUri = Uri.parse(mediacursor.getString(media_column_index));
        media_column_index = mediacursor
                .getColumnIndexOrThrow(MediaStore.Audio.Media.MIME_TYPE);
        String mime = mediacursor.getString(media_column_index);
        Intent playAudioIntent = new Intent();
        playAudioIntent.setAction(Intent.ACTION_VIEW);
        playAudioIntent.setDataAndType(mediaFileUri, mime);
        startActivity(playAudioIntent);
        break;

This is where I initiate the mediacursor:

        String[] proj = { MediaStore.Audio.Media._ID,
                MediaStore.Audio.Media.DATA,
                MediaStore.Audio.Media.DISPLAY_NAME,
                MediaStore.Audio.Media.MIME_TYPE };
        mediacursor = getActivity().managedQuery(
                MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, proj, null,
                null, null);

I do the same thing with video, so I don’t see where the problem is. Might be worth mentioning that this is all done from within a fragment.

Forgot to mention I’m testing it on a HTC Sensation (android 2.3.4)

Appreciate any suggestions

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T11:18:45+00:00Added an answer on May 29, 2026 at 11:18 am

    Instead of your code

    Intent playAudioIntent = new Intent();
    playAudioIntent.setAction(Intent.ACTION_VIEW);
    playAudioIntent.setDataAndType(mediaFileUri, mime);
    startActivity(playAudioIntent);
    

    Try something like this:

    String movieurl = Environment.getExternalStorageDirectory() + "/Videos/Wildlife.wmv";
    
    Intent playAudioIntent = new Intent(Intent.ACTION_VIEW);
    playAudioIntent .setDataAndType(Uri.parse(movieurl), "video/*");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to play and audio file using DirectX dll. Audio.FromFile(Message 1.mp3).Play(); But
I'm trying to play an mp3 audio file on iPhone executing the following code:
i am trying to play an mp3 audio file, the file will be uploaded
I am trying to play an audio file when I click the button, but
I am trying to play audio in a Java applet but it is not
I am trying to play audio buffered sound (.wav) using AudioTrack. Please see the
I'm trying to have the audio file play as soon as the view controller
I am trying to play a video file using JMF but it gives me
I'm trying to play a 24bit audio file with my AutoHotkey app. It just
Ok, I'm trying to play an HTML audio code on iPad but does not

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.