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
Search - "replacing android"
-
!rant
Got back into android development recently and while everything was pretty flawless ( I managed to get the basic concepts implemented in a day) something wasn't right.
For some reason I was not happy with the code i wrote, although I took examples from google and tried to adapt their code style. It looked aweful. I hated my code.
But the code itself wasn't the core of the problem. I could easily add new features and replace components with new implementations without breaking the app. All those "good code quality" identifiers were there.
Turn out the problem is Java. Or to be more specific: Java 1.6
Every listener which only calls a single function once a worker has finished needs 6 lines of code. If you implement the inferface in the class it gets messy once there are multiple workers and you have a generic interface. And there are no lambdas!
So I made the switch to Kotlin.
The app was converted to kotlin in 30 Minutes. Android studio can convert the classes automatically and very little manual work is needed afterwards.
After that I spent 2 hours replacing the old java concepts with Kotlin concepts: lamdas, non-nullable types, getters and setters in kotlin style (which in this case is c# style) and some other great thing.
The code is good looking now. I like it. I like kotlin as it has a lot of cool things.
Its super easy to learn. It took me about 2 hours to get into it. It combines concepts from java, javascript, c# and maybe a few other languages to form a modern jvm 1.6 compatible typesafe language.
Android dev is fun again!2 -
Sorry yesterday installing LineageOS because wanted to Android 10 and got tired of OxygenOS replacing recovery and root every time it updates...
The build failed and bricked my phone so installed Lineage Pie.... so same as before...
Then found out today there an app that will indeed OxygenOS 10 and for all future updates can auto install and keep root....
So now reinstalling OxygenOs...7 -
Experience with Plasma Mobile, part 2.
I was able to clone the official master repository and commit my hacks to it, but when I sent the pull request, the current active maintainer said that the master branch was actually severely out of date and to try the "halium-flash" branch.
So I did. I checked out the "halium-flash" branch and attempted to install Plasma Mobile. The bash file used to flash the phone still needed to be hacked around, though my previous commit was made irrelevant by the change. However, I did get it working on my phone.
So, here are my thoughts: It's most definitely not ready. The lock screen looks pretty and is well put together, and the "desktop" and icons for applications look very nice.
However, my phone does not have a physical "home" button, and Plasma Mobile to date does not have a digital "home" button. So, in order to close an application I have to literally reboot my phone.
As of yet there seems to not be any tactile feedback or visual feedback, which is odd when typing in the passcode to log into Plasma Mobile or trying to open an application.
Firefox crashes if you try to open it, and currently there are two choices of wallpaper. I haven't tried calling someone, but I'm fairly certain that Plasma Mobile does not support telephony on my phone type.
So, my verdict is still the same: I have great hopes for the Plasma Mobile project, but unless you are a developer who is interested in making it a better product, I would stay away for now.6 -
I was able to replace Okta Verify with an open source Python script and Android app and I wrote a tutorial for it:
https://battlepenguin.com/tech/...
Unfortunately it won't work for our companies VPN which requires Okta Push. After fighting with Security for a bit, it looks like I'll have to do a Part II where I reverse engineer the Okta Verify protocol. -
Recently, my hardy MacBook Pro 2012 gave up the ghost. So I'm in the market for getting a new laptop. Which one(s) would you guys recommend given the following use cases I have planned? Listed in order of importance:
- Getting used to Linux. Eventually I plan on replacing my desktop PC's Windows install with Linux and would like to try some flavors on the laptop.
- Software development w/ Java (Spring), Android, Rust, Go, Node
- Music making
- General web browsing, heavy YouTube use
- A little bit of story writing6 -
i can never understand the theme behind kotlin.
THEY DON'T HAVE A FUCKING TERNARY OPERATOR!!![?:]
Like before realizing this, i thought yeah jetbrains has decided to make android development a privileged hobby and non beginner friendly , so its now creating an encoding like language, in the false theme of " reducing code size"
But now they remove WORLDWIDE KNOWN, OPTIMIZED , EASY TO READ AND USE AND UNDERSTAND FEATURE of ternary operator and replacing it with less powerful but same looking elvis operator.( and stating that using if else for that is a better option)
Like why? if your goal is to make a shitty encoding language that makes everything shorter and most of the things optional, why remove the already efficient if else encoder?
God knows when this stupid language is going to stop my brain from getting blasted11 -
It's these individually tiny annoyances in products and software that together form a huge annoyance.
For example, it's 2022 and Chromium-based web browsers still interrupt an upload when hitting CTRL+S. This is why competition is important. If there was no Firefox, the only major web browsers would, without exception, have this annoyance, since they're all based on Chrmoium.
I remember Chromium for mobile formerly locking scrolling and zooming of the currently viewed page while the next page was loading. Thankfully, this annoyance was removed.
In 2016, the Samsung camera software was updated to show a "camera has been opened via quick launch" pop-up window when both front and rear sensors of the smartphone were covered while the camera was launched by pressing the home button twice, on the camera software Samsung bundled with their custom version of Android 6. What's more, if that pointless pop-up was closed by tapping the background instead of the tiny "OK" button or not responded to within five seconds, the camera software would exit itself. Needless to say, this defeats the purpose of a quick launch. It denies quick-launching while the phone is in the pocket, and the time necessary to get the phone out could cause moments to be missed.
Another bad camera behaviour Samsung introduced with the camera software bundled with their customized Android 6 was that if it was launched again shortly after exiting or switching to stand-by mode, it would also exit itself again within a few seconds. It could be that the camera app was initially designed around Android 5.0 in 2015 and then not properly adapted to Android 6.0, and some process management behaviour of Android 6.0 causes this behaviour. But whatever causes it, it is annoying and results in moments to not be captured.
Another such annoyance is that some home screen software for smartphones only allows access to its settings by holding a blank spot not occupied by a shortcut. However, if all home screen pages are full, one either needs to create a new page if allowed by the app, or temporarily remove a shortcut to be able to access the settings.
More examples are: Forced smartphone restart when replacing the SIM card, the minimum window size being far too large in some smartphones with multi-windowing functionality, accidental triggering of burst shot mode that can't be deactivated in the camera software, only showing the estimated number of remaining photos if less than 300 and thus a late warning, transition animations that are too slow, screenshots only being captured when holding a button combination for a second rather than immediately, the terminal emulator being inaccessible for the first three minutes after the smartphone has booted, and the sound from an online advertisement video causing pain from being much louder than the playing video.
Any of these annoyances might appear minor individually, but together, they form a major burden on everyday use. Therefore, developers should eliminate annoyances, no matter how minor they might seem.
The same also applies for missing features. The individual removal of a feature might not seem like a big of a deal, but removing dozens of small features accumulates to a significant lack of functionality, undermining the sense of being able to get work done with that product or software when that feature is unexpectedly needed. Examples for a products that pruned lots of functionality from its predecessor is the Samsung Galaxy S6, and newer laptops featuring very few USB ports. Web browsers have removed lots of features as well. Some features can be retrofitted with extensions, but they rely on a third-party developer maintaining compatibility. If many minor-seeming features are removed, users will repeatedly hit "sorry, this product/software can not do that anymore" moments.