Yes ansh , you can do it by easily by java code... following link will help you
http://stackoverflow.com/questions/6287116/android-registering-a-headset-button-click-with-broadcastreceiver Thanks & Regards Manish Pathak Mobile Technology Innovator -- -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

