Serial Bluetooth Widget

Hello,

I attempted to post this before but it looks like it never went through!
sorry if this is a repeat.

I am attempting to make a custom parsing widget that connects to a HC-06
bluetooth transmitter I'm attaching to a measurement device. I'd like the
widget to pop up a dialog to connect to the transmitter, then show the
parsed response (an instrument reading) and return that reading to ODK.

I have been using the image widget as inspiration, and I have figured out
that the image widget QuestionWidget is called from the widget factory that
matches the form entry prompt to a constant. Where I'm stuck is that the
Constants being matched are all defined in a locked Constants file that is
part of javaRosa. I suppose I should define the new constant somewhere
else? Any pointers on how to do this would be great!

Thanks,
Ethan

I see! The answer to this is to write an external app as specified here:
https://opendatakit.org/help/form-design/external-apps/ Sorry about
cluttering the threads!

··· On Tuesday, March 1, 2016 at 9:42:14 AM UTC-5, Ethan Keller wrote: > > Hello, > > I attempted to post this before but it looks like it never went through! > sorry if this is a repeat. > > I am attempting to make a custom parsing widget that connects to a HC-06 > bluetooth transmitter I'm attaching to a measurement device. I'd like the > widget to pop up a dialog to connect to the transmitter, then show the > parsed response (an instrument reading) and return that reading to ODK. > > I have been using the image widget as inspiration, and I have figured out > that the image widget QuestionWidget is called from the widget factory that > matches the form entry prompt to a constant. Where I'm stuck is that the > Constants being matched are all defined in a locked Constants file that is > part of javaRosa. I suppose I should define the new constant somewhere > else? Any pointers on how to do this would be great! > > Thanks, > Ethan >

Questions about modifying or extending the Java software should be asked on
the opendatakit-developers@ list.

··· ===========

And an example of an external app that fills in a single field is provided
here:

We switched to this external-app mechanism so that users did not need to
extend/modify ODK Collect to work with every new sensor.

You may find the ODK Sensors Framework helpful when integrating with your
sensor. It handles the generic steps of setting up bluetooth communications
with your sensor. The Zebra Printer (
https://opendatakit.org/help/form-design/examples/#printing_widgets ) is an
example of its use (which is itself a superficially-modified version of the
external app mechanism).

See

On Wed, Mar 2, 2016 at 6:58 PM, Ethan Keller ethan.keller@gmail.com wrote:

I see! The answer to this is to write an external app as specified here:
https://opendatakit.org/help/form-design/external-apps/ Sorry about
cluttering the threads!

On Tuesday, March 1, 2016 at 9:42:14 AM UTC-5, Ethan Keller wrote:

Hello,

I attempted to post this before but it looks like it never went through!
sorry if this is a repeat.

I am attempting to make a custom parsing widget that connects to a HC-06
bluetooth transmitter I'm attaching to a measurement device. I'd like the
widget to pop up a dialog to connect to the transmitter, then show the
parsed response (an instrument reading) and return that reading to ODK.

I have been using the image widget as inspiration, and I have figured out
that the image widget QuestionWidget is called from the widget factory that
matches the form entry prompt to a constant. Where I'm stuck is that the
Constants being matched are all defined in a locked Constants file that is
part of javaRosa. I suppose I should define the new constant somewhere
else? Any pointers on how to do this would be great!

Thanks,
Ethan

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

Thanks so much for the help! Sorry I posted to the wrong thread.

I was able to build a simple bluetooth app that connects to my sensor
https://github.com/ethan92429/post_widget_bt, but I'll definitely be
looking into the sensors framework.

··· On Thursday, March 17, 2016 at 5:45:23 PM UTC-4, Mitch Sundt wrote: > > Questions about modifying or extending the Java software should be asked > on the opendatakit-developers@ list. > > =========== > > And an example of an external app that fills in a single field is provided > here: > > https://github.com/opendatakit/breathcounter > > We switched to this external-app mechanism so that users did not need to > extend/modify ODK Collect to work with every new sensor. > > You may find the ODK Sensors Framework helpful when integrating with your > sensor. It handles the generic steps of setting up bluetooth communications > with your sensor. The Zebra Printer ( > https://opendatakit.org/help/form-design/examples/#printing_widgets ) is > an example of its use (which is itself a superficially-modified version of > the external app mechanism). > > See > https://github.com/opendatakit/sensordrivers/tree/master/ZebraMzSeriesPrinter > > > > > > > On Wed, Mar 2, 2016 at 6:58 PM, Ethan Keller <ethan....@gmail.com > wrote: > >> I see! The answer to this is to write an external app as specified here: >> https://opendatakit.org/help/form-design/external-apps/ Sorry about >> cluttering the threads! >> >> >> On Tuesday, March 1, 2016 at 9:42:14 AM UTC-5, Ethan Keller wrote: >>> >>> Hello, >>> >>> I attempted to post this before but it looks like it never went through! >>> sorry if this is a repeat. >>> >>> I am attempting to make a custom parsing widget that connects to a HC-06 >>> bluetooth transmitter I'm attaching to a measurement device. I'd like the >>> widget to pop up a dialog to connect to the transmitter, then show the >>> parsed response (an instrument reading) and return that reading to ODK. >>> >>> I have been using the image widget as inspiration, and I have figured >>> out that the image widget QuestionWidget is called from the widget factory >>> that matches the form entry prompt to a constant. Where I'm stuck is that >>> the Constants being matched are all defined in a locked Constants file that >>> is part of javaRosa. I suppose I should define the new constant somewhere >>> else? Any pointers on how to do this would be great! >>> >>> Thanks, >>> Ethan >>> >> -- >> -- >> Post: opend...@googlegroups.com >> Unsubscribe: opendatakit...@googlegroups.com >> Options: http://groups.google.com/group/opendatakit?hl=en >> >> --- >> You received this message because you are subscribed to the Google Groups >> "ODK Community" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to opendatakit...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Mitch Sundt > Software Engineer > University of Washington > mitche...@gmail.com >