I recently bought an underwater camera case for phones that sends button presses over BLE, and since the app that comes with the case is a bit underwhelming, I took it upon myself to implement basic Bluetooth remote control functionality for OpenCamera, which you can find at https://github.com/elafargue/opencamera-ble
I tried to contact the author of OpenCamera about it, with no response so far. This is just a couple of hours of work, but implement the basics of a generic Bluetooth low energy remote control layer for OpenCamera, and support the "Kraken Smart Housing" only so far. I made an attempt at writing generic code that can support multiple types of BLE remotes, and would love to see contributions. So far, only the sutter button and Video/Photo switching are supported, but I am planning to add support for manual focus, ISO adjustments, as well as dispay of depth and temperature since the camera housing supports it.
After compiling my branch on Github, simply head to settings, select the remote control type (Kraken), select the housing, and enable the remote using the switch in preferences. When remote control is enabled, the app will keep trying to connect (every 5 seconds) to the case whenever it is running, so that it is super easy to use and reliable. It is designed to be used underwater after all, you don't want to bother about disconnects!
Looking forward to hearing feedback.
Ed
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry the delay in replying. Thanks for the work, that looks interesting!
Doing this as an Open Camera fork as you've shown is good with me (I mean, in theory it would be nice to integrate this into Open Camera main itself - but this could be difficult if every bluetooth remote/casing might have different APIs/behaviours).
I did wonder if an approach like https://play.google.com/store/apps/details?id=com.miband2.mibandselfie could be taken (where the separate app runs the service and communicates with the remote, and Open Camera just has the code to listen out for that service; also has the advantage that it works with a few other camera applications too). Though the Mi Band remote is much simpler (it's only a shutter button, and no UI integration, so the only code in Open Camera is that related to "cameraReceiver" in MainActivity.java).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2018-12-02
Thanks Mark!
If you look at my code, I have made a reasonable (?) attempt at making the integration fairly generic, and I can clean up further if you would consider a pull request to the main Open Camera repository.
Right now I have added a generic "Remote control" set of prefereces to support any type BLE remote, and I support 'remote types' that let the Bluetooth service decide how to handle each particular model of BLE remote, and send only standardized intents to the Main Activity.
The one small thing that could be made more generic is the "remote" icon that appears on the main screen when the remote is connected, since right now it looks like the Kraken Smart Housing :) Not difficult to generalize! Let me know !
As for a separate process, as you pointed out the Mi Band approach works fine for simple remotes, but I am afraid it is a bit more fragile - you need to make sure you have both apps running, the background Mi Band app connected, etc... Not great for my particular use-case where you are underwater and want everything to just work reliably.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2018-12-03
Just a quick update, I have implemented menu control as well - again, fairly generic implementation, as long as your remote has 3 buttons besides the shutter, that will work :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2020-08-26
Hi
i have seen your work with this implementation and it looks amazing.
i am glad it has been processed into the current app.
i have just created this disussion below in another thread but it looks like you guys have already done some good work.
*I have a seafrog underwater housing and i wanted to use open camera app with the housing.
i have the being pixal 2 triggering with shutter and i also got the zoom to work via the volume controls
*i would like the switch between video and photo button to work.
it uses a keyboard style button configuration.
is there anyway to configure the number 4 on the keyboard to activate the camera switch?
also the the number 3 changes between front and rear facing camera
could this be implemented aswell.
the housing auto connects to the app when i connect it manually
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I recently bought an underwater camera case for phones that sends button presses over BLE, and since the app that comes with the case is a bit underwhelming, I took it upon myself to implement basic Bluetooth remote control functionality for OpenCamera, which you can find at https://github.com/elafargue/opencamera-ble
I tried to contact the author of OpenCamera about it, with no response so far. This is just a couple of hours of work, but implement the basics of a generic Bluetooth low energy remote control layer for OpenCamera, and support the "Kraken Smart Housing" only so far. I made an attempt at writing generic code that can support multiple types of BLE remotes, and would love to see contributions. So far, only the sutter button and Video/Photo switching are supported, but I am planning to add support for manual focus, ISO adjustments, as well as dispay of depth and temperature since the camera housing supports it.
After compiling my branch on Github, simply head to settings, select the remote control type (Kraken), select the housing, and enable the remote using the switch in preferences. When remote control is enabled, the app will keep trying to connect (every 5 seconds) to the case whenever it is running, so that it is super easy to use and reliable. It is designed to be used underwater after all, you don't want to bother about disconnects!
Looking forward to hearing feedback.
Ed
Sorry the delay in replying. Thanks for the work, that looks interesting!
Doing this as an Open Camera fork as you've shown is good with me (I mean, in theory it would be nice to integrate this into Open Camera main itself - but this could be difficult if every bluetooth remote/casing might have different APIs/behaviours).
I did wonder if an approach like https://play.google.com/store/apps/details?id=com.miband2.mibandselfie could be taken (where the separate app runs the service and communicates with the remote, and Open Camera just has the code to listen out for that service; also has the advantage that it works with a few other camera applications too). Though the Mi Band remote is much simpler (it's only a shutter button, and no UI integration, so the only code in Open Camera is that related to "cameraReceiver" in MainActivity.java).
Thanks Mark!
If you look at my code, I have made a reasonable (?) attempt at making the integration fairly generic, and I can clean up further if you would consider a pull request to the main Open Camera repository.
Right now I have added a generic "Remote control" set of prefereces to support any type BLE remote, and I support 'remote types' that let the Bluetooth service decide how to handle each particular model of BLE remote, and send only standardized intents to the Main Activity.
The one small thing that could be made more generic is the "remote" icon that appears on the main screen when the remote is connected, since right now it looks like the Kraken Smart Housing :) Not difficult to generalize! Let me know !
As for a separate process, as you pointed out the Mi Band approach works fine for simple remotes, but I am afraid it is a bit more fragile - you need to make sure you have both apps running, the background Mi Band app connected, etc... Not great for my particular use-case where you are underwater and want everything to just work reliably.
Just a quick update, I have implemented menu control as well - again, fairly generic implementation, as long as your remote has 3 buttons besides the shutter, that will work :)
Hi
i have seen your work with this implementation and it looks amazing.
i am glad it has been processed into the current app.
i have just created this disussion below in another thread but it looks like you guys have already done some good work.
*I have a seafrog underwater housing and i wanted to use open camera app with the housing.
i have the being pixal 2 triggering with shutter and i also got the zoom to work via the volume controls
*i would like the switch between video and photo button to work.
it uses a keyboard style button configuration.
is there anyway to configure the number 4 on the keyboard to activate the camera switch?
also the the number 3 changes between front and rear facing camera
could this be implemented aswell.
the housing auto connects to the app when i connect it manually