How do I use ODK Sensors in my under developement Android App?

Hi everyone, the title of this topic is pretty self-explanatory:

since I realized that ODK Sensors only comes in the form of a .apk file,
I’m trying to understand how to use it in my Android App, which needs to
read data from a sensor via usb and bluetooth bridge. Should I invoke and
run the apk procedurally from my code? I am not sure I got this right.

Also, where could I find some documentation regarding the methods to invoke
when using the framework?

Thanks in advance,

Marzio

Marzio,

It’s been a while since ODK Sensors got a code update.

You can find the source here:

Yaw

··· On Mon, Mar 13, 2017 at 1:48 PM, Marzio Persiani wrote: > Hi everyone, the title of this topic is pretty self-explanatory: > > since I realized that ODK Sensors only comes in the form of a .apk file, I'm > trying to understand how to use it in my Android App, which needs to read > data from a sensor via usb and bluetooth bridge. Should I invoke and run the > apk procedurally from my code? I am not sure I got this right. > > Also, where could I find some documentation regarding the methods to invoke > when using the framework? > > Thanks in advance, > > Marzio > > -- > 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.

Thanks for your help Yaw,

I must admit I still have doubts regarding how to install and use the
sources in my Android Studio project,

could you clarify this to me?

Should I include the folder in my project to later be able to import
specific ODKSensors classes and use their methods to discover sensors and
communicate with them from my custom app? Or should I instead invoke
ODKSensors app from my app?

I know those may sound like very stupid questions, but I am still a newbie
in the field.

Greetings,

Marzio

··· Il giorno martedì 14 marzo 2017 15:03:54 UTC+1, Yaw Anokwa ha scritto: > > Marzio, > > It's been a while since ODK Sensors got a code update. > > You can find the source here: > https://github.com/opendatakit/sensorsframework > https://github.com/opendatakit/sensorsinterface > > Yaw > > On Mon, Mar 13, 2017 at 1:48 PM, Marzio Persiani <marzio....@gmail.com > wrote: > > Hi everyone, the title of this topic is pretty self-explanatory: > > > > since I realized that ODK Sensors only comes in the form of a .apk file, > I'm > > trying to understand how to use it in my Android App, which needs to > read > > data from a sensor via usb and bluetooth bridge. Should I invoke and run > the > > apk procedurally from my code? I am not sure I got this right. > > > > Also, where could I find some documentation regarding the methods to > invoke > > when using the framework? > > > > Thanks in advance, > > > > Marzio > > > > -- > > 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 Marzio,

There’s no such thing as a stupid question! We all have to start from
somewhere :slight_smile:

I’m not very familiar with the Sensors code base, so I can’t offer
detailed advice. Given that the code hasn’t seen updates for a while,
what I’d recommend to start is to copy the specific classes you need
into your codebase and go from there. This way, you can get work done
without fighting with code you aren’t familiar with.

Once you get the functionality working, then file an issue with a
proposal on how we could package it better for integration.

Yaw

··· On Tue, Mar 14, 2017 at 11:52 AM, Marzio Persiani wrote: > Thanks for your help Yaw, > > I must admit I still have doubts regarding how to install and use the > sources in my Android Studio project, > > could you clarify this to me? > > Should I include the folder in my project to later be able to import > specific ODKSensors classes and use their methods to discover sensors and > communicate with them from my custom app? Or should I instead invoke > ODKSensors app from my app? > > I know those may sound like very stupid questions, but I am still a newbie > in the field. > > Greetings, > > Marzio > > Il giorno martedì 14 marzo 2017 15:03:54 UTC+1, Yaw Anokwa ha scritto: >> >> Marzio, >> >> It's been a while since ODK Sensors got a code update. >> >> You can find the source here: >> https://github.com/opendatakit/sensorsframework >> https://github.com/opendatakit/sensorsinterface >> >> Yaw >> >> On Mon, Mar 13, 2017 at 1:48 PM, Marzio Persiani wrote: >> > Hi everyone, the title of this topic is pretty self-explanatory: >> > >> > since I realized that ODK Sensors only comes in the form of a .apk file, >> > I'm >> > trying to understand how to use it in my Android App, which needs to >> > read >> > data from a sensor via usb and bluetooth bridge. Should I invoke and run >> > the >> > apk procedurally from my code? I am not sure I got this right. >> > >> > Also, where could I find some documentation regarding the methods to >> > invoke >> > when using the framework? >> > >> > Thanks in advance, >> > >> > Marzio >> > >> > -- >> > 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.