Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@SortOfTested Volley was actually the first thing I found. I went through a very long journey of implementing a bunch of different approaches and finally implemented this:
Base Volley Request ->
Generic Gson Volley Request ->
Login Volley Request
Setting post params is a fucking bitch in Volley. That's why I implemented a custom login request class. This halved the network logic required in the activity class, which made me happy. -
@AlgoRythm
Yeah, all this is why I'm not crazy about android or mobile dev in general. The whole, "applications are secondary to call" lifecycle design is inconvenient to say the least.
It would be cool if there were a phone that had a dual OS that made calls on one side with a dedicated CPU, and ran apps in an entirely different env. -
@SortOfTested It sure is annoying, and I wouldn't really wanna do this sort of thing professionally, but as a side project I'm sort of enjoying the challenge and constraints. Learning a lot of techniques.
-
@yellow-dog no you shut the fuck up. Android dev is easy when you actually pull your head out of your ass and learn new things that make your life easier instead of whining.
-
@zemaitis yes because using var and an arrow function instead of override make this so fucking simple and intuitive. You blurt out crap when somebody obviously doesnt want to use your miscarriage of scala and someones conception of js from 2002.
-
@zemaitis Looking at the example code (Everything in Android docs is written in both Java and Kotlin), it wouldn't help a ton in this example. It would eliminate maybe four or five lines. And to make the move to a different language for that is silly in my opinion.
Plus, I actually like Java, so it's not like I'm trying to escape it. I'm open to further improvements of my existing design - I think I did well, and I was looking for even more insight. -
For my part, I wouldn't really want the login to be side effecting to the event queue and creating toasts. Lots of work for one method.
The login handler should be a Function that returns from a builder that defines all of its strategy. Build/curry in the handler methods, view, supplier delegates to resolve the user/pass values, etc; the resulting method becomes compositional. The toasts should be provided by a service that is called by an event stream handler that is able to read a login pass/fail event, the move to the other side of the processing chain. Bc java, null checking with optionals. Sucks java has no tuples.
Just my prefs though. -
@sbiewald really? I thought android was still stuck on java6, when did they update?
-
@SortOfTested I am not necessarily new to this sort of thing. But I still only know maybe two of those concepts.
-
@AlgoRythm 2020 and you are still clinging to java in android development? Good luck is all I can say to you
-
@yellow-dog you obviously are not working on android professionally, thats the only reason to deny using kotlin. I mean either your codebases are not worth the shift of you are just ignorant. It was already approved by google itself as the preferred language 1 fucking year ago.
-
@AlgoRythm You will not have a job as android dev thats obvious. Unless its some legacy application which u will have to maintain and thats never pretty. Next time let us know that this is you playing around with your e-dick and no one will think twice when they see you using shittiest networking library and boilerplated language.
-
@zemaitis oh gosh he uses mean words too, I need to avert my eyes :((
I said earlier I have no interest in doing Android dev professionally. In the same comment that you probably didn't read or are ignoring just so you can argue with me, I also said I was learning a lot of techniques.
Kotlin isn't what I'm looking for at the moment but thanks for the attempt at helping. Sorry about your reading impairment though -
@zemaitis nigga, no sane person wants to do android professionally. Even if i did, i would just use react native and save myself the headache. I have done it professionally, both in java and kotlin, and both were crap, the difference is that kotlin compiles to a jarbled mess. But again, how is any of that relevant to someones pet project?
Also, google+ was approved by google, yet here you are on an other platform, curious... -
@yellow-dog Doesn't seen to be "real" Java 8 to me, but rather a byte code transpiler for me - but it works for third party libraries and Kotlin as well.
AFAIK only Android versions with OpenJDK have "native" Java 8. -
I love how he asked for feedback on his code, but in return he mostly got shit about using Java...
Related Rants
Simplified about as good as I can get it.
Any Android devs with critique?
rant
java
android