Rawdrawandroid – Build Android apps without any Java, in C and Make

  • This is pretty great. The biggest reason I hate doing android development is the java (and to a lesser extent, kotlin) "ecosystem" is a pain. Java is a sucky language to write; Kotlin is less bad, but the whole build tooling/package management/IDE mania mess is still a hassle to use. So thanks to the author.

  • Whenever I need to touch XCode or Android Studio, I'm reminded how lucky web devs are now that almost everything has converged around Vite (death stare at NextJS). Everything Just Works(tm). Simple plugin system to integrate anything.

    The few times there wasn't a plugin to do what I needed, I've managed to roll a custom one pretty easily.

    When Vite breaks you're completely screwed though. Find a different way to do it or wait until a patch comes out. Vite internals are nigh impossible to fix on your own.

  • "I can do anything I want. It's just bits. You don't own me." Fair enough! x-D

  • to be clear, this is only really useful for applications that present their ui through opengl and do not interact with the rest of the android system very much.

    the ndk is meant for writing little bits of c to speed things up in a classic java android application.

    this is a pretty cool hack that allows for opengl apps to be written in straight c that run full screen and have limited access to things like keyboards, adc inputs or usb.

    it does not include a reimplementation of the android frameworks in c and the ndk provides limited access for ndk code to interact with them.

    the main use case seems to be supporting a program for live audio reactive visuals based on extraction of chroma.

  • Looks like you still have to start by installing Android Studio, which seems excessive. Is there a way to just download an Android SDK?

    Looking briefly at the makefile, I think they might have avoided Gradle, though it calls other tools written in Java.

    I'd love to see a way to build a Flutter app without Gradle.

  • C is neat but something like python may be simpler to work with for most programmers. I wonder if anyone here has experience with Kivy and KivyMD libraries for python.

    The code is simple and self explanatory.

    class RectangleFlatButton(TouchRippleBehavior, Button): primary_color = get_color_from_hex("#EB8933")

        def on_touch_down(self, touch):
            collide_point = self.collide_point(touch.x, touch.y)
            if collide_point:
                touch.grab(self)
                self.ripple_show(touch)
                return True
            return False
    
        def on_touch_up(self, touch):
            if touch.grab_current is self:
                touch.ungrab(self)
                self.ripple_fade()
                return True
            return False
    
    
    class MainApp(App): def build(self): screen = Builder.load_string(KV) screen.add_widget( RectangleFlatButton( text="Hello, World", pos_hint={"center_x": 0.5, "center_y": 0.5}, size_hint=(None, None), size=(dp(110), dp(35)), ripple_color=(0.8, 0.8, 0.8, 0.5), ) ) return screen

    MainApp().run()

  • Given that it's a thin wrapper around GL and friends, could one have an alternate implementation of these calls and do most of the dev work natively on the desktop? And not muck around with devices or emulators except for some final / edge case testing?

    I just remember working with Libgdx back in the days. A game framework made for Android. It however was cleverly designed in that you could just run it on desktop by changing which implementations were used for drawing/sounds/assets. Very nice to work with, could just recompile the app in seconds and test, even hot swap, compared to the other way of building an apk, installing, launching etc which took minutes per iteration.

  • You know its funny all the Gradle sucks comments here....I use Flutter which behind the scenes uses Gradle builds for android targets....no Gradle problems whatsoever...maybe operator touching and changing Gradle was the feature and the problem??

  • May be someone with deep pockets like Elon must get Linux to work on mobile. I know there's efforts going on but seems slow progress. That will break the back of the duopoly and also make things like this so much easier.

  • There should be a lot more high quality, super lightweight, non bloated apps.

  • I remember when I was developping a cross platform C++/OpenGL ES engine that worked on Android, iOS, Linux, Web… so satisfying

  • Now we only need to embed Lua into this to write the high-level logic, and we may have a winner for stuff that does not need a lot of accessibility support. Like, say, games, or media players. Easy to link C libraries that do performance-critical stuff, or writhe your own C code.

    (Then gradually rewrite the core in Zig.)

  • This should be integrated into DevkitPro! Would love to see the relatively lightweight msys2 environment building APKs. I know WSL is better but I'm hesitant to use platforms Microsoft is in the process of embracing and extending.

  • Honestly the whole java/kotlin tooling is the worst to pick for mobile dev, and KEEP it after so many other great languages and tools that are out there. I don’t why google didn’t offer at least Go as a native alternative for android dev.

  • I was interested but then saw JDK/Gradle. One of the reasons I avoid android development.

  • Rawdraw operates on everything from an ESP8266, to RaspberryPi, Windows Linux and now, even Android. Write code once, use it everywhere.

    That "everything" contains a pretty big gap.

  • Memory corruption, now on Android!

    Just gonna leave this here: https://safecpp.org/draft.html#the-call-for-memory-safety

    P.S. Was discussed on HN recently: https://news.ycombinator.com/item?id=41528124

    P.P.S. The author has a great YT channel with awesome embedded systems projects: https://www.youtube.com/playlist?list=PLDRymMFQl3Nktk_pjlUP_...

  • Make? Jesus Christ people are still using that? It's like people don't realize that other languages have been created in the last 20 years