java - Is it possible to listen the click of a bluetooth button? -
i want launch remotely http request through android app.
is possible use example bluetooth selfie button http://www.dx.com/fr/p/wireless-bluetooth-v3-0-selfie-camera-remote-controller-shutter-for-ios-android-devices-black-353773#.viiaizgg8kq in order execute http request ?
so question : possible listen click of bluetooth button ? if how ?
this bluetooth button aimed @ taking pictures. or see hardware action remotely http request ?
best regards,
you can achieve this. not sure particular bluetooth button, have done others, principle should same.
these buttons paired bluetooth keyboards device. once connected activity gets signals corresponds keyboard key clicks (usually enter key, triggers shutter in standard camera app). means can overwrite onkeydown(int keycode, keyevent event)
, check if keycode bluetooth button sends. if case, http request, or whatever else like.
in order connect button, have write own broadcast receiver , listen different actions.
take @ action_bond_state_changed
, action_pairing_request
bonding bluetooth button , @ action_acl_connected
, action_acl_disconnect_requested
, action_acl_disconnected
, action_discovery_finished
handling different states.
also take @ developer documentation bluetooth devices here: http://developer.android.com/guide/topics/connectivity/bluetooth.html
Comments
Post a Comment