Issues Faced With Kotlin During Android Development

Kotlin seems like the future of Android development. It is a new statically-typed programming language that runs on JVM, with a very refined syntax and enhanced features. There is a lot to love about it. Kotlin is interoperable with Java, which should reduce the risk of future incompatibility. The additional language features such as Function Extensions and High Order Function make it much more extensible and scalable. The code is concise with data classes, single expression function, infix and many more… enough said. Kotlin is just great!


I started working on some real apps using Kotlin that have since been published on the playstore. I have to say it was relatively smooth sailing. Nonetheless, there were some hiccups along the way that are worth sharing.

1. Method Count Increase.

Method count increase was one of the issues I was fully aware before starting with Kotlin. At the time of writing, there are an additional 7’191 methods adding to the total method count. This would add more than 10% to the 65k methods limit. Nonetheless, I didn’t worry that much as the MultiDex support is there to help to overcome this issue.

2. Using Libraries that require Annotation.

There are many cool libraries that can assist with making Android Development much more efficient. However, when switching over to Kotlin, using some of them becomes a challenge. There are two libraries which I can’t manage to use directly after switching to Kotlin, i.) Icepick and ii.) EventBus. The main reason is that the Annotation (i.e. @State and @Subscribe) is not picked up by the code. Fortunately, with EventBus, I managed to work around this by creating a composite class object using Java Code. Note that this doesn’t mean all libraries using Annotation would not work for Kotlin. I managed to use Retrofit 2.0 and Dagger 2.0 (where both use Annotation extensively) in Kotlin directly.

3. Mocking Need Open Class/Function.

By default a class and function is considered final for Kotlin. Mocking (using Mockito) requires a non-final class. So in order to have that, we have to explicitly open a class if we would like to mock it for testing. If this is not done, it would error out easily. The more tricky issue is the function. If the function is not open, there would be no error issue when running the test. Instead of intercepting the function, it would call the actual internal function, where the test would fail with NPE. Without knowing the function needs to be open, the root issue might not be easily discoverable.

4. Java to Kotlin Converter Limitation.

The Kotlin Plugin for Android Studio is just great, especially allowing to auto convert from Java to Kotlin. However, the conversion might not be ideal. e.g.


is converted to

class SimpleClass(memberVariable: Int) {

  internal var memberVariable = 0

