I work on application for Android. How I can know if user connected headphones or some other devices to the phone? I have no idea about it! Please help
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.
Try listening in a Broadcast receiver for
Intent.ACTION_HEADSET_PLUG: see http://developer.android.com/reference/android/content/Intent.html#ACTION_HEADSET_PLUG for more info.