ODK Client with NFC

Hi everybody,

i'm trying to implement NFC to write direct to an EditText but i have a
problem that i'm trying to solve without success..

The purpose is the following:
if i'm in a Text Box scan an NFC tag and the text that tag contains will be
write down to Text Box.

I have implement everything regarding NFC in FormEntryActivity (and in
message box i can view the string that tag contains) but when I set
programmatically the Text of EditText with the value of the tag the program
presents me instantly the new value in Text Box but returns me to the old
value (null if i didn't write anything before)...

Any Ideas why the programms clearing the New Value... ??

Panos

I suspect you are encountering issues with saving and restoring values in a
view.

You might first get this working using the "String from 3rd party
application" widget, where you have a stand-alone app that does the NFC
interaction, and returns the value into the string widget.

Once you have that working, then there is the question of how to stitch the
NFC interactions into the main application and get the result to plumb
through to the proper StringWidget.

If you understand the return flow from the 3rd party app back into the
widget, it will be easier to figure out what you need to do.

··· On Fri, Sep 5, 2014 at 6:11 AM, Panos Papadatos wrote:

Hi everybody,

i'm trying to implement NFC to write direct to an EditText but i have a
problem that i'm trying to solve without success..

The purpose is the following:
if i'm in a Text Box scan an NFC tag and the text that tag contains will
be write down to Text Box.

I have implement everything regarding NFC in FormEntryActivity (and in
message box i can view the string that tag contains) but when I set
programmatically the Text of EditText with the value of the tag the program
presents me instantly the new value in Text Box but returns me to the old
value (null if i didn't write anything before)...

Any Ideas why the programms clearing the New Value... ??

Panos

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

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

Hi Mitchd,

I have made the implementation without an external app. I wrote the code directly to Form EntryActivity, and i get the focusable edittextbox to write with a setText command....

All above done well but afte setText i get always the previous value. Instantly i saw the tag value but after that text will be return to previous value...

In case of simple string type in which case the value will be cleared.. Is it possible to send you the code of FormEntryActivity to get a look?

Thanks
Panos

Panos,

Don't write the code directly to the FormEntryActivity. It's a big and
complex class and it's not easy to review. Write an external app or
clone a working widget and start there.

Yaw

··· -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

On Fri, Sep 5, 2014 at 3:31 PM, Panos Papadatos ppapadatosgr@gmail.com wrote:

Hi Mitchd,

I have made the implementation without an external app. I wrote the code directly to Form EntryActivity, and i get the focusable edittextbox to write with a setText command....

All above done well but afte setText i get always the previous value. Instantly i saw the tag value but after that text will be return to previous value...

In case of simple string type in which case the value will be cleared.. Is it possible to send you the code of FormEntryActivity to get a look?

Thanks
Panos

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

Do you have any example for external app implementation?
έγραψε:

··· Στις 7 Σεπ 2014 12:19 π.μ., ο χρήστης "Yaw Anokwa"

Panos,

Don't write the code directly to the FormEntryActivity. It's a big and
complex class and it's not easy to review. Write an external app or
clone a working widget and start there.

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

On Fri, Sep 5, 2014 at 3:31 PM, Panos Papadatos ppapadatosgr@gmail.com wrote:

Hi Mitchd,

I have made the implementation without an external app. I wrote the code
directly to Form EntryActivity, and i get the focusable edittextbox to
write with a setText command....

All above done well but afte setText i get always the previous value.
Instantly i saw the tag value but after that text will be return to
previous value...

In case of simple string type in which case the value will be cleared..
Is it possible to send you the code of FormEntryActivity to get a look?

Thanks
Panos

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

--
You received this message because you are subscribed to a topic in the
Google Groups "ODK Developers" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit-developers/W-Jt9Gd7ags/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

BreathCounter: https://code.google.com/p/opendatakit/source/browse/?repo=androidextras

Yaw

··· -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

On Sat, Sep 6, 2014 at 5:22 PM, Panos Papadatos ppapadatosgr@gmail.com wrote:

Do you have any example for external app implementation?

Στις 7 Σεπ 2014 12:19 π.μ., ο χρήστης "Yaw Anokwa" yanokwa@nafundi.com
έγραψε:

Panos,

Don't write the code directly to the FormEntryActivity. It's a big and
complex class and it's not easy to review. Write an external app or
clone a working widget and start there.

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

On Fri, Sep 5, 2014 at 3:31 PM, Panos Papadatos ppapadatosgr@gmail.com wrote:

Hi Mitchd,

I have made the implementation without an external app. I wrote the code
directly to Form EntryActivity, and i get the focusable edittextbox to write
with a setText command....

All above done well but afte setText i get always the previous value.
Instantly i saw the tag value but after that text will be return to previous
value...

In case of simple string type in which case the value will be cleared..
Is it possible to send you the code of FormEntryActivity to get a look?

Thanks
Panos

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

--
You received this message because you are subscribed to a topic in the
Google Groups "ODK Developers" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit-developers/W-Jt9Gd7ags/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

Hi Yaw,

does it works with xlsform ???

I have made the form with xlsform and i'm trying to find out what to write
in excel
Do you have such an example ??

Panos

··· On Sunday, September 7, 2014 12:50:22 AM UTC+3, Yaw Anokwa wrote: > > BreathCounter: > https://code.google.com/p/opendatakit/source/browse/?repo=androidextras > > > Yaw > -- > Need ODK services? http://nafundi.com provides form design, server > setup, professional support, and software development for ODK. > > On Sat, Sep 6, 2014 at 5:22 PM, Panos Papadatos <ppapad...@gmail.com > wrote: > > Do you have any example for external app implementation? > > > > Στις 7 Σεπ 2014 12:19 π.μ., ο χρήστης "Yaw Anokwa" > > > έγραψε: > >> > >> Panos, > >> > >> Don't write the code directly to the FormEntryActivity. It's a big and > >> complex class and it's not easy to review. Write an external app or > >> clone a working widget and start there. > >> > >> Yaw > >> -- > >> Need ODK services? http://nafundi.com provides form design, server > >> setup, professional support, and software development for ODK. > >> > >> On Fri, Sep 5, 2014 at 3:31 PM, Panos Papadatos <ppapad...@gmail.com > wrote: > >> > Hi Mitchd, > >> > > >> > I have made the implementation without an external app. I wrote the > code > >> > directly to Form EntryActivity, and i get the focusable edittextbox > to write > >> > with a setText command.... > >> > > >> > All above done well but afte setText i get always the previous value. > >> > Instantly i saw the tag value but after that text will be return to > previous > >> > value... > >> > > >> > In case of simple string type in which case the value will be > cleared.. > >> > Is it possible to send you the code of FormEntryActivity to get a > look? > >> > > >> > Thanks > >> > Panos > >> > > >> > -- > >> > You received this message because you are subscribed to the Google > >> > Groups "ODK Developers" group. > >> > To unsubscribe from this group and stop receiving emails from it, > send > >> > an email to opendatakit-developers+unsubscribe@googlegroups.com > . > >> > For more options, visit https://groups.google.com/d/optout. > >> > >> -- > >> You received this message because you are subscribed to a topic in the > >> Google Groups "ODK Developers" group. > >> To unsubscribe from this topic, visit > >> > https://groups.google.com/d/topic/opendatakit-developers/W-Jt9Gd7ags/unsubscribe. > > >> To unsubscribe from this group and all its topics, send an email to > >> opendatakit-developers+unsubscribe@googlegroups.com . > >> For more options, visit https://groups.google.com/d/optout. > > > > -- > > You received this message because you are subscribed to the Google > Groups > > "ODK Developers" group. > > To unsubscribe from this group and stop receiving emails from it, send > an > > email to opendatakit-developers+unsubscribe@googlegroups.com > . > > For more options, visit https://groups.google.com/d/optout. >

Panos,

I don't have any XLS example. Your best bet is to use XML for now.

https://code.google.com/p/opendatakit/source/browse/BreathCounter/breathTest.xml?repo=androidextras

Yaw

··· -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

On Sun, Sep 7, 2014 at 3:03 PM, Panos Papadatos ppapadatosgr@gmail.com wrote:

Hi Yaw,

does it works with xlsform ???

I have made the form with xlsform and i'm trying to find out what to write
in excel
Do you have such an example ??

Panos

On Sunday, September 7, 2014 12:50:22 AM UTC+3, Yaw Anokwa wrote:

BreathCounter:
https://code.google.com/p/opendatakit/source/browse/?repo=androidextras

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

On Sat, Sep 6, 2014 at 5:22 PM, Panos Papadatos ppapad...@gmail.com wrote:

Do you have any example for external app implementation?

Στις 7 Σεπ 2014 12:19 π.μ., ο χρήστης "Yaw Anokwa" yan...@nafundi.com
έγραψε:

Panos,

Don't write the code directly to the FormEntryActivity. It's a big and
complex class and it's not easy to review. Write an external app or
clone a working widget and start there.

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

On Fri, Sep 5, 2014 at 3:31 PM, Panos Papadatos ppapad...@gmail.com wrote:

Hi Mitchd,

I have made the implementation without an external app. I wrote the
code
directly to Form EntryActivity, and i get the focusable edittextbox
to write
with a setText command....

All above done well but afte setText i get always the previous value.
Instantly i saw the tag value but after that text will be return to
previous
value...

In case of simple string type in which case the value will be
cleared..
Is it possible to send you the code of FormEntryActivity to get a
look?

Thanks
Panos

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

--
You received this message because you are subscribed to a topic in the
Google Groups "ODK Developers" group.
To unsubscribe from this topic, visit

https://groups.google.com/d/topic/opendatakit-developers/W-Jt9Gd7ags/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

So the only way is to write a form ins xls convert it to xml and edit the
generated xml using the instructions you send me???

··· On Tuesday, September 9, 2014 7:08:40 PM UTC+3, Yaw Anokwa wrote: > > Panos, > > I don't have any XLS example. Your best bet is to use XML for now. > > http://opendatakit.org/help/form-design/external-apps/ > > > https://code.google.com/p/opendatakit/source/browse/BreathCounter/breathTest.xml?repo=androidextras > > Yaw > -- > Need ODK services? http://nafundi.com provides form design, server > setup, professional support, and software development for ODK. > > On Sun, Sep 7, 2014 at 3:03 PM, Panos Papadatos <ppapad...@gmail.com > wrote: > > Hi Yaw, > > > > does it works with xlsform ??? > > > > I have made the form with xlsform and i'm trying to find out what to > write > > in excel > > Do you have such an example ?? > > > > Panos > > > > On Sunday, September 7, 2014 12:50:22 AM UTC+3, Yaw Anokwa wrote: > >> > >> BreathCounter: > >> https://code.google.com/p/opendatakit/source/browse/?repo=androidextras > >> > >> > >> Yaw > >> -- > >> Need ODK services? http://nafundi.com provides form design, server > >> setup, professional support, and software development for ODK. > >> > >> On Sat, Sep 6, 2014 at 5:22 PM, Panos Papadatos wrote: > >> > Do you have any example for external app implementation? > >> > > >> > Στις 7 Σεπ 2014 12:19 π.μ., ο χρήστης "Yaw Anokwa" < > yan...@nafundi.com> > >> > έγραψε: > >> >> > >> >> Panos, > >> >> > >> >> Don't write the code directly to the FormEntryActivity. It's a big > and > >> >> complex class and it's not easy to review. Write an external app or > >> >> clone a working widget and start there. > >> >> > >> >> Yaw > >> >> -- > >> >> Need ODK services? http://nafundi.com provides form design, server > >> >> setup, professional support, and software development for ODK. > >> >> > >> >> On Fri, Sep 5, 2014 at 3:31 PM, Panos Papadatos wrote: > >> >> > Hi Mitchd, > >> >> > > >> >> > I have made the implementation without an external app. I wrote > the > >> >> > code > >> >> > directly to Form EntryActivity, and i get the focusable > edittextbox > >> >> > to write > >> >> > with a setText command.... > >> >> > > >> >> > All above done well but afte setText i get always the previous > value. > >> >> > Instantly i saw the tag value but after that text will be return > to > >> >> > previous > >> >> > value... > >> >> > > >> >> > In case of simple string type in which case the value will be > >> >> > cleared.. > >> >> > Is it possible to send you the code of FormEntryActivity to get a > >> >> > look? > >> >> > > >> >> > Thanks > >> >> > Panos > >> >> > > >> >> > -- > >> >> > You received this message because you are subscribed to the Google > >> >> > Groups "ODK Developers" group. > >> >> > To unsubscribe from this group and stop receiving emails from it, > >> >> > send > >> >> > an email to opendatakit-developers+unsubscribe@googlegroups.com > . > >> >> > For more options, visit https://groups.google.com/d/optout. > >> >> > >> >> -- > >> >> You received this message because you are subscribed to a topic in > the > >> >> Google Groups "ODK Developers" group. > >> >> To unsubscribe from this topic, visit > >> >> > >> >> > https://groups.google.com/d/topic/opendatakit-developers/W-Jt9Gd7ags/unsubscribe. > > >> >> To unsubscribe from this group and all its topics, send an email to > >> >> opendatakit-developers+unsubscribe@googlegroups.com . > >> >> For more options, visit https://groups.google.com/d/optout. > >> > > >> > -- > >> > You received this message because you are subscribed to the Google > >> > Groups > >> > "ODK Developers" group. > >> > To unsubscribe from this group and stop receiving emails from it, > send > >> > an > >> > email to opendatakit-developers+unsubscribe@googlegroups.com > . > >> > For more options, visit https://groups.google.com/d/optout. > > > > -- > > You received this message because you are subscribed to the Google > Groups > > "ODK Developers" group. > > To unsubscribe from this group and stop receiving emails from it, send > an > > email to opendatakit-developers+unsubscribe@googlegroups.com > . > > For more options, visit https://groups.google.com/d/optout. >

For now, yes. That is what I would recommend.

Yaw

··· -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

On Tue, Sep 9, 2014 at 10:28 AM, Panos Papadatos ppapadatosgr@gmail.com wrote:

So the only way is to write a form ins xls convert it to xml and edit the
generated xml using the instructions you send me???

On Tuesday, September 9, 2014 7:08:40 PM UTC+3, Yaw Anokwa wrote:

Panos,

I don't have any XLS example. Your best bet is to use XML for now.

http://opendatakit.org/help/form-design/external-apps/

https://code.google.com/p/opendatakit/source/browse/BreathCounter/breathTest.xml?repo=androidextras

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

On Sun, Sep 7, 2014 at 3:03 PM, Panos Papadatos ppapad...@gmail.com wrote:

Hi Yaw,

does it works with xlsform ???

I have made the form with xlsform and i'm trying to find out what to
write
in excel
Do you have such an example ??

Panos

On Sunday, September 7, 2014 12:50:22 AM UTC+3, Yaw Anokwa wrote:

BreathCounter:
https://code.google.com/p/opendatakit/source/browse/?repo=androidextras

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

On Sat, Sep 6, 2014 at 5:22 PM, Panos Papadatos ppapad...@gmail.com wrote:

Do you have any example for external app implementation?

Στις 7 Σεπ 2014 12:19 π.μ., ο χρήστης "Yaw Anokwa"
yan...@nafundi.com
έγραψε:

Panos,

Don't write the code directly to the FormEntryActivity. It's a big
and
complex class and it's not easy to review. Write an external app or
clone a working widget and start there.

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

On Fri, Sep 5, 2014 at 3:31 PM, Panos Papadatos ppapad...@gmail.com wrote:

Hi Mitchd,

I have made the implementation without an external app. I wrote
the
code
directly to Form EntryActivity, and i get the focusable
edittextbox
to write
with a setText command....

All above done well but afte setText i get always the previous
value.
Instantly i saw the tag value but after that text will be return
to
previous
value...

In case of simple string type in which case the value will be
cleared..
Is it possible to send you the code of FormEntryActivity to get a
look?

Thanks
Panos

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

--
You received this message because you are subscribed to a topic in
the
Google Groups "ODK Developers" group.
To unsubscribe from this topic, visit

https://groups.google.com/d/topic/opendatakit-developers/W-Jt9Gd7ags/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

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