Scala API Demos
by Javi Pacheco
- •
- March 09, 2015
- •
- scala• android• open source
- |
- 1 minute to read.

We are pleased to announce the release of another open source project - Scala API Demos, an application written 100% in Scala on Android. Showcasing several examples for different skill levels of Android and Scala Developers. If you want to learn Android using a modern functional language, Scala API Demos is a good way to begin.
You can see examples written by different developers and we would like to encourage you to learn to use Scala to create your own examples to contribute to the project. Follow the instructions below to have your example appear in the main list and we will take care of uploading it to Google Play.
Contribute your own examples
Follow these steps to create your example:
- Create a new package inside
ui
for your example - The package for a feature contains all of the UI information (it’s not necessary but you should consider it). This includes:
- Activities
- Fragments
- Adapters
- Styles: this file replaces the XML Resources. All styles are defined in this file
- Layouts: this file replaces the XML Resources. All layouts are defined in this file
- Add your activity to
AndroidManifest.xml
- Create a new node in
activities.json
inside theasset
directory. The JSON should look like this:
{
"name": "Name of your example",
"description": "Description of your example",
"className": "Path of your activity",
"minApi": "An integer designating the minimum API Level required ",
"targetApi": "An integer designating the API Level that the application targets",
"scalaLevel": "An integer designating the Scala Level of your example [1-3]",
"androidLevel": "An integer designating the Android Level of your example [1-3]",
"user" : {
"avatar": "Your avatar URL",
"name": "Your name",
"twitter": "Your twitter username"
}
}
You can download the application from Google Play and you can see the code on GitHub