๐Ÿ“ Android Mobile Programming App (CLI-friendly)

A simple Android app built for educational purposes. Calculates area and perimeter of basic shapes such as square, rectangle, and triangle.

android mobile kotlin
View Source

๐Ÿ“ Android Mobile Programming App (CLI-friendly)

A simple Android app built for educational purposes. Calculates area and perimeter of basic shapes such as square, rectangle, and triangle.

This project is designed to be built, run, and documented fully via command line (CLI) โ€” no Android Studio required.


๐Ÿ›  Features

  • โœ๏ธ Simple UI in XML layouts
  • โš™๏ธ CLI support: Build, Install, Run, and Capture screenshots using scripts
  • ๐Ÿ“ธ Auto-screenshot source code with carbon-now-cli

๐Ÿงพ Project Structure (Important Folders Only)


app/
โ”œโ”€โ”€ src/
โ”‚ โ””โ”€โ”€ main/
โ”‚ โ”œโ”€โ”€ java/ # Source code (.kt / .java)
โ”‚ โ”œโ”€โ”€ res/ # Layouts, Drawables, etc.
โ”‚ โ””โ”€โ”€ AndroidManifest.xml
โ”œโ”€โ”€ build.gradle # App-level Gradle file
gradle/
โ”œโ”€โ”€ wrapper/ # Gradle wrapper
gradlew, gradlew\.bat # Wrapper scripts
build.gradle # Root-level Gradle
settings.gradle

๐Ÿ–ฅ CLI Usage Guide

โœ… Build APK

./gradlew assembleDebug

โœ… Install APK to Emulator / Device

adb install -r app/build/outputs/apk/debug/app-debug.apk

โœ… Run the App

adb shell monkey -p com.ubl.tugas_mp -c android.intent.category.LAUNCHER 1

โœ… Uninstall the App

adb uninstall com.ubl.tugas_mp

๐Ÿ“ธ Take Screenshot of Code

Install CLI tool

npm install -g carbon-now-cli

Run the helper script

./generate_screenshots.sh

This will:

  • Copy all .java, .kt, .xml files to screenshots/
  • Generate syntax-highlighted PNG screenshots of .kt/.java files

๐Ÿ“‚ Output (after script)

screenshots/
โ”œโ”€โ”€ com/ubl/tugas_mp/MainActivity.kt
โ”œโ”€โ”€ com/ubl/tugas_mp/MainActivity.png
โ””โ”€โ”€ res/layout/activity_main.xml

๐Ÿ‘ค Author

Aris Kurniawan 2311510438 โ€“ Universitas Budi Luhur Course: Mobile Programming


Let me know if you want to:

  • Add custom CLI commands (like make run, make screenshot)
  • Turn it into a Makefile or alias helper
  • Generate .zip or .tar.gz for submission