Skip to content

Instantly share code, notes, and snippets.

View Mercandj's full-sized avatar
😀
Working on Android Apps

Jonathan Mercandalli Mercandj

😀
Working on Android Apps
View GitHub Profile
@Mercandj
Mercandj / android_upload_aab.md
Last active August 10, 2020 18:41
Android: Upload AppBundle on the PlayStore via CLI

Android: Upload AppBundle on PlayStore

Goal:

Upload AppBundle on the PlayStore via the termial. Based on the Google API Publisher v3.

Process:

  • Be sure to have Java installed
  • Be sure to have your AppBundle file .aab

Android view: Layout IDs creation

Issue:

Here a ConstraintLayout in a layout containing 2 views:

<androidx.constraintlayout.widget.ConstraintLayout>

 
@Mercandj
Mercandj / android_livedata.md
Last active August 30, 2020 15:57
LiveData: Pros, Cons, Conclusion.

Android: LiveData

Pros, Cons, Conclusion. TLDR; More Cons than Pros.

class Timer {

   private val timeLeftMillis = MutableLiveData(5_000L)
   
 fun getTimeLeftMillis(): LiveData {
@Mercandj
Mercandj / developer_principles.md
Last active August 22, 2023 14:47
I'm your CTO! As a developer, here the rules I expect you to follow:

Developer: Principles

Description

Like Robert C. Martin (clean architecture) would say on this video,

Imagine I'm your CTO, as your CTO I expect you to follow this principles:

Untitled-collage-10-min-9 (1)

@Mercandj
Mercandj / setup_mac_os.md
Last active November 16, 2023 16:19
"Minimal" setup to work on MacOS as an Android Developer

Mac OS Setup

Here my "minimal" setup to work on a Mac as an Android Developer

Gitlab runner setup (CI)

  • Install brew
  • Install gitlab runner with brew install gitlab-runner
  • Install gitlab as a start server brew services start gitlab-runner
  • Be sure to have unregister previous runner sudo gitlab-runner unregister --all-runners
  • Configure the runner sudo gitlab-runner register
    • Typer the URL of gitlab (cf in the WebApp, YourProject > Settings > CI/CD)
    • Typer the Token of gitlab (cf in the WebApp, YourProject > Settings > CI/CD)
  • Tag (for example "android")
@Mercandj
Mercandj / android_image_folders.sh
Last active November 2, 2020 12:59
Derivation of images into Android drawable folders
#!/bin/sh
# GOAL
# Convert images png or jpg into Android drawable folder and convert into webp
# HOW TO USE IT
# · Setup: "brew install imagemagick" // https://formulae.brew.sh/formula/imagemagick
# · Place your images in the same folder of this script
# · Run the script

Manager: Principles

Imagine you are a tech manager, as a tech manager here some principles:

Principles

# 5 Principles
1 Promote your CTO principles about code
2 Lead by example

Screen recorder - Android

  • Basic code to record screen on Android.
  • Record your app and other apps
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
    intent ?: return super.onStartCommand(intent, flags, startId)
    val extras = intent.extras
        ?: return super.onStartCommand(intent, flags, startId)

Android developer: Principles

Description

Please, first, checkout Developer: Principles. These Android developer principles are the "implementation details" of developer principles on the Android world.

The following advices are very opinionated. Before saying "bullshit", please read the why below in the Details section. One of the main ability of developer is to understand the why. (This advice apply to myself of course. Every tool I'm criticising exist because of a why that I consider less important than the alternative. But for sure, you can disagree).

The goal of this document is more to start a reflection than make you think twice of your code.