Skip to content

An example App, implemented in Scala, to visualize Acceleration Data and generate Audio Signals. The aim of this Project is to explore the migration of Scala to mobile Platforms via Gluon Substrate

License

Notifications You must be signed in to change notification settings

thomas7b/ScalaOnMobile---Example-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ScalaOnMobile---Example-App

Overview

This project explores the migration of Scala applications to mobile platforms, inspired by and building upon the foundational work of Scala on Android. It serves as a demonstrative example, showcasing the integration of native services via Gluon Attach without the need for the Gluon Charm Glisten library. The application is developed entirely using free projects offered by Gluon and is available in two versions: Scala and Java, for comparative analysis.

Features

The application offers two main functionalities:

  1. Acceleration Data Visualization:

    • Reads and displays acceleration data in a graph.
    • Allows exporting the graph as a screenshot and the data as CSV files.
  2. Audio Signal Generation:

    • Generates Continuous Wave or Chirp signals.
    • Plays the audio within the app.
    • Saves the audio file in an external directory under "/Gluon".

Implementation

The project contains two main directories, each hosting a version of the application:

  • Scala_App: The Scala implementation.
  • Java_App: The Java implementation.

For Android and iOS, pre-packaged APK files are available, facilitating easy installation and testing. The iOS versions were created via GitHub Actions and are not fully tested due to the missing hardware. They are also only available for the iOS Simulator.

Getting Started

  • For Android development there is the more detailed tutorial on prerequisities and installation steps on the Scala Website.
  • The official Gluon Documentation gives a very detailed information on prerequisities and installation steps.

Prerequisites

  • Install Gluons Version of GraalVM
  • gcc version 6 or higher
  • ld version 2.26 or higher
  • Recommended to use IntelliJ or NetBeans as IDE with the Scala and JavaFX Plugins
  • Maven (In this Project I used version 3.8.8)
  • For Android development, Linux is required
  • For Linux: To install the required packages, run the following commands:
sudo apt-get install libasound2-dev libavcodec-dev libavformat-dev libavutil-dev libfreetype6-dev
sudo apt-get install libgl-dev libglib2.0-dev libgtk-3-dev libpango1.0-dev libx11-dev libxtst-dev zlib1g-dev
  • For iOS development, macOS is required.

Installation

  1. Clone the repository: git clone https://github.com/thomas7b/ScalaOnMobile---Example-App.git

  2. Navigate to either the Scala_App or Java_App directory, depending on your development preference.

  3. Follow the Gluon Documentation instructions specific to your platform (Android/iOS) to build the native image and create the application.

Contribution

Contributions to the project are welcome.

About

An example App, implemented in Scala, to visualize Acceleration Data and generate Audio Signals. The aim of this Project is to explore the migration of Scala to mobile Platforms via Gluon Substrate

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published