Skip to content

Data collection Overview

This tutorial series introduces you to data collection with CLAID. We explain how data collection works, how you can use existing Modules (Collectors) to collect common data such as audio, images, acceleration, location and others, and we guide you in how you can stream and upload your data to other devices running CLAID (such as servers, smartphones, smartwatches, ...). Along the way, we mention common pitfalls in mobile data collection that we encountered and highlight how CLAID is resolving them. This tutorial series covers beginner and intermediate tutorials.

Beginner tutorials

The beginner tutorials do not involve any programming and are suitable for users who are primarily interested in CLAID's data collection capabilities to begin with. These tutorials will cover the following aspects:

  1. Collect and record data to the internal storage of the device using existing Modules provided by CLAID or some of our packages.
  2. Upload data to a Server or other device.
  3. Configure the data collection to run in the background and activate further measures provided by CLAID to minimize the risk that your app gets suspended, such as exemption from battery optimization and granting device ownership.

Intermediate Tutorials

  1. Learn how to implement your own (Collector) Modules
  2. Stream data in realtime between devices, including audio and images.
  3. Visualize incoming data with Python and PyCLAID.

A note on CLAID's philosophy on data collection

While we offer packages supporting common sensors like camera, microphone, accelerometer, GPS, and more, our primary focus is not to provide universal support for all sensors on all devices. Users may need to customize device-specific or platform-specific requirements for their specific applications, or API's of certain sensors might changes in the future. Providing support and updates for all sensors is simply not feasible.

Rather, we want to make the integration of new sensors or custom APIs more straightforward, by providing common functionalities for scheduling, data collection, serialization, data storage and upload and make them run reliably in the background, without you needing to have in-depth knowledge on mobile operating systems. Especially, getting functions to run in the background reliably on mobile OS can be really challenging; CLAID solves that for you and for Modules you write yourself. See further our methodology of data collection

Data collection with Android Devices

Image title CLAID fully supports data collection on Android. We provide existing packages, that allow recording data from common sensors such as camera, microphone, accelerometers and others. One of the hardest challenges in mobile sensing applications are due to increasing restrictions of mobile operating systems, also on Android. The right approaches have to be implemented, in order to ensure reliable data collection from the background. On Android, this involves setting up services in the correct way, providing exemptioms from battery optimizations, and other not well-known pittfalls. For example, if you want to record audio data from the background (i.e., while the App is minimized), you have to start a foreground service while the activity is in the foreground, to be able to start and stop recordings even while in the background. You can learn more about this here. With CLAID, you can decide which Modules run in the foreground and background simply from a configuration. As for some sensors special permissions are required, we also provide functionalities that make requesting permissions more easily, no matter whether your Collector-Modules are running in the foreground or background .. check out CLAID Android setup

Data collection with iOS Devices

Image title CLAID supports data collection on iOS, and we provide existing packages that allow recording data from common sensors such as camera, microphone or accelerometer. However, access to some sensors on iOS is limited when the app is in the background. While we make our best efforts to enable background access for some of the available sensors, achieving continuous background access is simply not possible for some sensors. Compared to Android, however, restrictions on iOS are loosening to some extent, making access to more sensors from the background possible with newer iOS versions. With CLAID, you can decide which Modules run in the foreground and background simply from a configuration .. check out CLAID Android setup

Data collection with WearOS Devices

Image title Since WearOS is based on Android, CLAID also supports data collection via WearOS devices, for example, to collect accelerometer data, heart rate or other measurements, based on the specific device. Data collection is possible from the foreground and background. However, since smartwatches have to optimize strongly for battery consumption, they enter doze mode more aggressively. Some sensors, which require the the CPU to stay active (e.g., audio recording) will drain the battery very fast.

Data collection on Devices with other Operating Systems

Image title CLAID is a cross-platform framework, which works on all major operating systems. It was, however, developed with mobile sensing applications in mind. For our sensing scenarios, we typically only employ on mobile devices for data collection, which are typically connected to a Server running CLAID. Those Servers or Hosts can run any of the supported operating systems, mobile ones as well as desktop operating systems. CLAID has been developed and tested on Desktop Operating Systems as well, however, we did not implement Collectors for those platforms. You can use CLAID for the data collection on those operating as well if you implement your required Collectors, and this should still save development effort over the naive approach, as CLAID provides you with functionalities for scheduling, data storage and upload.