I want to detect whether a headset is inserted or not in my android phone, when the application is first started. Could any one suggest a solution for this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
You can see if AudioManager gives you the status information you’re looking for:
http://developer.android.com/reference/android/media/AudioManager.html
Also look here:
http://developer.android.com/reference/android/content/Intent.html#ACTION_HEADSET_PLUG