Live data from Hacker News

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

news.ycombinator.com

81–90 of 157 posts

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

#81
post #7

I've been developing Android since 2012. It was worse then. Still sucks now but isn't as bad. Esoteric errors are still the norm. With 10 years of experience you only have to swear a whole day when updating a library, instead of spending a week. GPT does poorly with beginners - it's definitely something humans have advantage with AI and I expect the gap to get bigger. I do not touch legacy projects anymore because th…

Hearing about this is very reminiscent of current day React web dev as well.

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

#82

Getting native libraries to work well on Android is a beast. I happened to have done exactly what you're describing though, specifically rendering libusb through an Android phone. My code is at https://github.com/kevmo314/kineticstreamer and you might be particularly interested in the CMake build at https://github.com/kevmo314/kineticstreamer/blob/main/app/sr... Happy to answer any questions or help you out if you de…

Don't forget Android 15 changes pagesize from 4K to 16K, and you have to recompile those ...

https://developer.android.com/about/versions/15/behavior-cha...

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

#83

Not only is Android a mess but the Google Play Store is terrible too. There's now this insane requirement that devs have to find 20 testers on their own for two weeks before publishing anything and, incredibly, the Play Store review process is also qualitatively slower and worse than Apple's. I think we're going to see the tendency accelerate to develop and validate ideas on iOS first and only later outsource a crapp…

External play stores can't come too soon.

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

#85
The project directory structure of Android/Kotlin apps, at least as generated by Android Studio, is indeed offputting. I look at the rust and python programs I have for PC, embedded, and web, and can confirm that the android layout is more complicated than is required in those three domains

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

#86
post #71

Earlier quoted context omitted.

Lmao, tbh all this is coming across as "Jr Engineer knows everything" syndrome. The fact your [1] link is a class that's not even used in the TextView class isn't lost on me to start. They share an interface though, scary!1!! The fact your [0] link is to a copy of the TextView from 2017 is even funnier. > Just look at the sourcecode for TextView[0] if you want to see for yourself. 8,700 lines of code to show text on…

"to just show text" is such a tell that you know nothing about UI. Displaying text is extremely complex. This is only 8000 lines because skiaa does the brunt of the job. Also, who gives a shit about TextView? Just use BasicText, we aren't in 2017 anymore.

The actual layout algorithm is handled by DynamicLayout, not the textView. It really is just supposed to show some text. You can see it here.[0] Almost all the difficult aspects of showing the text, such as alignment, text direction, line spacing, line breaking, ect. as well as the actual rendering of the text are handled by StaticLayout/DynamicLayout. All TextView should be doing is basically just allowing you to add text programmatically and handling the selection handles. That should not entail having a text editor.

>"to just show text" is such a tell that you know nothing about UI

I have actually made my own TextView using just layout so I don't think this comment is warranted.

[0] https://cs.android.com/android/platform/superproject/main/+/...

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

#87
post #54

Earlier quoted context omitted.

To me it just sounds like you want Termux. It works pretty well for things like gcc, Python, or Perl. For fun, I managed to get a full X environment running, including Intellij! The amazing thing was that it actually ran fairly decently on a Pixel 5, though it did tend to run out of memory with anything more than trivial projects.

This looks like exactly what I wanted to find! Thank you. I had been soured by the Android platform because I bought a brand new device, mostly because it had a physical keyboard, only to find out that it wouldn't get any new updates, nor could I use Skype on it, nor could I tether with it. Android was supposed to be the "open" platform, but at the time (which, admittedly, was something like ten or so years ago), it…

You can indeed use SSH. As client OR server.

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

#88
post #34

/? termux USB webcam: https://www.google.com/search?q=termux+usb+webcam Termux was F-droid only, but 4 years later is back on the Play Store: https://github.com/termux-play-store#current-status-for-user... Termux has both glibc and musl libc. Android has bionic libc. One time I got JupyterLab to run on Android in termux with `proot` and pip. And then the mobile UI needed work in a WebView app or just a browser tab t.…

When you get x on turmux working you see what mobile development could have been and weep for the fallen world we live in.

containers/podman > [Feature]: Android support: https://github.com/containers/podman/discussions/17717 :

> There are docker and containerd in termux-packages. https://github.com/termux/termux-packages/tree/master/root-p...

But Android 13+ supports rootless pKVM VMs, which podman-machine should be able to run containers in; (but only APK-installed binaries are blessed with the necessary extended filesystem attributes to exec on Android 4.4+ with SELinux in enforcing mode.)

