2 Replies Latest reply on Mar 19, 2019 10:52 AM by joakim.majander_4032611

    How to make a datalogger app

    joakim.majander_4032611

      I have my cyble-022001 based sensor working fine and need to make an app to write the data to file on android or IOS device. I have already made a simple app that shows the data on screen. I used Evothings Studio and the app so far runs only in Evothings viewer app, thus it's not a compiled native app, just HTML and javascripts, but should be possible to compile using cordova + native SDK.

       

      I'm new to apps and quite confused what is needed for an app the be able to communicate via BLE and write data to a file for hours while the phone is locked or used for something else.

       

      Does it need a service? Foreground or background service?

       

      What is a good platform to make such on app for both android and IOS. Evothings + cordova seems easy to get started with, but I don't know if they have all the functions needed, especially related to keeping the data logging on while the device is locked. Also Evothings has not been updated since 2017.

       

      I'm good at c, know some c++ and javascript. I have not used java nor swift, which seem to be the languages native SDK's use. I did make a simple app with android SDK a few years ago. I guess that was java?

        • 1. Re: How to make a datalogger app
          DheerajK_81

          In my opinion developing app using Native SDKs might seem like a good option considering the amount of changes and developments happening on Android/iOS platoform and the native SDKs keep getting updated to support these changes.

           

          And yes, Android SDKs use Java and iOS uses Swift as programming languages. I did go through how apps are developed using Evothings, I'm just not sure if they have eveything needed and are upto date.

           

          Coming to your question on developing a datalogger app via BLE, you can refer to the Cysmart App Source code. It will demonstrate how you can communicate over BLE and how you can log these events. Ofcourse you will need to make changes to suit your requirement. But it should give you a great start. You can find the source code here.

           

          And always if you face any problems during development, you can post your queries on the community and we will be happy to help

           

          Regards,
          Dheeraj

          • 2. Re: How to make a datalogger app
            joakim.majander_4032611

            While waiting for the answer I went further with Evothings and then also made a "native" app using Build Phonegap service, which was quite easy. I haven't yet purchased Apple Developer key, so I could only build for Android. Evothings Viewer for Android lacked a lot (file, e-mail etc.), but IOS-version has all I needed (CGTek Viewer in the Appstore). Now I have data logging working in both IOS (with Viewer) and in Android (native).

             

            I took quite a while to understand how to do datalogging in IOS. It was quite easy to log into a file, but then I realized there is no way to get the data out of the #?&?# IPad/IPhone. An app can only write to its own sandbox and no other app, system tool or even Itunes can read the files inside that sandbox. The only way out was to use my app to make an e-mail with the data file attached. There is a way to use Itunes as well, but that sounds too complicated for the user.

             

            I don't have a Mac, which is required for XCode. Quite interesting that there is no Linux or Windows version. I imagine they use gcc, which should run on any platform. And Mac is Unix based not that far from Linux!

             

            So it seems I'm using Cordova/Build Phonegap and Evothings was nice help to get started. Evothings is a bit outdated, but works still OK. I'm happy that I didn't need to Install Android Studio and even more happy that I didn't need to start using Mac just for this.