ODK Printing with Zebra - xlsform coding

Hi,

I am trying to set up a form so that it can print from ODK Collect using the Zebra MZ220 printer. I am having issues formatting the xlsform so that it will print - I’ve looked at the example widget and I can’t see where I’m going wrong. I have attached the relevant lines from the excel file. I only want to print text.

Any help would be much appreciated!

Carina

PrintCode_Sante.xlsx (9.38 KB)

Hi Carina,

Does the example form that you used work? That is, is the problem with
your form or with the printing function?

Yaw

··· On Mon, Jan 23, 2017 at 11:33 PM, wrote: > > Hi, > > I am trying to set up a form so that it can print from ODK Collect using the Zebra MZ220 printer. I am having issues formatting the xlsform so that it will print - I've looked at the example widget and I can't see where I'm going wrong. I have attached the relevant lines from the excel file. I only want to print text. > > Any help would be much appreciated! > > Carina > > -- > -- > 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.

What is the right print code? I have tried the PrintCode_Sante above but it
is throwing the error.
Kindly help.

··· On Tuesday, 24 January 2017 05:42:09 UTC+3, carina...@gmail.com wrote: > > > > Hi, > > I am trying to set up a form so that it can print from ODK Collect using > the Zebra MZ220 printer. I am having issues formatting the xlsform so that > it will print - I've looked at the example widget and I can't see where I'm > going wrong. I have attached the relevant lines from the excel file. I only > want to print text. > > Any help would be much appreciated! > > Carina

Hi Margaret,

Start from Printing Labels with the Printer Widget - ODK Docs.
Report back with the specific part of the process you are stuck on and
the exact error you get.

Thanks,

Yaw

··· On Wed, Mar 8, 2017 at 9:57 AM, Margaret Wambui wrote: > What is the right print code? I have tried the PrintCode_Sante above but it > is throwing the error. > Kindly help. > > > On Tuesday, 24 January 2017 05:42:09 UTC+3, carina...@gmail.com wrote: >> >> Hi, >> >> I am trying to set up a form so that it can print from ODK Collect using >> the Zebra MZ220 printer. I am having issues formatting the xlsform so that >> it will print - I've looked at the example widget and I can't see where I'm >> going wrong. I have attached the relevant lines from the excel file. I only >> want to print text. >> >> Any help would be much appreciated! >> >> Carina > > -- > -- > 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.

Hi Margaret,

There is currently no functionality to generate barcodes in Collect.
If this is a feature that is important to you, please file it at
Sign in to GitHub · GitHub.

To be clear, I think it’s a cool idea and I think we should build it,
but the first step is for you to file an issue. No issue, no feature.

Thanks,

Yaw

··· On Thu, Mar 9, 2017 at 1:37 AM, Margaret Wambui wrote: > Thanks Yaw for your prompt feedback. > > I am working on a crossing system where I start by scanning the parent > plants and pollinate them. After pollination, I get a fruit which is I > assign a code relating to both parents. How do I design this fruit code such > that it is printed as a barcode? Fields to include in barcode are crossid, > plotno and time. > > Thank you. > > > On Thursday, 9 March 2017 04:20:01 UTC+3, Yaw Anokwa wrote: >> >> Hi Margaret, >> >> Start from https://opendatakit.org/use/sensors/zebra-printer-driver. >> Report back with the specific part of the process you are stuck on and >> the exact error you get. >> >> Thanks, >> >> Yaw >> >> On Wed, Mar 8, 2017 at 9:57 AM, Margaret Wambui wrote: >> > What is the right print code? I have tried the PrintCode_Sante above but >> > it >> > is throwing the error. >> > Kindly help. >> > >> > >> > On Tuesday, 24 January 2017 05:42:09 UTC+3, carina...@gmail.com wrote: >> >> >> >> Hi, >> >> >> >> I am trying to set up a form so that it can print from ODK Collect >> >> using >> >> the Zebra MZ220 printer. I am having issues formatting the xlsform so >> >> that >> >> it will print - I've looked at the example widget and I can't see where >> >> I'm >> >> going wrong. I have attached the relevant lines from the excel file. I >> >> only >> >> want to print text. >> >> >> >> Any help would be much appreciated! >> >> >> >> Carina >> > >> > -- >> > -- >> > 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. > > -- > -- > 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.