- Android pKVM: https://source.android.com/docs/core/virtualization/architec... :

> qemu + pKVM + podman-machine:

> The protected kernel-based virtual machine (pKVM) is built upon the Linux KVM hypervisor, which has been extended with the ability to restrict access to the payloads running in guest virtual machines marked ‘protected’ at the time of creation.

> KVM/arm64 supports different execution modes depending on the availability of certain CPU features, namely, the Virtualization Host Extensions (VHE) (ARMv8.1 and later).

- "Android 13 virtualization lets [Pixel >= 6] run Windows 11, Linux distributions" (2022) https://news.ycombinator.com/item?id=30328692

It's faster to keep a minimal container hosting VM updated.

So, podman-machine for Android in Termux might help solve for development UX on Android (and e.g. Android Studio on Android).

podman-machine: https://docs.podman.io/en/latest/markdown/podman-machine.1.h...

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

#89

Getting native libraries to work well on Android is a beast. I happened to have done exactly what you're describing though, specifically rendering libusb through an Android phone. My code is at https://github.com/kevmo314/kineticstreamer and you might be particularly interested in the CMake build at https://github.com/kevmo314/kineticstreamer/blob/main/app/sr... Happy to answer any questions or help you out if you de…

Hey thanks for this! I gave it a try, imported and built in my Android Studio ("Koala" if that matters), tried getting it installed on a phone, and unfortunately got this cryptic error:

> ninja: error: 'lib/libjpeg.so', needed by 'C:/Users/ADMIN/AndroidStudioProjects/kineticstreamer/app/build/intermediates/cxx/Debug/3xf5p505/obj/arm64-v8a/libkinetic.so', missing and no known rule to make it

That being said, I browsed through the code some more and while I think it's a great Android project, I don't think (assuming I got it working) it would be advisable for me to build on top of this. The existing complexity, and my lack of faith on cross-compatibility (different phones, SDK updates, etc) are a turn off. Heck I've even seen certain libraries and includes fail because they require different versions of Java/JDK that I have available.

So in summary, I think the solution for myself at least for now, will be to explore a different hardware route. A cheap raspberry pi equivalent, with a small display, and battery - annoying to have all these extra components but at least I know it'll work reliably.

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

#90

Earlier quoted context omitted.

"to just show text" is such a tell that you know nothing about UI. Displaying text is extremely complex. This is only 8000 lines because skiaa does the brunt of the job. Also, who gives a shit about TextView? Just use BasicText, we aren't in 2017 anymore.

The actual layout algorithm is handled by DynamicLayout, not the textView. It really is just supposed to show some text. You can see it here.[0] Almost all the difficult aspects of showing the text, such as alignment, text direction, line spacing, line breaking, ect. as well as the actual rendering of the text are handled by StaticLayout/DynamicLayout. All TextView should be doing is basically just allowing you to ad…

> I have actually made my own TextView using just layout so I don't think this comment is warranted.

Make sure you handle the following attributes and how they affect each other!

> text, bufferType, hint, textColor, textColorHighlight, textColorHint, textAppearance, textColorLink, textFontWeight, textSize, textScaleX, fontFamily, typeface, textStyle, cursorVisible, maxLines, maxHeight, lines, height, minLines, minHeight, maxEms, maxWidth, ems, width, minEms, minWidth, gravity, scrollHorizontally, password, singleLine, selectAllOnFocus, includeFontPadding, maxLength, shadowColor, shadowDx, shadowDy, shadowRadius, autoLink, linksClickable, numeric, digits, phoneNumber, inputMethod, capitalize, autoText, editable, freezesText, ellipsize, drawableTop, drawableBottom, drawableRight, drawableLeft, drawableStart, drawableEnd, drawablePadding, drawableTint, drawableTintMode, lineSpacingExtra, lineSpacingMultiplier, justificationMode, marqueeRepeatLimit, inputType, imeOptions, privateImeOptions, imeActionLabel, imeActionId, editorExtras, elegantTextHeight, fallbackLineSpacing, letterSpacing, fontFeatureSettings, fontVariationSettings, breakStrategy, hyphenationFrequency, lineBreakStyle, lineBreakWordStyle, autoSizeTextType, autoSizeMinTextSize, autoSizeMaxTextSize, autoSizeStepGranularity, autoSizePresetSizes, textCursorDrawable, textSelectHandle, textSelectHandleLeft, textSelectHandleRight, allowUndo, enabled

Post reply on HN