Hi!
First of all, i am new in Eclipse and Monkey C programming language. But i have good background programming in C#.
I am currently working with a vivoactive 3 watch given up by Garmin to my PhD research. My aim is to progrmming an app which be able to get the watch sensor signals to externally processing it. Concretelly i need the accelerometre and the hearth rate signals. I have read the Garmin´s official website programmer guide to get some background on Monkey C. But i would like to ask about what will be the best way to get these signals and send it from the watch to an smartphone. I would like to run the app in background, so i would not need to programming a GUI.
Someone can help me on "where to begin":
I would like to know what is the best App Type for my project, if there exist some open source/example apps to get the signal and communicate the watch and finally how i can store data on the watch.
For example, i am having problems creating a .xml file on resources folder, to use JSON as in Garmins example. When i compile the code, i get errors.:
Garmin example:
<resources>
<jsonData id="jsonDictionary">{"key":"value", "3":"three", "three":3}</jsonData>
<jsonData id="jsonArray">[1,2,3,4,5,6]</jsonData>
<jsonData id="jsonMix">[1,{"1":"one"},["a","b","c"]]</jsonData>
<jsonData id="jsonPrimitive">5</jsonData>
<jsonData id="jsonFile" filename="data.json"/>
</resources>
Errors:
BUILD: ERROR: Problem validating a resource file: Premature end of file.
BUILD: com.garmin.monkeybrains.resourcecompiler.ResourceException: Problem validating a resource file: Premature end of file.
BUILD: at com.garmin.monkeybrains.resourcecompiler.DocumentParser.validateResourceFile(DocumentParser.java:285)
BUILD: at com.garmin.monkeybrains.resourcecompiler.DocumentParser.addJungleResources(DocumentParser.java:399)
BUILD: at com.garmin.monkeybrains.Project.addProjectResources(Project.java:163)
BUILD: at com.garmin.monkeybrains.ProjectBuilder.addCIQProjectFiles(ProjectBuilder.java:210)
BUILD: at com.garmin.monkeybrains.Monkeybrains.runPRGCompiler(Monkeybrains.java:1229)
BUILD: at com.garmin.monkeybrains.Monkeybrains.compileApplication(Monkeybrains.java:1024)
BUILD: at com.garmin.monkeybrains.Monkeybrains.run(Monkeybrains.java:2315)
BUILD: at com.garmin.monkeybrains.Monkeybrains.simpleMain(Monkeybrains.java:254)
BUILD: at com.garmin.monkeybrains.Monkeybrains.simpleMain(Monkeybrains.java:236)
BUILD: at com.garmin.monkeybrains.Monkeybrains.main(Monkeybrains.java:283)
BUILD: Caused by: org.xml.sax.SAXParseException; systemId: file:/D:/1.-GIT/4.%20Tesis/Desarrollo-Tesis/Desarrollos/03-Pruebas%20Recursos/resources/jsonData.xml; lineNumber: 1; columnNumber: 1; Premature end of file.
BUILD: at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:204)
BUILD: at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:178)
BUILD: at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
BUILD: at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
BUILD: at java.xml/com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1471)
BUILD: at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1013)
BUILD: at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605)
BUILD: at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
BUILD: at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:534)
BUILD: at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:888)
BUILD: at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:824)
BUILD: at java.xml/com.sun.org.apache.xerces.internal.jaxp.validation.StreamValidatorHelper.validate(StreamValidatorHelper.java:176)
BUILD: at java.xml/com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(ValidatorImpl.java:115)
BUILD: at java.xml/javax.xml.validation.Validator.validate(Validator.java:124)
BUILD: at com.garmin.monkeybrains.resourcecompiler.DocumentParser.validateResourceFile(DocumentParser.java:281)
BUILD: ... 9 more
BUILD: usage: monkeyc [-a <arg>] [-d <arg>] [-e] [--Eno-invalid-symbol] [-f <arg>] [-g]
BUILD: [-h] [-i <arg>] [-m <arg>] [-o <arg>] [-p <arg>] [-r] [-s <arg>] [-t] [-u
BUILD: <arg>] [-v] [-w] [-x <arg>] [-y <arg>] [-z <arg>]
BUILD: -a,--apidb <arg> API import file
BUILD: -d,--device <arg> Target device
BUILD: -e,--package-app Create an application package.
BUILD: --Eno-invalid-symbolDo not error when a symbol is found to be invalid
BUILD: -f,--jungles <arg> Jungle files
BUILD: -g,--debug Print debug output
BUILD: -h,--help Prints help information
BUILD: -i,--import-dbg <arg> Import api.debug.xml
BUILD: -m,--manifest <arg> Manifest file
BUILD: -o,--output <arg> Output file to create
BUILD: -p,--project-info <arg>projectInfo.xml file to use when compiling
BUILD: -r,--release Strip debug information
BUILD: -s,--sdk-version <arg> SDK version to target
BUILD: -t,--unit-test Enables compilation of unit tests
BUILD: -u,--devices <arg> devices.xml file to use when compiling
BUILD: -v,--version Prints the compiler version
BUILD: -w,--warn Show compiler warnings
BUILD: -x,--excludes <arg> Add annotations to the exclude list
BUILD: -y,--private-key <arg> Private key to sign builds with
BUILD: -z,--rez <arg> Resource file
Hope you can help me.
Regards!