Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,732,310 Members 45,059 Now Online
XDA Developers Android and Mobile Development Forum

[DIY | TASKER] Use any bluetooth headset as remote camera shutter

Tip us?
 
aikon96
Old
#1  
Member - OP
Thanks Meter 19
Posts: 88
Join Date: Sep 2010
Lightbulb [DIY | TASKER] Use any bluetooth headset as remote camera shutter

Hey Guys,

I was searching for a bluetooth remote app to control camera app of my phone.
I only found some app:

https://play.google.com/store/apps/d...etooth_shutter

but the limitations were too uncool (only specific BT headset compatible).
Also I found a "Muku Labs Camera Shutter Remote Control for iOS and Android Devices", but with an expensive price...

So I looked arround and tried LLama and Tasker to get my "Sony SBH20" headset working.
Now, I created a tasker profile to get any kind of bluetooth headset working witch any camera app. I think this should also work on any other phone.

The only things you need is:

- ROOT
- Tasker App (3$) https://play.google.com/store/apps/d....taskerm&hl=de

- Bluetooth Headset with buttons

Ok, so here is my tasker profile:




Trigger:
-> Display on
-> Media Button -> button "play" -> grab [x]

-> App at foreground (all sony camera apps (AR-Effect, etc...))

So if, all of these triggers are set, the task "Bt CAM SHUTTER" will be started:

Run Shell
-> Command:
Quote:
input tap 1090 300
(This will emulate a touch at the camera button on your screen at: x= 1090px y=300px)
-> Set "use Root"



Congratulations, you got it!

Now start your sony camera app, connect your BT headset and press play button.
Hope I could help someone!

If you want to use this on any other phone / app, you have to modify the command. If you need to know, where the touch emulation has to be, you have to go to android settings -> dev. settings -> show cursor position:

Sony Z1 Compact |KitKat| [ROOTED]
The Following User Says Thank You to aikon96 For This Useful Post: [ Click to Expand ]
 
Xaeons
Old
(Last edited by Xaeons; 2nd June 2014 at 04:18 AM.)
#2  
Xaeons's Avatar
Senior Member
Thanks Meter 28
Posts: 178
Join Date: Aug 2010
Location: Manila, PH
Interesting. Mind attaching the tasker profile? The pictures aren't showing up on my end, firewall and all..
Nexus 7 FLO 32gb
(Paranoid Android | Franco Kernel)
Nexus 4 16gb
(Paranoid Android | Franco Kernel)
Xperia Z1 Compact
(Sony Stock .108 4.4.4 | Sony Stock Kernel | Rooted | UB | GravityBox)

My warranty has long been void
 
