Hello there,

I am an experienced programmer. I can do C/C++/Rust/assembly/Ruby/Perl/Python/ etc… The language itself is not a barrier.

The barrier to me is that I have never coded a single web or android application. I guess it must be surprising but I am more of a low-level programmer in my job (I develop a compiler backend) and I never really had the opportunity or idea to work on an app.

What would be a good starting point for making an android application?

A quick search got me this: https://google-developer-training.github.io/android-developer-fundamentals-course-concepts-v2/unit-1-get-started/lesson-1-build-your-first-app/1-1-c-your-first-android-app/1-1-c-your-first-android-app.html

Would it be a good starting point?

Side note: my app will not have to interact with any service. If I were to code it as a command-line program, it would not take me more than a day or two. The actual app would involve (for now) no more than a text field, a button, some logic attached to it - the hard part for me being to choose a framework to build it, “upload it” to my phone and use it.

  • Skull giver@popplesburger.hilciferous.nl
    link
    fedilink
    arrow-up
    5
    ·
    11 months ago

    Flutter and Jetpack Compose are the modern way to start things. I haven’t been keeping up with Google’s Jetpack and I find their introduction rather lacking compared to how they have guided developers into Android development in the past.

    Flutter runs on Dart, which is like a mirror universe Javascript that only Google uses. It ignores all operating system UI controls and instead bundles a custom renderer that you control with a declarative UI.

    Compose is based on Jetbrain’s Compose system, which does the same thing but in Kotlin.

    Both Flutter and Compose can produce cross platform apps (Android, iOS, web pages, Linux, Windows, macOS). Because they render all of the UI themselves, you end up with a similar looking app on every platform by default, which is either great or terrible depending on what you want.

    If you want a full native Android experience, ignore Compose and Flutter and follow the guides on Google’s websites. Maybe read a book or two as well if you want to get the details down. My experience is that a classic activities/fragments based UI works a lot better once the app is done, but development takes significantly longer.

    The standard Android API runs on Java, though most apps these days seem to he written in Kotlin. The Android API is quite heavy on the handlers and callbacks, so Kotlin makes a lot of sense here. Plus, Android Java is a version of Java 7 with a bunch of Java 8 tricks, not exactly anything modern.

    If you need performance, the NDK will let you add C++ code to your Android app. I’m pretty sure there are also bindings for Go and Rust. It doesn’t make much sense to develop the app itself in those languages, though.

    Mobile apps have a whole lifecycle to keep track of and Android has the whole activities/fragments/services/intents system that’ll be very confusing if you’re coming from desktop development. You’ll also ask “why can’t I just do this” very often, and the answer is usually “because that drains the battery like crazy”.

    As for uploading the app to your phone, the process is as follows:

    • hit the build button in the IDE
    • transfer the APK file to your phone
    • open it

    You can short circuit this process by enabling developer mode in your phone’s settings and hooking it up to your computer with a USB cable. You’ll only need to hit the run button if you do that, plus you get an interactive debugger of course.

    If you wish to publish the app, you can either build a signed APK and upload that somewhere for others to find, or go through the Google Play registration process.

    If you want to go the web app route, be prepared to learn words like “react”, “svelte”, “eslint”, “babel”, “seebass”, “bun”, “webpack”, “tsconfig”, “cors”, “yarn”, and “npm”. Actually, one of those is a Pokemon, but I’m sure by the time I finish this comment someone will have written a new UI framework with that name. You don’t need all of that, a simple HTML template with some Javascript glue will do, but this is the stuff web app people commonly point at.