Control FileMaker Go with a Bluetooth headset

 

Another AHA moment from a FileMaker developer, Robert Samnegård, of FileMakerbloggen.se:

Have you always wished that you could control your iOS device from a distance or are you longing for a version of FileMaker Go that works with the Apple Watch? FileMaker Go 14, our example app and a cheap Bluetooth headset will take you in the right direction.

I have built a simple app that take advantage of the new trigger feature of 14,OnExternalCommandReceived, and companion Get-function, Get(TriggerExternalEvent). The idea with this trigger is that you should be able to control music and video from a headset in FileMaker Go. We instead use this trigger to control a scoreboard.

The secret to controlling FileMaker Go with a Bluetooth headset?  The new Script Trigger OnExternalCommandReceived starts the process:

Triggers a script to run when the user presses one of the following buttons on the lock screen or on an external device: stop, play, pause, toggle play/pause, play next, play previous, or begin or end seeking forward or backward.

The Get(TriggerExternalEvent) function interprets the value received from the OnExternalCommandReceived script trigger:

Controls which media file to play based on the event that activated the OnExternalCommandReceived script trigger on the lock screen or an external device.

If [Get(TriggerExternalEvent) = 4 ]
Go to Record/Request/Page [Next]
AVPlayer Play [Object:: “Player”]
Else If [Get(TriggerExternalEvent) = 5 ]
Go to Record/Request/Page [Previous]
AVPlayer Play [Object:: “Player”]
End If

The AHA moment:  Using a bluetooth or other headset to grab the signal and do something besides control the AV player.  Check out this video of the controller in use:

 

Well done, Robert!

There is a download file at the link.

Source: Scoreboard remote – control your Go-app with Bluetooth headset | FileMakerBloggen

Liked Liked
Need FileMaker Development Help? Or to purchase FileMaker Software?
Contact FM Pro Gurus for help