aikon96
Old
(Last edited by aikon96; 2nd June 2014 at 08:17 AM.)
#3  
Member - OP
Thanks Meter 19
Posts: 88
Join Date: Sep 2010
Trigger:
Quote:
<TaskerData sr="" dvi="1" tv="4.3u4m">
<Profile sr="prof9" ve="2">
<cdate>1401550126651</cdate>
<edate>1401688701016</edate>
<id>9</id>
<mid0>2</mid0>
<nme>Trigger BT Remote</nme>
<State sr="con0" ve="2">
<code>123</code>
<Int sr="arg0" val="1"/>
</State>
<State sr="con1" ve="2">
<code>105</code>
<Int sr="arg0" val="0"/>
<Int sr="arg1" val="0"/>
<Int sr="arg2" val="1"/>
<Int sr="arg3" val="0"/>
</State>
<App sr="con2" ve="2">
<cls0>com.sonymobile.androidapp.cameraaddon.areffe ct.AREffectApp</cls0>
<cls1>com.sony.motionshot.unlock.animation.UnlockA nimationActivity</cls1>
<cls2>com.sony.motionshot.record.RecordActivity</cls2>
<cls3>com.sonymobile.backgrounddefocus.ViewFinderA ctivity</cls3>
<cls4>com.sonyericsson.android.camera.CameraActivi ty</cls4>
<cls5>com.sonymobile.motiongraphforxperia.CaptureA ctivity</cls5>
<flags>2</flags>
<label0>AR-Effekt</label0>
<label1>Bewegungsaufnahme - Effekt [Animation]</label1>
<label2>Bewegungsaufnahme</label2>
<label3>Hintergrund-Unschärfe</label3>
<label4>Kamera</label4>
<label5>Motiongraph for Xperia™</label5>
<pkg0>com.sonymobile.androidapp.cameraaddon.areffe ct</pkg0>
<pkg1>com.sony.motionshot.unlock.animation</pkg1>
<pkg2>com.sony.motionshot</pkg2>
<pkg3>com.sonymobile.backgrounddefocus</pkg3>
<pkg4>com.sonyericsson.android.camera</pkg4>
<pkg5>com.sonymobile.motiongraphforxperia</pkg5>
</App>
</Profile>
<Task sr="task2">
<cdate>1401548223226</cdate>
<edate>1401652399441</edate>
<id>2</id>
<nme>Bt CAM SHUTTER</nme>
<pri>10</pri>
<Action sr="act0" ve="5">
<code>443</code>
<Int sr="arg0" val="4"/>
<Int sr="arg1" val="0"/>
</Action>
<Action sr="act1" ve="5">
<code>123</code>
<Str sr="arg0" ve="3">input tap 1090 300</Str>
<Int sr="arg1" val="0"/>
<Int sr="arg2" val="1"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
</Action>
<Action sr="act2" ve="5">
<code>254</code>
<Int sr="arg0" val="1"/>
</Action>
<Action sr="act3" ve="5">
<code>30</code>
<Int sr="arg0" val="100"/>
<Int sr="arg1" val="0"/>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
</Action>
<Action sr="act4" ve="5">
<code>538</code>
<Str sr="arg0" ve="3">Remote Pic</Str>
<Str sr="arg1" ve="3"/>
<Img sr="arg2" ve="2"/>
<Int sr="arg3" val="0"/>
<Str sr="arg4" ve="3">/system/media/audio/camera/sound1/shutter_done.wav</Str>
<Int sr="arg5" val="3"/>
</Action>
<Action sr="act5" ve="5">
<code>30</code>
<Int sr="arg0" val="300"/>
<Int sr="arg1" val="2"/>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
</Action>
<Action sr="act6" ve="5">
<code>254</code>
<Int sr="arg0" val="0"/>
</Action>
</Task>
</TaskerData>


Task:

Quote:
<TaskerData sr="" dvi="1" tv="4.3u4m">
<Task sr="task2">
<cdate>1401548223226</cdate>
<edate>1401652399441</edate>
<id>2</id>
<nme>Bt CAM SHUTTER</nme>
<pri>10</pri>
<Action sr="act0" ve="5">
<code>443</code>
<Int sr="arg0" val="4"/>
<Int sr="arg1" val="0"/>
</Action>
<Action sr="act1" ve="5">
<code>123</code>
<Str sr="arg0" ve="3">input tap 1090 300</Str>
<Int sr="arg1" val="0"/>
<Int sr="arg2" val="1"/>
<Str sr="arg3" ve="3"/>
<Str sr="arg4" ve="3"/>
<Str sr="arg5" ve="3"/>
</Action>
<Action sr="act2" ve="5">
<code>254</code>
<Int sr="arg0" val="1"/>
</Action>
<Action sr="act3" ve="5">
<code>30</code>
<Int sr="arg0" val="100"/>
<Int sr="arg1" val="0"/>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
</Action>
<Action sr="act4" ve="5">
<code>538</code>
<Str sr="arg0" ve="3">Remote Pic</Str>
<Str sr="arg1" ve="3"/>
<Img sr="arg2" ve="2"/>
<Int sr="arg3" val="0"/>
<Str sr="arg4" ve="3">/system/media/audio/camera/sound1/shutter_done.wav</Str>
<Int sr="arg5" val="3"/>
</Action>
<Action sr="act5" ve="5">
<code>30</code>
<Int sr="arg0" val="300"/>
<Int sr="arg1" val="2"/>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
</Action>
<Action sr="act6" ve="5">
<code>254</code>
<Int sr="arg0" val="0"/>
</Action>
</Task>
</TaskerData>
Sony Z1 Compact |KitKat| [ROOTED]
The Following User Says Thank You to aikon96 For This Useful Post: [ Click to Expand ]
 
