Open Jyro-The-Creator opened 8 years ago
@InventorSector Hi, you can use the Cordova File plugin. It is however not included in Evothings Viewer for security reasons. You can build your custom Viewer with the File plugin, see instructions here: https://github.com/evothings/evothings-viewer Sorry for not being more detailed in my reply, I have limited time to respond this week.
@mikaelkindborg No problem, thank you very much already! I'll try it out!
@nbezembinder1 @mikaelkindborg 1.) First of all i'm not sure i understand what's going on in "https://github.com/evothings/evothings-viewer"
2.) I'm now trying to work around the 'viewers' thing, following every instruction in https://evothings.com/dialog-iot-sensor-starter-guide/ below Evothings Instrumentation. When i press viewers tool, i get a blank page (some text, Hide HELP button, and just the VIEWERS header).
When i press the button from the app, it logs: LOG: [ERR] Uncaught TypeError: Cannot read property 'watcher' of undefined .... i'm pretty sure i've followed the guide correctly..
Also, will all that help me write files in a text?
3.) I'm trying to understand and use https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/ Am i in a good path?
Can you guys help?
Thanx
@nbezembinder1 @mikaelkindborg Cordova File plugin is a different app that runs at the same time with my main app, or i can insert it somehow into my main app?
@InventorSector You add Cordova plugins to your app, it is the same app, this adds native functionality to the app.
Are you using Evothings Viewer or do you build a custom Cordova app? (You can do both, develop with the Viewer and then build a Cordova app for deployment on the app stores. They are both Cordova apps, but the Viewer has support for connecting to Evothings Studio.)
To add the File plugin you need to have the Cordova build system installed, unless you already have done that. Here is a guide:
https://evothings.com/doc/build/build-overview.html#Install
To add the plugin to Evothings Viewer and build a custom Viewer, see this page:
https://github.com/evothings/evothings-viewer
Add the plugin to this file:
https://github.com/evothings/evothings-viewer/blob/master/package.json
In a "plain" Cordova app (not the Viewer), here is how to add the File plugin:
cordova plugin add cordova-plugin-file
Documentation for the File plugin:
https://github.com/apache/cordova-plugin-file
Hope this helps!
@nbezembinder1 @mikaelkindborg Hey guys, I was wandering if there's an easy way to write all measurements into a text file into the mobile phone (it's what the original app from dialog does).