Description
Kuantify is a physical computing / data acquisition and control library written in Kotlin. Its purpose is to provide a common set of interfaces and abstractions for utilizing arbitrary collection and control endpoints in a safe, reasonable, and performant way. Kuantify is focused on enabling rapid prototyping of physical computing programs and a smooth transition from prototypes to production.
Kuantify alternatives and similar packages
Based on the "Kotlin" category.
Alternatively, view Kuantify alternatives based on common mentions on social networks and blogs.
-
CalendarView
A highly customizable calendar view and compose library for Android and Kotlin Multiplatform. -
Balloon
:balloon: Modernized and sophisticated tooltips, fully customizable with an arrow and animations for Android. -
kotlin-android-template
Android + Kotlin + Github Actions + ktlint + Detekt + Gradle Kotlin DSL + buildSrc = ❤️ -
NotyKT 🖊️
📒 NotyKT is a complete 💎Kotlin-stack (Backend + Android) 📱 application built to demonstrate the use of Modern development tools with best practices implementation🦸. -
Material Chip View
Material Chip view. Can be used as tags for categories, contacts or creating text clouds -
DrawableToolbox
🛠️ The missing drawable toolbox for Android. Create drawables programmatically and get rid of the boring and always repeated drawable.xml files. -
Pdf Viewer For Android
A Lightweight PDF Viewer Android library which only occupies around 80kb while most of the Pdf viewer occupies up to 16MB space. -
Capturable
🚀Jetpack Compose utility library for capturing Composable content and transforming it into Bitmap Image🖼️ -
Navigation Toolbar for Android
:octocat: Navigation toolbar is a slide-modeled UI navigation controller made by @Ramotion -
Carousel Recyclerview
Carousel Recyclerview let's you create carousel layout with the power of recyclerview by creating custom layout manager. -
Pluto Debug Framework
Android Pluto is a on-device debugging framework for Android applications, which helps intercept Network calls, capture Crashes & ANRs, manipulate application data on-the-go, and much more. -
CrunchyCalendar — awesome calendar widget for android apps
A beautiful material calendar with endless scroll, range selection and a lot more! -
Permission Flow for Android
Know about real-time state of a Android app Permissions with Kotlin Flow APIs. -
FlowMVI
Architecture Framework for Kotlin. Reuse every line of code. Handle all errors automatically. No boilerplate. Build features in minutes. Analytics, metrics, debugging in 3 lines of code. Make all code thread-safe. 50+ features. -
Nextflix-Composable
Includes jetpack compose, navigation, paging, hilt, retrofit, coil, coroutines, flow.. -
Only
:bouquet: An easy way to persist and run code block only as many times as necessary on Android. -
EasyPermissions-ktx
🔓 Kotlin version of the popular google/easypermissions wrapper library to simplify basic system permissions logic on Android M or higher. -
Compose Compiler Reports to HTML Generator
A utility (Gradle Plugin + CLI) to convert Jetpack Compose compiler metrics and reports to beautified HTML page. -
Events Calendar
Events Calendar is a user-friendly library that helps you achieve a cool Calendar UI with events mapping. You can customise every pixel of the calendar as per your wish and still achieve in implementing all the functionalities of the native android calendar in addition with adding dots to the calendar which represents the presence of an event on the respective dates. It can be done easily, you are just a few steps away from implementing your own badass looking Calendar for your very own project! -
MidJourney Images Compose Multiplatform Mobile Application
This application is developed to display the images created by MidJourney. The application is developed with Compose Multiplatform and works on many platforms including Android and iOS platforms. -
Bytemask
Android Gradle Plugin that masks secret strings for the app in the source code making it difficult to extract from reverse engineering. -
SSCustomEditTextOutLineBorder
Same as the Outlined text fields presented on the Material Design page but with some dynamic changes. 📝 🎉
InfluxDB high-performance time series database

Do you think we are missing an alternative of Kuantify or a related project?
README
Kuantify