And because there seems to be an issue with the snippet on the
website, attached is a sample form.

Yaw

print.xlsx (10.1 KB)

print.xml (992 Bytes)

··· On Fri, Mar 10, 2017 at 10:07 AM, Yaw Anokwa wrote: > Hi Margaret, > > There is currently no functionality to generate barcodes in Collect. > If this is a feature that is important to you, please file it at > https://github.com/opendatakit/collect/issues/new. > > To be clear, I think it's a cool idea and I think we should build it, > but the first step is for you to file an issue. No issue, no feature. > > Thanks, > > Yaw > > On Thu, Mar 9, 2017 at 1:37 AM, Margaret Wambui wrote: >> Thanks Yaw for your prompt feedback. >> >> I am working on a crossing system where I start by scanning the parent >> plants and pollinate them. After pollination, I get a fruit which is I >> assign a code relating to both parents. How do I design this fruit code such >> that it is printed as a barcode? Fields to include in barcode are crossid, >> plotno and time. >> >> Thank you. >> >> >> On Thursday, 9 March 2017 04:20:01 UTC+3, Yaw Anokwa wrote: >>> >>> Hi Margaret, >>> >>> Start from https://opendatakit.org/use/sensors/zebra-printer-driver. >>> Report back with the specific part of the process you are stuck on and >>> the exact error you get. >>> >>> Thanks, >>> >>> Yaw >>> >>> On Wed, Mar 8, 2017 at 9:57 AM, Margaret Wambui wrote: >>> > What is the right print code? I have tried the PrintCode_Sante above but >>> > it >>> > is throwing the error. >>> > Kindly help. >>> > >>> > >>> > On Tuesday, 24 January 2017 05:42:09 UTC+3, carina...@gmail.com wrote: >>> >> >>> >> Hi, >>> >> >>> >> I am trying to set up a form so that it can print from ODK Collect >>> >> using >>> >> the Zebra MZ220 printer. I am having issues formatting the xlsform so >>> >> that >>> >> it will print - I've looked at the example widget and I can't see where >>> >> I'm >>> >> going wrong. I have attached the relevant lines from the excel file. I >>> >> only >>> >> want to print text. >>> >> >>> >> Any help would be much appreciated! >>> >> >>> >> Carina >>> > >>> > -- >>> > -- >>> > 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. >> >> -- >> -- >> 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.

Hi everyone,

I have a repeat group that creates unique barcodes depending on the position(…)
If a have a repeat group of size 5, then I will print 5 unique barcodes. The problem is, I have to tap ‘Initiate Printing’ 5 times. This is cumbersome if I want to print many barcodes. Is there a way of printing all barcodes by just tapping ‘Initiate printing’ once?

Thanks,
Margaret

Hi Margaret,

There isn’t an easy way to do this. Moreover, it feels very specific
to your use case, so it’s unlikely to be added as a feature to the
core tools at this time.

That said, if someone else really wants this feature and can think of
an elegant way to build include it in Collect, I think the core team
would certainly consider it.

Yaw

··· On Mon, May 29, 2017 at 3:40 AM, wrote: > Hi everyone, > > I have a repeat group that creates unique barcodes depending on the position(..) > If a have a repeat group of size 5, then I will print 5 unique barcodes. The problem is, I have to tap 'Initiate Printing' 5 times. This is cumbersome if I want to print many barcodes. Is there a way of printing all barcodes by just tapping 'Initiate printing' once? > > Thanks, > Margaret > > -- > -- > 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.

Thanks Yaw,
Yes it’s a bit specific and I hope many will find this feature useful to be included.
Best

