Android Question Bluetooth and photo-shutter

AlpVir

Well-Known Member
Licensed User
I am in possession of an very economic device used for taking selfies and connects via Bluetooth to smartphone.
Pressing the button I would like to make a very simple operation on smartphone; eg make a label visible.
I read the post https://www.b4x.com/android/forum/t...-bluetooth-signal-from-a-photo-shutter.52979/
I tried the tutorial https://www.b4x.com/android/forum/threads/android-bluetooth-bluetoothadmin-tutorial.14768/ but the device does not seem to be detected.
How to proceed ?
Thanks for the attention
 

AlpVir

Well-Known Member
Licensed User
How to identify the profile used by my photo-shutter?
It is I who have to decide?
It works perfectly with the app "camera" and is not detected by any B4A code I've tried.
With this photo-shutter is not given any app.
 
Upvote 0

DonManfred

Expert
Licensed User
Can you post a link to the manufacturer-site of this shutter? You should be able to find out more about the Device on their site.
 
Upvote 0

AlpVir

Well-Known Member
Licensed User
Upvote 0

DonManfred

Expert
Licensed User
Looks like it is recognized as a keyboard. So you´ll get Keyboardstrokes i guess..

See this: http://www.barbatricks.com/en/android-en/remap-ab-shutter-3-selfie-remote/

So i guess:

Pair the shutter with your device. Start your app and listen for keyboard-input....

Keycode 28 should be the TakePictureButton (115 for the big button). Do whatever you want after you got this keycode.
 
Last edited:
Upvote 0

AlpVir

Well-Known Member
Licensed User
Thank you all, but ....
I paired the photo shutter the smartphone; They are able to take pictures.
But I do not find any code that listens B4A this bluetooth device.
I turn on and turn off ....
I'm waiting ....
Nothing ....
 
Upvote 0

DonManfred

Expert
Licensed User
My Shutter arrived.

I connected it with bluetooth and i ran a app to test....

As expected check for the KeyCode pressed did the tríck as @tigrot already said.

B4X:
Sub Activity_KeyPress(KeyCode As Int) As Boolean 'Return True to consume the event
    Log($"Activity_KeyPress(${KeyCode})"$)
    If KeyCode = 24 Then
        Log("BIG Shutter Button clicked")
        Return True
    End If
    If KeyCode = 66 Then
        Log("SMALL Shutter Button clicked")
        Return True
    End If
End Sub
 
Upvote 0
Top