Kuantify is usable in its current state but it's in a very early pre-alpha stage of development. Some things will not work and you should expect relatively frequent breaking changes.
Kuantify is a physical computing / data acquisition and control library written in Kotlin. Its purpose is to provide a common set of interfaces and abstractions for utilizing arbitrary collection and control endpoints in a safe, reasonable, and performant way. Kuantify is focused on enabling rapid prototyping of physical computing programs and a smooth transition from prototypes to production.
Kuantify currently only works on the JVM and Android but it is a core design principle for it to ultimately be multiplatform and multiplatform support will be added as the api starts to stabilize (the main thing we need to do is rewrite Physikal in pure Kotlin so it's usable on all Kotlin targets).
We also plan to create another repository where we centralize support for as many DAQC devices as possible but again, we actually want to keep the number of supported devices to a minimum until we stabilize the api so we don't end up with a maintenance nightmare. For now we only support the sensors and physical controls build into Android. Although Android phone sensors are not really a big intended use case for this library, they provide a great accessible way to start getting a feel for Kuantify and you can actually throw together some fairly interesting demos.
Artifacts
Core | Android Core | Learning | |
---|---|---|---|
JVM |
Local (for adapting OS support for device sensors and controllers to Kuantify):
Basics
First of all, in the name of type safety, Kuantify never passes around data as raw numbers. We use DaqcValue
which is
either a BinaryState
(high/low) or a Quantity
. A Quantity
is a type safe dimensioned number (a number with a unit),
Quantity
support is done in a separate library called Physikal. You
should probably play with Physikal a bit before attempting to use Kuantify.
The three most important types to understand in Kuantify are Input
, Output
, and Device
. Here's a super bare
bones usage example with an Android device.
val device = LocalAndroidDevice.get(this)
val lightSensor = device.lightSensors.first()
lightSensor.startSampling()
lightSensor.updateBroadcaster.consumeEach { measurement ->
// Do something with every measurement
}
This example assumes your program is actually running in Android.
val device = LocalAndroidDevice.get(this)
Gets the device it's running on as a Kuantify device. Since different Android devices have different sensors and controllers available each type of sensor or controller is given as a list that may be empty if the device doesn't support a given type.
lightSensor.startSampling()
Starts sampling the light sensor; you won't receive any updates from it until you start it.
lightSensor.updateBroadcaster.consumeEach
Each Input
has a BroadcastChannel
called updateBroadcaster
that broadcasts updates from that Input
. Here we're just consuming all updates.
Using an Output
is very similar.
val device = LocalAndroidDevice.get(this)
val torchController = device.torchControllers.first()
torchController.setOutput(BinaryState.High)
In the above examples we're using Kuantify on the device with the sensors and controllers. But Kuantify is primarily
intended to be used on a device that is connected to other devices which actually have the sensors and controllers.
So let's change our example to now run on a computer that is connected to an Android device. The Android device is now a
RemoteDevice
. Note: to do this we need to run a host utility on the Android Device we're connecting to. This utility
is trivial to make but you can just install android-simple-host to get started with remote connections. More information
in the "Supporting Devices" section.
val device = RemoteAndroidDeivce("192.168.1.5")
device.connect()
val lightSensor = device.lightSensors.first()
lightSensor.startSampling()
lightSensor.updateBroadcaster.consumeEach { measurement ->
// Do something with every measurement
}
The only difference here is we now first connect to the device before using it. We're running everything in some
suspending block now because both creating a RemoteAndroidDevice
and connecting to one is a suspending operation.
In val device = RemoteAndroidDeivce("192.168.1.5:8080")
the parameter passed to RemoteAndroidDevice()
is the IP
address of the device, in this example it's on the local network but it doesn't have to be. We have a Locator
class
for automating the process of finding and connecting to remote devices but it's not yet implemented for Android Devices.
Supporting Devices
There are two categories of device Kuantify can support.
- Devices that are intended to be controlled remotely and run some firmware facilitating remote connections. Examples include National Instruments / Agilent data acquisition systems and Arduino boards.
- Devices which are intended to have software installed directly on them. Examples include standard Android devices and Raspberry Pi.
Both categories utilize Kuantifies built in message routing system for communication, although in the case of full stack devices most of the routing should be handled automatically.
First Category - Remote Only Devices
Adding support for a remote only device is basically a matter of binding the functionality of the device to the Kuantify
interfaces. So you'll create a class that extends Device
and potentially some of the other Device interfaces depending
on the functionality of the device you're adding support for. In most cases this process is a
matter of establishing some connection, serializing / deserialzing commands and incoming data and sending / receiving
these things to and from the device. Most of this process will be handled with a custom NetworkCommunicator
.
Kuantify already depends on kotlinx.serialization
and parts of ktor so you should consider using them for these tasks. Ktor supports raw tcp and udp
sockets which are often necessary for supporting a device. Both of these
libraries are pure kotlin and multiplatform so you only need to make one set of common code to support the device on all
platforms if you use them.
Second Category - Full Stack Devices
To support the second category we use Kuantify's "full stack" abstractions because we will be facilitating both the hosting / serving on device that has the sensors and controls and the remote connection and control on any device we may want to interact with the host device from. A full stack device can be used locally only or remotely only but support should be added for both, hence the name. There are three steps for adding support for a full stack device.
- Extend interface
FSDevice
for the device to define whatInput
s,Output
s and potentially other functionality is has available. - Extend
LocalDevice
to create Kuantify bindings for the devices functionality. - Extend
FSRemoteDevice
so the device can be connected to remotely. This step should be very simple as in most cases Kuantify will automatically handle all the communication between the local and remote device so long as the local device is set up correctly.
This structure helps programs be more maintainable because the majority of the code can be written in a way where it doesn't care if it's running on the device itself or it is remotely connected to the device.
*Note that all licence references and agreements mentioned in the Kuantify README section above
are relevant to that project's source code only.