Native Android development

Start with Android.
Keep it standard.

NativeFlexi is a pair of ready-to-customize Android application templates. Choose Java or Kotlin, then use normal Android Studio, Gradle, XML resources and Android APIs. There is no custom language, compiler or generated runtime.

Search

Find a guide or project

Search all MacoraOne documentation.

Choose your language

Two templates, one familiar workflow

The repository root is a collection of templates, not a standalone Android project. Open the selected project folder in Android Studio.

NativeFlexi Java

Java source with Groovy Gradle build files. Best when your team prefers Java and standard Android Java APIs.

.javabuild.gradleXML
cd NativeFlexi-java
gradle assembleDebug
Browse Java template

NativeFlexi Kotlin

Kotlin source with Gradle Kotlin DSL. Keep Kotlin DSL syntax in .kts files rather than pasting Groovy snippets into them.

.ktbuild.gradle.ktsXML
cd NativeFlexi-kotlin
gradle assembleDebug
Browse Kotlin template
Typical workflow

Customize the template

Choose Java or Kotlin

Use only the project you intend to develop.

Rename the application

Change the project name, namespace, application ID, package declarations and displayed app name consistently.

Build the interface

Edit app/src/main/res/layout/activity_main.xml, values, drawables and your MainActivity source.

Configure platform access

Use AndroidManifest.xml for components and required permissions. Protected permissions may also need runtime requests.

Build and test

Run the local Gradle command or manually start the matching GitHub Actions workflow to build a debug APK artifact.

Examples

Common files to edit

Java activity

package com.example.myapplication;

import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {
    @Override
    protected void onCreate(Bundle state) {
        super.onCreate(state);
        setContentView(R.layout.activity_main);
    }
}

Keep the package declaration consistent with the package path and namespace.

Manifest permission

<uses-permission
    android:name="android.permission.INTERNET" />

Only request permissions that the app actually needs. Runtime-sensitive permissions require additional handling.

Java Gradle configuration

android {
    namespace 'com.example.myapplication'
    compileSdk 35

    defaultConfig {
        applicationId 'com.example.myapplication'
        minSdk 24
        targetSdk 35
    }
}

This is Groovy syntax for the Java template's Gradle file.

Kotlin Gradle configuration

android {
    namespace = "com.example.myapplication"
    compileSdk = 35

    defaultConfig {
        applicationId = "com.example.myapplication"
        minSdk = 24
        targetSdk = 35
    }
}

This is Kotlin DSL syntax for the Kotlin template's .kts file.

Cloud builds

Manual GitHub Actions

Separate workflows keep the language choice explicit and avoid automatically building every change.

In GitHub, open Actions, select the workflow, choose Run workflow, select the branch, then download the artifact after the run succeeds. Keep release keystores and signing credentials out of source control.
More

NativeFlexi and MacoraOne

Use the MacoraOne controller to create an app from the selected template, push it to GitHub and dispatch its build workflow.

one create WeatherApp
one push WeatherApp WeatherApp
one build WeatherApp