··· On Thursday, June 1, 2017 at 6:58:51 AM UTC+3, Yaw Anokwa wrote: > Hi Margaret, > > There isn't an easy way to do this. Moreover, it feels very specific > to your use case, so it's unlikely to be added as a feature to the > core tools at this time. > > That said, if someone else really wants this feature and can think of > an elegant way to build include it in Collect, I think the core team > would certainly consider it. > > Yaw > > On Mon, May 29, 2017 at 3:40 AM, wrote: > > Hi everyone, > > > > I have a repeat group that creates unique barcodes depending on the position(..) > > If a have a repeat group of size 5, then I will print 5 unique barcodes. The problem is, I have to tap 'Initiate Printing' 5 times. This is cumbersome if I want to print many barcodes. Is there a way of printing all barcodes by just tapping 'Initiate printing' once? > > > > Thanks, > > Margaret > > > > -- > > -- > > 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.

Hello Everyone,

Has anyone tried using ZD420 zebra printers to print directly from odk collect? I tried, the printer is connected but doesnt respond to print.

John

I tried only iMZ220
It’s difficult to say if it’s a problem with that printer or our app, because the app is not actively maintained and from my experience I know it wasn’t easy to use.

Hi,
I use odk collect to print directly using ZQ520 printer.
The error I get is ‘unfortunately, odk zebra printer has stopped’

My guess is that the problem is with the ODK sensors frameworks since immediately you tap on print, you are taken back to ‘initiate printing’
Bests,
Margaret

Hi @Margaret_Wambui
I tested printing in ODK some time ago and also noticed some issues. Tomorrow I’ll try to do that again and maybe I will be able to help you.

I was able to reproduce the issue. Here is the stacktrace:

  java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/core/app/ActivityCompat;
        at org.opendatakit.utilities.RuntimePermissionUtils.checkSelfAllPermission(RuntimePermissionUtils.java:34)
        at org.opendatakit.sensors.ui.activity.AddSensorActivity.onCreate(AddSensorActivity.java:60)
        at android.app.Activity.performCreate(Activity.java:6289)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2655)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2767)
        at android.app.ActivityThread.access$900(ActivityThread.java:177)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1449)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:145)
        at android.app.ActivityThread.main(ActivityThread.java:5951)
        at java.lang.reflect.Method.invoke(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:372)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.core.app.ActivityCompat" on path: DexPathList[[zip file "/system/framework/com.android.future.usb.accessory.jar", zip file "/data/app/org.opendatakit.sensors-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
        at org.opendatakit.utilities.RuntimePermissionUtils.checkSelfAllPermission(RuntimePermissionUtils.java:34) 
        at org.opendatakit.sensors.ui.activity.AddSensorActivity.onCreate(AddSensorActivity.java:60) 
        at android.app.Activity.performCreate(Activity.java:6289) 
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119) 
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2655) 
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2767) 
        at android.app.ActivityThread.access$900(ActivityThread.java:177) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1449) 
        at android.os.Handler.dispatchMessage(Handler.java:102) 
        at android.os.Looper.loop(Looper.java:145) 
        at android.app.ActivityThread.main(ActivityThread.java:5951) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at java.lang.reflect.Method.invoke(Method.java:372) 
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195) 
    	Suppressed: java.lang.ClassNotFoundException: androidx.core.app.ActivityCompat
        at java.lang.Class.classForName(Native Method)
        at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
        at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:504)

I think this pr will fix the problem release 2.1.4 by wbrunette · Pull Request #44 · getodk/sensors-framework · GitHub
@W_Brunette could you confirm?

Thanks @Grzesiek2010
Could you kindly build an apk?
Thank you

I can’t. You have to wait for that pr and next release.

I will look into the this and put out hopefully an updated apk in 24-48 hours.

Version 2.1.4 ALPHA of Sensors Framework and Zebra printer drivers have been release to the Play store.

Let us know if you have further issues.

Thank you @W_Brunette
I have now tested the apps and attached is a screen record of the behavior on my phone.
On the printer, the Bluetooth icon comes up and I assume a connection has been established but nothing prints out.

odkprinting.zip (3.8 MB)

Thanks,
Margaret

To confirm you have both Sensors Framework and the Zebra printer driver installed? It requires both to work.

Also simply try launching the Zebra printer driver from the list of apps. Does that work?