Xaeons
Old
(Last edited by Xaeons; 2nd June 2014 at 05:05 PM.)
#4  
Xaeons's Avatar
Senior Member
Thanks Meter 28
Posts: 178
Join Date: Aug 2010
Location: Manila, PH
It works! I also have an SBH-20 and I could never figure out how to make this work. Thanks to this I could have all sorts of BT Triggers

If anyone's interested, I attached the xml file for tasker importing, just add AR in the application context if you have it coz I uninstalled it from my phone.
Attached Files
File Type: zip Trigger_BT_Remote.prf.zip - [Click for QR Code] (740 Bytes, 23 views)
Nexus 7 FLO 32gb
(Paranoid Android | Franco Kernel)
Nexus 4 16gb
(Paranoid Android | Franco Kernel)
Xperia Z1 Compact
(Sony Stock .108 4.4.4 | Sony Stock Kernel | Rooted | UB | GravityBox)

My warranty has long been void
 
aikon96
Old
#5  
Member - OP
Thanks Meter 19
Posts: 88
Join Date: Sep 2010
Nice to hear. Enjoy!
I'm just trying to get Shutter sound via soundspeaker while connected via Bluetooth...
Sony Z1 Compact |KitKat| [ROOTED]
 
Xaeons
Old
(Last edited by Xaeons; 3rd June 2014 at 01:08 PM.)
#6  
Xaeons's Avatar
Senior Member
Thanks Meter 28
Posts: 178
Join Date: Aug 2010
Location: Manila, PH
Quote:
Originally Posted by aikon96 View Post
Nice to hear. Enjoy!
I'm just trying to get Shutter sound via soundspeaker while connected via Bluetooth...
Yeah I noticed that too. Sometimes the shutter sound plays on the first try, but never plays on the consecutive tries, even when shutter sound is set to on in the camera settings.

On a side note, it works on my old MW600! (which I would really love to use instead of the SBH20 but the clip broke ) At least it'll have some use instead of gathering dust.

EDIT: I've been trying to get SoundAbout to work on this, but I have no luck. Don't want to buy the pro version if it won't work.
Nexus 7 FLO 32gb
(Paranoid Android | Franco Kernel)
Nexus 4 16gb
(Paranoid Android | Franco Kernel)
Xperia Z1 Compact
(Sony Stock .108 4.4.4 | Sony Stock Kernel | Rooted | UB | GravityBox)

My warranty has long been void
 
Xaeons
Old
#7  
Xaeons's Avatar
Senior Member
Thanks Meter 28
Posts: 178
Join Date: Aug 2010
Location: Manila, PH
Quote:
Originally Posted by aikon96 View Post
Nice to hear. Enjoy!
I'm just trying to get Shutter sound via soundspeaker while connected via Bluetooth...
Got it to work, albeit a slight workaround.

I used Play Ringtone instead of notify. It'll play even if phone is set to Vibrate mode because of the Notification volume action.
Can anyone test? I attached the tasker profile (unzip then import in tasker).
Attached Files
File Type: zip Trigger_BT_Remote_V2.prf.zip - [Click for QR Code] (788 Bytes, 13 views)
Nexus 7 FLO 32gb
(Paranoid Android | Franco Kernel)
Nexus 4 16gb
(Paranoid Android | Franco Kernel)
Xperia Z1 Compact
(Sony Stock .108 4.4.4 | Sony Stock Kernel | Rooted | UB | GravityBox)

My warranty has long been void
The Following User Says Thank You to Xaeons For This Useful Post: [ Click to Expand ]
 
aikon96
Old
#8  
Member - OP
Thanks Meter 19
Posts: 88
Join Date: Sep 2010
Thanks for the tip.
Sony Z1 Compact |KitKat| [ROOTED]

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Run, Jump, and Shoot in Tales of Ciaxia

There are certain types of games that have become paramount of the portable gaming world. As we have … more

Samsung Gear Live Stock Firmware Image Pulled, Temp Root

Just yesterday,XDA Recognized Developer and TV ProducerAdamOutlertore apart … more

Draw a Line and Let Your Device Do the Rest with LineitApp

Over the years, since evenbefore Android entered the scene, we have striven to … more

[APK] Chrome Beta 37 Brings First Traces of Material Design

With Android L on the horizon, it’s no surprise that Google’s … more