Live data from Hacker News

Ask HN: Am I crazy or is Android development awful?

news.ycombinator.com

21–30 of 157 posts

Re: Ask HN: Am I crazy or is Android development awful?

#22
You are just trying to do something that nobody cares about making work on smartphones, and so you are "on your own".

Trying to do userland USB in an Android app to talk to a UVC webcam connected through USB OTG is not something even a niche of apps care for, and the native camera framework definitely doesn't care about because if it was trying to workaround the UVC spec Android phone cameras would have never left the original Gameboy camera age.

So with no native support for your use case, you are now having to wrangle the pretty shitty libusb and the even more terrible libuvc in working within the confines of an Android app. And to the credit of Android, this is possible! People have made it work! People with in depth knowledge of how the parts fit together, that is, and so GPT won't be of any help.

Re: Ask HN: Am I crazy or is Android development awful?

#23
"Using Python scripting and OpenCV, I had a working cross-compatible script in 10 minutes, for both Linux and Windows."

What took you 10 minutes would take me a long time to learn. I rather enjoyed making some basic Android apps. I didn't work with much hardware stuff and heard that part is tough due to all the variations.

Re: Ask HN: Am I crazy or is Android development awful?

#24
There's a bigger issue here: OP describes writing prototype software on a desktop, and compares this to writing more production-style software on a highly constrained mobile device. This isn't an apples-to-apples comparison.

Python packaging is notoriously bad, and while you can get a Linux/Windows compatible script without too much work, getting to a single executable that just runs is much harder. Cloning a repo, setting up a virtualenv, installing an openssl dependendcy or whatever, is just not something that exists in the mobile world. We have to put more effort into the packaging, and that means a higher bar for things like this. There are answers to this in Python that claim to produce single, relocatable, Python binaries, and I've never seen one without a huge list of caveats. Even yesterday I was patching an open source library that didn't work inside one of these because it had the gaul to use... checks notes, os.path.

> Well, looks like modern mobile phones are not a great hacker's playground, huh?

This sums it up. They are not. The security environment on these devices pretty much ends this before you even get to writing any code, and that's generally a good thing. Phones are appliances for most people. There's a reason why "apps" took off in a way that boxed desktop software never did, and there's a reason why boxed desktop software on Windows did far better than package managers on Linux. Almost everyone wants more a more polished experience. Shipping a Python script running OpenCV to a phone is not going to produce a polished experience.

Re: Ask HN: Am I crazy or is Android development awful?

#25

    10 Install an app that is able to use UVC cameras
    20 If works goto 50
    30 Else Use a different phone and goto 10
    50 Find an open-source app that is able to use UVC cameras
    60 If it doesn't work goto 50 (find another app)
    70 Try compiling the open-source app
    80 If it works goto 150
    90 ???
    150 Reduce open-source app to minimum code necessary
    160 Add own code
    170 Make sure the phone doesn't overheat and/or develop a bloated battery when you leave it running for weeks and weeks

Re: Ask HN: Am I crazy or is Android development awful?

#26
post #15
post #2

I think you're just going through the learning curve of something new. You could make the same argument about a React/Next app being unnecessarily complicated with Hello World.

I loathe to say this, because I still have a soft spot for the language, but you could say the same thing about Python development in 2024

> Do you want to break your Linux installation or rearchitecure your runtime? [Y]

(But really, Android dev is a qualitatively different level of fucked up compared to React or any major Python framework I can think of. React Native, though...)

Re: Ask HN: Am I crazy or is Android development awful?

#27

You should try iOS dev.

That’s like saying “may you live in interesting times.” Sounds fun at first, but it always ends in tears.

Where does that quote come from? I have been saying it for years but I have lost the source!

Re: Ask HN: Am I crazy or is Android development awful?

#28
post #8
post #3

I also agree that the development experience is awful. I have more than 10 years as an Android developer and Android Studio (someone remember when it was derived from Eclipse?) is painfully slow, even in modern machines. Just starting a new project is a ridiculously sluggish process. Also Gradle is a piece of hyper-complicated software that (almost) nobody is interested in, but it is there and you have to deal with i…

Most of my stack overflow points are from helping people run their build in Eclipse :) Gradle is deprecated now though. And Jetpack Compose is about as convenient as Flutter.

Gradle replaced Maven which replaced ant which replaced make. The tech treadmill was one of the reasons I retired early and I'm glad I did.

What is the new hotness replacing Gradle?

Re: Ask HN: Am I crazy or is Android development awful?

#29

Earlier quoted context omitted.

That’s like saying “may you live in interesting times.” Sounds fun at first, but it always ends in tears.

Where does that quote come from? I have been saying it for years but I have lost the source!

It’s an apocryphal Chinese curse: https://en.m.wikipedia.org/wiki/May_you_live_in_interesting_...
Post reply on HN