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 8981209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:16:36+00:00 2026-06-15T20:16:36+00:00

I am working on a Android media player application (Android ver 2.3 – 4.1

  • 0

I am working on a Android media player application (Android ver 2.3 – 4.1 to be supported). I want to detect audio path transitions, like speaker to wired-headset or wired-headset to BT etc. I need to take some action in my app on these transitions. So is there any single way (preferably broadcast-receiver) which Android provides when switching audio-paths? If possible I want to avoid detecting wired-headset and BT-headset connect/disconnect separately.

I am still adapting to Android and hoping for some help here.

Thanks in advance.

  • 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-06-15T20:16:37+00:00Added an answer on June 15, 2026 at 8:16 pm

    On Jellybean and later you might be able to get the information you want by using the MediaRouter class.

    The MediaRouter class has a hidden method named getSystemAudioRoute() that returns a RouteInfo object. You should be able to get hold of that method by using reflection on the MediaRouter class.
    Once you have the RouteInfo you can call getName() on it, which should return the name of the current audio route as a CharSequence.
    Keep in mind that this will just be a strong hint at where audio is being routed, as it’s up to the audio HAL to decide for each stream type where they should be routed.

    On Android versions earlier than Jellybean you could listen for broadcasts of the related intents (ACTION_HEADSET_PLUG, ACTION_HDMI_AUDIO_PLUG, etc).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on an android media player which needs equalizer. However, equalizer is only
I am working in android. I designed a video player in my application. Most
I have created a media player application using Android MediaPlayer API. The app is
Hi friends I have an issue with Android media player. It is working but
I have code for simple audio player on android. But it is not working
Currently I'm working on an app for Android phones. We want to detect features
I have a problem with Android media player, I'm working on some little quiz,
I've been working on a small media player app for Android. I'm having some
I am working on Android , I am creating a player for audio songs.
I want to stream the video from android phone camera to VLC media player

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.