I think it is fair to say that most of us are super happy with how nullability is handled in Kotlin. The overall code that we are writing with nullability in mind is mostly cleaner looking and helps us avoid the pitfalls we saw in Java. Having said that *Platform Types* are a place in particular that I ran into where I feel like the developer experience and the impact to the user is worse. If you are not aware, *[Platform Types]* are types that were created when Kotlin cannot infer the nullability of a type from Java.
Have you ever found yourself navigating through code and ending up at an Interface, instead of the concrete implementation you were hoping for? During Yun Cheng's talk - MVP The Life-Changing Magic of Tidying Up Your Presentation Layer (at 360 AndDev), her and her team uncovered that exact command.
Today’s tip is going to be short and sweet. I was testing an internal library that I had little experience with a few days ago, when I noticed that for one method invocation I had reversed the inputs. This was partially to do with the lack of documentation and the fact that this legacy library lacked human readable parameter names, but I digress. The problem I had was that this method invocation was used enough that I didn’t want to swap all of the values by hand.
It's no doubt that Android Studio gets better with every version. Who doesn't love Instant Run? There is one thing I am sad to see change without mention. Test Artifacts are merged together by default now.
In October of 2014 a friend and past colleague of mine, Mustafa Ali, wrote a great Medium article to help solve a problem that many Android developers have encountered at one point in their career. The Dex method issue in short is a limit to the amount of executable methods allowed in Android's Dalvik Executable file (the one used to execute Android code). Shortly after writing his guide Google did the unthinkable... they released a support library. The library creates multiple dex files to help apps that are large get around the single dex file limit issue. Though this is a great solution for large apps Google suggests to use Proguard to strip your app of unused code or to reduce your dependency on libraries as a whole. The former is much easier than the latter.
In Pierre-Yves Ricau's blog from 2013 he walks you through how to make a very basic version of Facebook's Chatheads, which if you haven't read is a great read and is yet another reason why I love Android. At the end of his blog he asked the question:
"Does this imply that Facebook Chatheads (or any application with SYSTEM_ALERT_WINDOW permission) is able to conduct keylogging and take screenshots at arbitrary time?"
It was a great question but after trying to explore more with adding views directly to the window I think I found another concern.
Chances are if you are an Android developer there are a bunch of really amazing features hiding in Android Studio that you have probably yet to discover. I am definitely not the exception to that and yesterday I stumbled upon (/took the time to understand) a few features that have so far made my life much easier. These features are Bookmarks and Favorites.
“We can just port this from iOS to Android” If you are an Android engineer then chances are you have heard this phrase many times in the past few years. It may even be because of this phrase that you are here today. I am no exception to this quandary, numerous times in my career I have found myself responding to this question or others like it. The first time I heard this I became irritated because certainly any designer working in the mobile industry already knew everything about Android. I quickly realized that this wasn’t one person neglecting the beloved Android platform. The problem is a lack of day to day experience with the platform. From that day forward I decided I will not contribute to the growing divide between the Android organization and the rest of my company. That was the day I became an advocate for Android.
I am not one to generally praise Fragments, its mostly the navigational stack that always seem to give me a plethora of issues. Having said that, its comforting to find something that works the way you would expect. A few days ago I found that at the intersection of the Fragment and the Toolbar (formerly known as the Actionbar).