  init {

      this.memberVariable = memberVariable



Whereby it could be as simple as

class SimpleClass(val memberVariable: Int) {}

Anyway, it’s always good to review the converted code and explore so that we don’t just have Kotlin code in Java style, without the real advantage of Kotlin.

5. Other Converter Issue.

I love writing a new function from an object, and pressing Alt-Enter to trigger the auto-function creation. If you are writing on the Java side of code, and call a Kotlin function (that you just intended to create), sorry you are out of luck. Android Studio will only auto create that function for you in the Kotlin code.

At times for experimental purposes we would also like to convert from Kotlin to Java, given that it was inter-operable with Java. This is not possible however the tools only allow you to convert from Java to Kotlin and not vice versa. Perhaps this is by design, and I could imagine it would be difficult for Java to handle conversion of more advanced Kotlin language features.

None of these issues are show stoppers. The advantage and fun of learning new things outweighs them in any case. The language features are richer and there is so much to explore. I haven’t really faced many issues from Kotlin’s language as yet. I’m sure I’ll uncover more issues, but I don’t expect them to “kill me”. Java is always there to the rescue 🙂

As with any new thing, one other challenge is finding community support. Suppose you are experimenting with new Android Features and face a road-block. If you post your question to Stackoverflow using your Kotlin code, you are unlikely to generate support.

So… you might as well be the one who supports others… which is in itself a good thing! 🙂

Taking smart shopping to the next level

When shoppers enter a retail store, they are generally free to browse and shop as they wish. They can move around the store, inspect products, engage with staff, perhaps price check items on their phone. This free-flowing, customer-controlled shopping experience stands in stark contrast to the rigid checkout process where customers are funnelled into a specific location so that their items can be tallied before they pay by cash or credit card.

In practical terms, this kind of static payment process can act as a bottleneck, whether from lack of staff or unprepared customers who have to dig around in their wallets for a credit card or cash. Yet retail stores, for the most part, continue to follow a traditional in-store model which no longer matches evolving buyer behaviour. Not to mention that the purchasing bottle-neck takes up valuable time which the customer could spend moving about the store and exploring other products.

The proliferation of internet-connected devices like tablets and smartphones is interrupting this traditional retail model, providing customers with more flexible ways to shop, while offering retailers an inordinate amount of data which can better inform the delivery of products and services.

At Bilue, we take the retail shopping experience very seriously. Our prototyping team has put significant investment into R&D, developing a model that speeds up the bricks-and-mortar experience by removing the checkout bottleneck. Here’s what we came up with:

The Smart Shopping Bag

The Smart Shopping Bag is a personal, mobile point of sale (POS) system which scans items as they are placed into the bag and keeps a running tally as the customer moves around the store.


This prototype pairs with an app on the user’s phone, connecting their physical shopping bag to an online cart. Placing an item into your digital cart is as simple as adding it to your physical bag.

Customers download the Smart Shopping Bag application (available on iOS, Android and Windows phones), fill in their registration and then visit the ‘pair shopping bag’ option in the menu screen. Each identified phone will have a shopping bag icon next to it. To pair, they simply select the icon next to their phone’s ID and hit connect. The bag will connect to the app via Bluetooth.

All of the products in-store are fitted with RFiD tags which the app will read and update in the cart when they are placed into the Smart Shopping Bag. Once the customer has completed their shop, they simply unlock their phone, enter the app to see the total, hit the pay button et voila, checkout complete!

Because we can track what a customer has added in real-time, there is no need to interface with the traditional POS system. Decided they no longer want an item? They simply remove it from the Smart Shopping Bag and the app will automatically deduct it from the subtotal.

Once a shopper is done, all they need do is detach the inner bag and walk out of the store.

Where to from here?

While 2015 was a strong year for mobile payment systems with the launch of Apple Pay in Australia, the technology and its implementation is still in its infancy. We have yet to see saturation of these innovations in bricks-and-mortar stores, meaning the next two to three years will likely see a mobile payments gold rush to bring the retail experience into the 21st century.

Apple Pay increases the speed of payment transactions, but still requires users to choose a payment method, authenticate with their fingerprint and place their phone or Apple Watch on the POS terminal. Being a deliberate play in increased security and convenience during payment, it is no surprise that Apple Pay does not yet address the pain point of having to stand in a checkout line.

Smartphones allow retailers – and their customers – to do an awful lot more than they are currently taking advantage of. Customers are literally holding the technology needed to bridge the innovation gap. In order to remove these payment bottlenecks in the shopping experience, it is now up to bricks-and-mortar stores to invest and connect to these devices.

By allowing customers to scan their products as they shop with a one-touch checkout, retail stores get the added efficiencies from a distributed checkout system. This is the beauty of internet connected devices, with every customer carrying a potential POS system with them. When transactions are completed on a mobile phone, it closes the loop between the physical shoppers and your digital customers.

The Smart Shopping Bag is still in prototype stage. However even this proof of concept showcases the technology that can be utilised for enhancing the customer experience in retail stores today.

Rolling out RFiD tags to the products in a retail store opens up a raft of new experiences for businesses and consumers to enjoy. Leveraging these technologies would allow retail environments to be free of traditional payment counters and to focus on crafting the ideal retail experience. Consumers could browse and interact with products they are interested in and simply be charged for whatever they are holding when they leave the store.

Creating a network that can identify a customer and the individual products they are interacting with, without manual input opens up possibilities for the next generation of shopping experiences.

We would love to get your feedback on our first round of prototypes. If you are interested in helping shape the future of retail experiences, contact us and join the conversation.

Linkly #6 – Powerful Talks

Linkly is a curated list of interesting products, topics and talking points from the world of design and technology.

It is said that the pen is mightier than the sword. That a person can change opinions and influence people far more effectively with the written word than with brute force and a sword. In the modern day with an endlessly flowing stream of information right at our fingertips the opinions that stand out from the pack are those that are insightful and engaging, that reach into the lives of their audience and elicit a truly emotional response. 

Video does a brilliant job of creating a connection between the viewer and the speaker. It provides a far more human element to the exchange of information that respects the meaning and the value of the speaker’s intentions. This week instead of linking to articles from around the web that will inevitably end up at the bottom of your ‘Read it Later’ pile, take the time to watch these powerful and insightful talks about design and technology. 

Ken Robinson: Do Schools Kill Creativity?

From the day that you’re born, you’re thrust into long, tough and hard years of education. Without consent, every child goes through pre-school, primary school, high school. It is assumed knowledge that school is what is best for kids. Ken Robinson goes down the path less travelled and asks the question, “Do schools kill creativity?” 

Simon Sinek: How great leaders inspire action

If there is one talk that you must watch in your life, and that has the potential to make the biggest impact on your work it’s Simon Sinek’s talk. He proposes the simple model for leadership, and the framework around which you can truly give people what they want, by asking ‘Why?’

Ira Glass on Storytelling

Nothing comes easy, especially mastering your craft. In this typographic masterpiece world renowned radio host of the popular podcast, This American Life, explains the 10,000 hours principle. That it takes approximately 10,000 hours of hard work, passion and persistence to become a leader in your field.

Sheryl Sandberg: Why we have too few women leaders

Facebook’s COO delivers a brilliant talk on why less women reach the top of their professions. She offers powerful advice to women aiming to break form and strive to be leaders. A fantastic talk that is well worth taking the time to watch closely and that will open your mind to problems you didn’t know existed.

Jon Ronsen: How One Tweet Can Ruin Your Life

From the man who brought you, The Psychopath Test, Jon Ronson takes a look at public shaming, and the role social media plays in the problem. He examines the problem and its effects on society as a whole.

Words are a powerful way to convey meaning and express ideas. Even more expressive, engaging and effective is the human voice. Standing on stage in the spotlight, with hundreds of people hanging on your every word. If you’re inspired by these talks you too can share your thoughts, and present them publicly, and potentially change the way people think about the world around them.

Linkly #5 – Office must haves!

Linkly is a curated list of interesting products, topics and talking points from the world of design and technology. This week its all about innovative office products that inspire creativity and increase productivity.


Stop watching the clock

We’ve all been there, sitting, watching the clock, waiting for time to pass. Tick tock, tick tock. Letting time cast its shadow over us, and rule our lives. Always looking for more time or for less time, time is never enough, or time is just too much.

Scott Thrift, Filmmaker and Designer, has produced an unconventional clock titled ‘Today’, that ditches the menial division of time into seconds that overwhelms. Instead Thrift seeks a more fluid perception of time. The Founder of ‘ThePresent’ lives in Brooklyn New York, and says the clock “is for people who have careers that are less about how many widgets you can make in an hour and more about the longer term thinking and being creative.”

I think the idea of re-framing time in this way serves as a gentle reminder to focus on the bigger picture, but whether or not the concept applies in a practical and modern utilitarian context is another matter.



Alexa, what’s on my calendar tomorrow?

Amazon hopes to make your office smarter with the new Amazon Echo, personified through the word ‘Alexa’. Alexa offers over 1,000 features and skills that have been introduced since the virtual assistant’s very recent launch. While some features are better than others, Alexa can play your music, answer a vast array of questions, read you audiobooks, and cover the news. She can also control the lights switches, and even hail you an Uber!

Alexa’s exciting potential shines through Amazon’s Alexa Skills Kit (ASK), the opens up the technologies to third party developers and unlocks an endless potential for powerful integrations. In this way Amazon’s humble virtual assistant is at the forefront of the ‘Connected Home’ concept and could very well be the key to Home & Office automation becoming the reality we’re hoping for. Alexa is now a regular attendee in our Bilue boardroom.

Hot Tip: Ask Alexa if she can rap! 



Shortcut the shortcuts

Most pixel pushers and software developers rely on keyboard shortcuts to maximise speed and efficiency when working. Keyboard shortcuts are fast, but what if there was something faster?

This finger-aware shortcuts system can detect how a single key is being pressed and can be configured to do whatever you want it to do. Pressing the letter ‘G’ with the index finger on your left hand would work exactly as you’d expect it would, but pressing it with the index finger on your right hand could perform an entirely different action. It could launch a google search, search a definition, or even copy and paste.

As humans become more computer literate, and children start to learn to type with keyboards at earlier and earlier ages, the potential for pushing the boundaries of human and computer interaction broadens. Interactions that were once incredibly difficult, such as pointing a mouse, and typing letters on a keyboard, are now second nature. This poses an fascinating question about the ways that humans will be interacting with technological interfaces 10, 20 and even 30 years from now!



Shivering in the office?

Crank up the heat with a touch of a button. I for one, think this is genius. WristQue is a project from a group of researchers at the Massachusetts Institute of Technology (MIT) who are creating a low-power wristband equipped with sensors that monitor how comfortable wearers feel to adjust temperature. Imagine if it knew you were in a particular meeting room at a certain time most days, it could set the preferred temperature before you arrive. Brilliant!



Cleaner office air

This air purifier is designed to look better than the typical ugly plastic tower and, if you like, it can also grow a bunch of basil for your lunch. The EcoQube Air is essentially a mini-greenhouse, complete with lights and a soil-less hydroponic system that boosts air quality indoors. Better air quality = improved productivity!




Linkly #4 – WWDC Predictions

Linkly is a curated list of interesting products, topics and talking points from the world of design and technology. Last week was all about Google, so we only thought it was fair to give Apple a go too. WWDC is only a few weeks away and we’ve curated a list of predictions our team at Bilue are hoping will turn into a reality at this years event.


iOS 10 Concepts

Macstories have published this concept video for iOS 10. Some of our fav ideas include the Control Centre updates, system dark mode,  revamped Messages app and improved iPad multitasking!



Siri Smarts

There is speculation that Apple is planning on releasing a Siri SDK to allow developers to tap into Siri functionality and open up clever possibilities for apps inside the iOS ecosystem. We’re really interested in seeing how this might change how people interact with their devices and if talking to Siri in public becomes more conventional.



iPhone 7 and iOS 10 rumours

Zac and Benjamin from Happy Hour have released this podcast where they talk through iPhone 7 and iOS 10 rumours. Also mentioned is Apple Car, how smart connectors could work with the phone, removing the iPhone home button and more! An easy listen where they talk through some interesting ideas.



Apple Music Changes

This article makes mention of a colour scheme change from magenta to black and white, larger album artwork images, smart playlist functionality and a moments style feature where you can track what music you were listening to at particular points in time or place. Apple loves to pull the heart strings!

We’re all super excited to see what is unveiled at WWDC. If you have more to add on the topic, we’d love to hear your thoughts and predictions!


Linkly #3 – Google>Skynet

Linkly is a curated list of interesting products, topics and talking points from the world of design and technology. This week is all about Google…and some other cool things too, such as headphones that listen to YOU and power suits! Not referring to the 80’s style of suits with massive shoulder pads, although, they do empower…


The 10 biggest announcements from Google I/O 2016

Definitely not a company that allow themselves to stand still, they have thrown a whole bunch of new ideas, apps and tech at a wall and now it’s the user’s time to figure out which will stick.

Google Home seems like the next obvious step for them in their attempts to create the next Skynet. This is their first step into a connected home but for me personally I find that having a stand alone “thing” won’t be of much use, until it can be connected to more elements in the home. I need the ability to check my front door is locked and that I turned off the iron while I’m at work, I need that in my life to help soothe my anxiety.

The other stand out is the VR framework called Daydream. It basically gives developers more access to the Google framework so they can further explore the possibilities of VR and VR gaming.

The last standout would be the updates to Google Search, making it act more like a personal assistant. It will be interesting to see how far they go with this for the next release especially in places like Australia, where we often get shafted from cool features. Let’s just hope it continues to be more helpful than Clippy.

But one feature presented at I/O needs it’s own link. See below.



Google’s understated glory at I/O

Not the most flashy of things, not the sexiest or the most headline worthy, but easily the best from a user perspective is Google’s Instant Apps. How often do you download an app, simply to use it once or at max twice, only to leave it gathering dust in the app draw, until a day as to which you run out of storage and go on the hunt for useless apps to delete? Well Google have fixed this will a great, bleedingly obvious solution. Need an app for a one time use? Just run it virtually on your phone and close it when you’re done, no downloading, installing or anything. I for one think this is one of the best new features on Android N.



These new Nura headphones listen to YOU!

Sounds like something from the Twilight Zone? Well i’m sure there is an episode about it somewhere, fan made or otherwise. These headphones with in-ears as well, analyse the small sounds generated by your ear canals. This all gets processed and then the headphones alter the sound they emit to create perfect harmony (pun! boom!). I think it’s an interesting idea, but whether or not it works is another matter, and whether it sounds pleasing is another matter again!



A step towards sweet as POWER SUITS!

Think about how much untapped solar energy hits the earth everyday. That leads us perfectly into solar suits that we wear everyday to become all powerful superhumans. Imagine wearing a t-shirt that charged your phone, or hooking up your clothes that are on the clothesline to your electric dryer to dry some clothes! This newly developed solar cell membrane is like a band aid that allows solar energy to be stored. It’s hard to see now why this is important, but a few years down the track this could be the future, especially for powering wearables and even future Mars missions. POWER SUITS!!!



Nokia is back!!!

They are back and now planning to run Android. After the initial smartphone boom, Nokia tried to keep in touch with their Symbian OS, but after a few years of pretty much no sales at all, they were bought by Windows to run the Windows Phone OS. After again, a few years of no sales, they kind of drifted off into the ether. But they are back and are planning to run Android, like they really have a choice. I would really like to see a stock Android phone from another company other than Google. 



After Effects animations to iOS apps with SQUALL!

One of the toughest parts of being a designer is communicating an idea, especially when it comes to interactions and animations. One of the toughest parts of being a developer (I imagine) is understanding what a hipster Clarke Kent is trying to get at. “…like it’s gotta move outwards from the button, but fade in at the same time, maybe slightly delayed, I dunno we’ll see what it looks like.” Prototyping tools have come a long way in helping with this but there is still the gap in between a Prototype and the actual app. After Effects is not strictly a prototyping tool, but rather a really powerful and loved animation tool, being able to animate in After Effects and bring it in exactly as it is into the iOS app, seems like crazy talk. But SQUALL allows you to do exactly this. I think app loading pages are soon to get some really beautiful animations. 



Twenty-two Ways Ramsay Bolton Could Die

Storytelling still plays a very large part in out lives, if we think back to the days of when we were wearing bear pants and hunting mammoths, we were telling stories via cave paintings and “ohw” and “ahh”ing to each other. I find it amazing that Game of Thrones have created two of the most hated characters in all of storytelling, I know that every GOT fan is just waiting for the day Ramsey dies, because he is the new Joffery….WARNING: that was a massive spoiler. My money is on Reek…or whatever his name is now. 


Contact Info

Level 1 6 Bridge Street, Sydney, NSW, 2000

Level 1 520 Bourke Street, Melbourne, VIC, 3000

Copyright 2018 Bilue Pty Ltd ©  All Rights Reserved